I have this at the start up my setup script: sudo raspi-config --expand-rootfs Not all of raspi-config seems to be scriptable, but there's a bunch of stuff that is.
You can see it by examining the script (it's near the bottom) Disk /dev/mmcblk0: 7.4 Gi B, 7946108928 bytes, 15519744 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 Disklabel type: dos Disk identifier: 0x6f92008e Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 131071 122880 60M c W95 FAT32 (LBA) /dev/mmcblk0p2 131072 2658303 2527232 1.2G 83 Linux use e2fsck -f /dev/mmcblk0p2 to perform a file system check. rootfs-resize does not seem to work on SD cards 64GB in size. use e2fsck -f /dev/mmcblk0p2 to perform a file system check. rootfs-resize does not seem to work on SD cards 64GB in size.
Try using GParted to resize the "back end" of the extended partition. [[email protected] ~]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x0001bdaf Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 267266047 133120000 83 Linux /dev/sda3 267266048 280578047 6656000 82 Linux swap / Solaris /dev/sda4 280578048 976773119 348097536 5 Extended /dev/sda5 280580096 565252095 142336000 83 Linux Well, the fdisk sector idea was a bust. But I still would try tweaking the end of the extended partition with GParted and rounding it to cylinders. You mean it's inside the extended partition and follows the logical partition /dev/sda5.
Maybe shrink it by a tiny amount and choose the GParted option to round to cylinder. To clarify the terminology some (for me, mostly), the extended partition is /dev/sda4.
In my case however, I can't say that GParted never did any harm: adding an unallocated space that was in front of the extended partition made Fedora unbootable.
I was able to reinstall both the Windows Vista and grub boot loaders, and that solved my problem.
Changes will remain in memory only, until you decide to write them. Command (m for help): p Disk /dev/mmcblk0: 16.0 GB, 16012804096 bytes, 31275008 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: 0x000622ba Device Boot Start End Blocks Id System /dev/mmcblk0p1 * 2048 104447 51200 c W95 FAT32 (LBA) /dev/mmcblk0p2 104448 31275007 15585280 83 Linux Command (m for help): quit [[email protected] ~]# [[email protected] ~]# resize2fs /dev/mmcblk0p2 resize2fs 1.42.3 (14-May-2012) Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/mmcblk0p2 is now 3896320 blocks long. If you continue you ***WILL*** cause ***SEVERE*** filesystem damage. yes rootfs: recovering journal Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Free blocks count wrong (3453563, counted=3453559).
Note: If you have a third swap or other partition that you don't need any longer, you can remove that one too and use the disk space to extend you.Thanks for the suggestions, I just used the Gparted Live CD and created unallocated space "following" the extended partition, the operation only took 1 minute surprisingly, everything worked and I didn't encounter any problems as you expected.