Value out of range error
Hi Kevin, thanks for taking the time to write this script, however I'm having a problem with it, resizing Raspbian Jessie using a 8Gb SD card. The following is the result, but you will note as the script runs fdisk, I get a 'value out of range' message. If I reboot, the partitions are unchanged. Any help would be appreciated.
rpi-wiggle - v1.1 2012-09-24 ====================================================== Current Disk Info
Disk /dev/mmcblk0: 7.2 GiB, 7746879488 bytes, 15130624 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: 0xea0e7380
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 131071 122880 60M c W95 FAT32 (LBA) /dev/mmcblk0p2 131072 7684095 7553024 3.6G 83 Linux
Calculated Info: Disk Size = 7 gb Part Start = 131072s Part End = 13259263
Making changes using fdisk...
Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m for help): Partition number (1,2, default 2): Partition 2 has been deleted.
Command (m for help): Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): Partition number (2-4, default 2): First sector (2048-15130623, default 2048): Value out of range. First sector (2048-15130623, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (13259263-15130623, default 15130623): Last sector, +sectors or +size{K,M,G,T,P} (13259263-15130623, default 15130623): Last sector, +sectors or +size{K,M,G,T,P} (13259263-15130623, default 15130623): Do you really want to quit? Setting up init.d resize2fs_once script
System is now ready to resize your system. A REBOOT IS REQUIRED NOW! Press ENTER to reboot : \c
...A little more info.... if I examine my SD card in gparted, I see the following;
Unused 4Mb (first sector 0, last sector 8191) sdb1 19.89Mb of 60Mb used, leaving 40.11Mb free (fat16) (first sector 8192, last sector 131071) sdb2 3.21Gb of 3.6Gb used, leaving 399.32Mb free (ext4) (first sector 131072, last sector 7684095) unallocated 3.55Gb (first sector 7684096, last sector 15130623)
Paul
In fact the git pull request #1 sorts the problem. I'll leave this open as a reminder.