How do I extend image size on a 1tb hard drive?
Hi guys, a few weeks back I purchased a 1tb hd, so I could add ps games to my image. To my surprise I found that I was restricted to the image size (256gig) and not the hd (1tb). Now I have searched the internet for a fix only to find solutions for a sd. So can anyone point me in the right direction so I can use my 1tb hd to it's full potential?
@mitu that does not explain how to enlarge my sda2 partition.
/dev/sda2? From your description I understand you have an existing 256 image (sdcard) and you want to add your new 1Tb drive to keep the ROMs there. The sdcard doesn't appear as
/dev/sda2on a Raspberry Pi.
@mitu no I have programmed the hard drive as a stand alone, I don't use a sd card at all. My 256gig image is on my hard drive but I am limited to the image size and unable to expand my sda2 partition. Rasp- config does not recognise the hard drive.
@aussie-daredevil I see - so you flashed the 265 Gb image onto the drive and now you have 2 partitions (
@mitu yes I do
@aussie-daredevil Then I suggest to use a Linux live distro like System Rescue CD - that you can run from your PC from an USB stick - to resize the partition (
/dev/sda2). It has a graphical interface for gparted, the program used for partition resizing, and it's really easy to use.
I think there are also Windows programs that can do that, without the need for a Live CD, but I personally didn't use any and can't remember the names.
@mitu already tried gparted thru Linux live, didn't work, even tried a smaller partition size of 500gig with no luck. Here is a screenshot of the logs!
@aussie-daredevil This is because your
/rootpartition UUID has changed - you need to modify the
/boot/cmdline.txtaccordingly - put the new UUID there. You'll also have to modify the
/etc/fstabfile and add the replace the existing UUID with the new one.
You can find out the new UUID from the live cd by running
@mitu sorry I'm new to this can you explain exactly what I have to do?
@aussie-daredevil You have 2 partitions on the new disc. You'll need to mount both from the live cd and perform some modifications.
/bootfolder with the kernel and necessary config and firmware files. Open the
cmdline.txtwith an editor and replace the
UUID=<XYZ>part with the
UUID=<actual_uuid>, then save the file.
/filesystem. Open the the
/etc/fstabfile (it's a text file) with the same editor and replace the 2nd line with
<actual_uuid>should be replaced with the
/dev/sda2, which you can find out by running
blkidfrom the command line - it should print the UUIDs of all partitions.
@mitu can I rasbian?
@aussie-daredevil You'll have to be more specific, I can't guess from monosyllabic responses what are your intentions.
If you feel it's too complicated, then I recommend you install from zero on the new disk, resize the large partition with
gpartedfrom a live CD and then copy over your configs/ROMs/artwork/what have you.
@mitu what I was asking can I use rasbian to edit files but I have found that I cannot edit sda2/etc/fstab.txt as it says I do not have permission.
Is there another windows program I can use to edit this? Or another way to do it on rasbian?
@mitu and thankyou so much for your help, I've never used Linux before and have only been tinkering with the pi the last 5 days. So I'm a big arse noob atm lol.
@aussie-daredevil Then I recommend starting from scratch with the new disc, make sure it works, then transfer your files to it from your old drive - ROMs/artwork/etc. See the 2nd backup method explained in the docs - https://retropie.org.uk/docs/Updating-RetroPie/#making-a-backup-option-2.