User avatar
ThunderStrike
Posts: 8
Joined: Wed Sep 19, 2012 7:16 pm

Leave some "slack" when expanding filesystems.

Sat Jul 27, 2013 9:59 pm

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

User avatar
Mortimer
Posts: 924
Joined: Sun Jun 10, 2012 3:57 pm

Re: Leave some "slack" when expanding filesystems.

Sat Jul 27, 2013 10:02 pm

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.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

ghans
Posts: 7878
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Leave some "slack" when expanding filesystems.

Sun Jul 28, 2013 9:19 am

There is the rpi-wiggle utility for that.
Can't remember the author , though ...


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
Mortimer
Posts: 924
Joined: Sun Jun 10, 2012 3:57 pm

Re: Leave some "slack" when expanding filesystems.

Sun Jul 28, 2013 10:46 am

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.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Leave some "slack" when expanding filesystems.

Sun Jul 28, 2013 4:05 pm

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.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Leave some "slack" when expanding filesystems.

Sun Jul 28, 2013 4:13 pm

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)
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

cweveritt
Posts: 5
Joined: Wed Oct 02, 2013 12:05 am

Re: Leave some "slack" when expanding filesystems.

Wed Oct 02, 2013 1:58 am

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

Return to “General discussion”