Copy Image file to same size SD card fails
-
Hi Guys.
This is my first post and want to thank everyone involved in making the software. Its good fun watching my kids enjoy the same games i did when i was their age.
Any ways...
I have several Pi3's and i have one setup pretty much how i want it and when i went to copy the image to another SD card the file is slightly large tehn the card i want to transfer to it and produces an error on the Win32DiskImager software. I know the file system is expanded on boot and since all SD cards vary in size it seems i cant just copy the image and load it to a new cards so each of my kids can have their own system. I searched around and i cant seem to find a way to remove the expanded file.
Is there a way to shrink the expanded file to make it a smaller? Don't really want to have to transfer roms, scrape and setup controllers and Kodi on every one separately. Was thinking this would be easy but i am hitting a wall. I have 32GB SD cards and using Windows Laptop to create and save the images.
Any help is greatly appreciated.
-
That's not as difficult but tooks a bit of time.
The easiest way is to extract the data needed and just add to your new installation.
You just have to secure your ROMS and yourretroarch.cfg
from /opt/retropie/configs/allRead ahead here:
https://retropie.org.uk/forum/topic/2593/updating-retropie-issue-2-6 -
Other method....
The complicated way - the unusal way - the cyperghost style :)Resize your root/ext4 partition:
There are serveral programms out there. Best is, use gparted from your PC and just resize the biggest partition. (Tried this long time ago)
You can do it manually with parted-command (never did that - but usually works, too)Okay... your root partition is a bit smaller now?
Good! Reboot your resized card with the RPi
Log into terminal, best with root (so you don't need the SUDO).
Type:fdisk -l
Now you will get something like that:
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 8192 124927 116736 57M e W95 FAT16 (LBA) /dev/mmcblk0p2 124928 7774207 7649280 3.7G 83 Linux
So MMCBLK0p1 is the Windows visible partion
So MMCBLK0p2 is our targetyou see, I only got a 4GB sdcard for backup reasons installed and my ROMS are located outside on a USB device.
So what we need? Just the Sectors.
Write down the 7774207 (your Sectorcount will be much more)
Now use the Linux Reader - it's linked in the first post.
Insert the SD to your PC
Start Linux Reader
You will see your MMC into Physical Devices
Make a left click on it, and a menu pops up, select CREATE IMAGE, click Cancel
Now activate "Region" and set STARTSECTOR=0 and ENDSECTOR=7774207 (again! That's my card.... verify YOUR card yourself!!!)Image URLs:
http://www.pic-upload.de/view-31250669/Bild2.png.html
http://www.pic-upload.de/view-31250668/Bild6.png.html
8tention! Forget one 7 > should be 7774207 guys :)
Again! That's my MFZB SD-card, check sector size on your own :p -
Another idea is rpiwiggle: https://github.com/dweeber/rpiwiggle haven't tried it but it looks like iy might work
-
@herb_fargus
That's col herb ...
Maybe you can combine rpiwiggle togehter with the Linux Reader.
The magic is, to create an image of a specific sector sizeSo
- Use rpiwiggle
- Use fdisk -l command
- Read max-sector size
- Backup with Linux Reader and readed sector size
UPDATE:
Be careful using rpiwiggle!
It may come to issues!Script was designed for use with Debian Wheezy so this should not be an issue if used as intended.
-
FWIW I tend to use this approach as I don't have a linux machine handy.
http://smartretro.co.uk/forums/viewtopic.php?f=3&t=58This could become a lot easier when this is released:
http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/ -
Well gParted is a Live Linux system :)
So part 1 is as I wrote - Resize Partition (maybe 0,5 Gigabyte)
On the gparted system you can also try to use the fdisk -l command... That should also work.
So you can also use Linux Reader for Windows and then create a 100% fitting image without chunk size calculation :)Nothing is easy :)
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.