Can I move a retropie install from a 32gb to 16GB sd card?
-
I've setup a retropie install on an old pi zero using a 32GB card. I've got everything working how I'd like and it's great. However, I'd rather not use the 32GB card now as I've found an old 16GB one and I'm using hardly any capacity as it is. I've only installed 5 NES games! Is it possible to move the entire install over to the smaller size card? Clone it for instance?
Any advice much appreciated.
-
I use Apple Pi Baker for Mac, and it has an option to shrink the sd backup to its minimum size (removing the free space) and then restoring the backup expanding it to the size of the target sd card.
I don't know what os you are using, but I think that these options are available also for similar tools on other systems. -
@gizmo90 said in Can I move a retropie install from a 32gb to 16GB sd card?:
any
How i do it is, make a backup of the SD card with whatever software you use.
And then use Pishrink https://github.com/Drewsif/PiShrink
If you dont have access to a linux based computer, you can use the smaller SD card first to run Pi OS or Twister on your Pi to use PiShrink with. -
Thanks for the reply everyone.
@crush Could you explain a little more on how to use pishrink in this instance? I've created an image of the 32gb install and copied it to a usb stick. I've put pi os on the 16gb card and have it running. I've attached the usb stick and can see the 32gb image fine.
How do I use pishrink now to compress the image file? And once that's done, do I just copy the resulting image file to the (formatted) 16gb card?
I've also tried installing pishrink and the installation fails unfortunately. Running this line gives an error 404.
wget https://raw.githubusercontent.com/Drewif/PiShrink/master/pishrink.sh -
@gizmo90 your url has a typo
drewif should be Drewsif
If you open that page and this page on the pi you can just copy and paste stuff.once installed, rightclick on the folder containing your image.
and select the option that says something like "open terminal here"
There type the following:sudo pishrink.sh yourimagefile.img yournewimagefile.img
That should shrink your image in a new file in the same folder.
when you put that image on your other SD, it will expand to fit the new SD and reboot again.[Edit] obviously change yourimagefile.img and yournewimagefile.img into names that fit your situation.
-
@crush That's great, got pishrink installed now. I can see it sitting in /home/pi
Ufortunately when I try to initiate it I get 'command not found' ?Could the pishrink not be being called globally? Can it only be run when you are in the /home/pi folder? Even when I am I still get 'command not found' ?
-
@gizmo90 said in Can I move a retropie install from a 32gb to 16GB sd card?:
Could the pishrink not be being called globally? Can it only be run when you are in the /home/pi folder? Even when I am I still get 'command not found' ?
Did you do the rest of the installation instructions?
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh chmod +x pishrink.sh sudo mv pishrink.sh /usr/local/bin
The first one downloads the script. The second one makes it executable. The third one moves it into your system path so it can be called globally. If you don't do that, you'll need to call it with the relative or absolute path, ex:
sudo /home/pi/pishrink.sh <options>
...or, if you're already in the same directory as it, use "
./
"sudo ./pishrink.sh <options>
...if you don't do the second part ("
chmod +x
"), then the file will not be executable and you'll have to specifically tell it to "bash" (process with the Bourne-Again SHell interpreter) the file:sudo bash /home/pi/pishrink.sh <options> # or if you're in the directory already: sudo bash pishrink.sh <options>
(You don't need to specify
./
when usingbash
if it's in the same folder already.)...but all this can be avoided if you just follow the instructions. Download the file,
chmod +x
the file, and then move the file to your system path. Then it can be called with a simplesudo pishrink.sh <options>
, no matter where you are in the filesystem. -
@sleve_mcdichael I'm an idiot, no I didn't! Got it working now and it compressed the.img perfectly. I installed it onto the 16gb card, booted up and it all works!
Thanks a lot everyone, couldn't have done it without the help received!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.