Page 1 of 1

Leave some "slack" when expanding filesystems.

Posted: Sat Jul 27, 2013 9:59 pm
by ThunderStrike
I have used 8GB SDHC cards from 2 different manufacturers, and couldn't copy (full disk raw copy) my source card because the target card was a wee bit smaller.

I had to shrink the expanded source partition and copy the card by partion and not by device (full disk raw copy).

I suggest making the expanded partition a little smaller to simplify the task of making partition copies. The Raspberry Pi community can collect statistics on the "actual user-accesible" size of different SD cards.

Cheers,
ThunderStrike
YNWA JFT96

Re: Leave some "slack" when expanding filesystems.

Posted: Sat Jul 27, 2013 10:02 pm
by Mortimer
I think that is eminently a sensible idea. I don't think most people would miss a MB or two missing from the top, and if it makes transferring images from one card to another, I think it would be an easy trade-off.

Re: Leave some "slack" when expanding filesystems.

Posted: Sun Jul 28, 2013 9:19 am
by ghans
There is the rpi-wiggle utility for that.
Can't remember the author , though ...


ghans

Re: Leave some "slack" when expanding filesystems.

Posted: Sun Jul 28, 2013 10:46 am
by Mortimer
Maybe so, but the question is whether or not it would be sensible for raspi-config to not go right to the end of the card, but leave a little headroom. This would alleviate any confusion when a new user tries to transfer the image to another card they consider to be the same size, and it not working because of the variance in capacities between manufacturers.

Re: Leave some "slack" when expanding filesystems.

Posted: Sun Jul 28, 2013 4:05 pm
by pluggy
It probably wouldn't hurt to modify the standard images so the raspi-config expand rootfs script left a few MB of slack on an SD card, it would save a lot of requests for help on here. The real geeks who want every last drop could do it themselves.

Re: Leave some "slack" when expanding filesystems.

Posted: Sun Jul 28, 2013 4:13 pm
by Joe Schmoe
pluggy wrote:It probably wouldn't hurt to modify the standard images so the raspi-config expand rootfs script left a few MB of slack on an SD card, it would save a lot of requests for help on here. The real geeks who want every last drop could do it themselves.
Quite so. The real point of this thread is to try to get TPTB to integrate rpi-wiggle into the mainline distro(s). Note that rpi-wiggle seems to have some rough edges to it (based on their web page). I wouldn't feel confident using it in its present (unpolished) state.

Edit: (Once integrated) raspi-config could ask you if you wanted to "go all the way" - with the default being "no" (and possibly issuing a warning that if you do, you may live to regret it)

Re: Leave some "slack" when expanding filesystems.

Posted: Wed Oct 02, 2013 1:58 am
by cweveritt
This exchange sounds like it may be describing the problem that I have been having while trying to copy an 8gb SD which I bought preloaded with the NOOB image and then updated, wipi, camera, etc. Every way I tried failed. Most recently I have been trying using the dd command. Everything goes well, the numbers indicate a little difference in the sizes. When I move the restored SD over to the RaspberryPi and it boots up to the original NOOB setup thus leaving me starting from scratch again. Another point is that in the instructions two partitions are shown and my results show four partitions on both the original NOOB card (modified) and the image from the restored card.
Following is a before and after shot of the two images:

# ls
Bad_SD_Contents.odt Original_SD_Cont.odt Rpi_8gb_backup.img Rpi_8gb_failed_bkup.img

# fdisk Rpi_8gb_backup.img *******(This is a backup of the modified original)******

Command (m for help): p

Disk Rpi_8gb_backup.img: 7861 MB, 7861174272 bytes
4 heads, 16 sectors/track, 239904 cylinders, total 15353856 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ba6a2

Device Boot Start End Blocks Id System
Rpi_8gb_backup.img1 2048 2466796 1232374+ e W95 FAT16 (LBA)
Rpi_8gb_backup.img2 2473984 15353855 6439936 85 Linux extended
Rpi_8gb_backup.img5 2482176 2596863 57344 c W95 FAT32 (LBA)
Rpi_8gb_backup.img6 2605056 15353855 6374400 83 Linux

Command (m for help): q

# fdisk Rpi_8gb_failed_bkup.img ***(And this is a copy of the 2nd SD after loading it with the above image)***

Command (m for help): p

Disk Rpi_8gb_failed_bkup.img: 7822 MB, 7822376960 bytes
4 heads, 16 sectors/track, 238720 cylinders, total 15278080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ba6a2

Device Boot Start End Blocks Id System
Rpi_8gb_failed_bkup.img1 2048 2466796 1232374+ e W95 FAT16 (LBA)
Rpi_8gb_failed_bkup.img2 2473984 15353855 6439936 85 Linux extended
Rpi_8gb_failed_bkup.img5 2482176 2596863 57344 c W95 FAT32 (LBA)
Rpi_8gb_failed_bkup.img6 2605056 15353855 6374400 83 Linux