[SATLUG] Fixing a partition table
bruce.dubbs at gmail.com
Wed Aug 19 21:47:56 CDT 2009
Henry Pugsley wrote:
> On Wed, Aug 19, 2009 at 7:12 PM, Bruce Dubbs<bruce.dubbs at gmail.com> wrote:
>> Disk /dev/sda: 320.0 GB, 320072933376 bytes
>> 255 heads, 63 sectors/track, 38913 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>> Disk identifier: 0x00000080
>> Device Boot Start End Blocks Id System
>> /dev/sda1 * 1 13 104391 83 Linux
>> /dev/sda2 14 1229 9767520 83 Linux
>> /dev/sda3 1230 1594 2931862+ 82 Linux swap / Solaris
>> /dev/sda4 1595 5422 30748410 5 Extended
>> /dev/sda5 1595 2900 10490413+ 83 Linux
>> /dev/sda6 2901 4206 10490413+ 83 Linux
>> /dev/sda7 4207 5422 9767488+ 83 Linux
>> On the line /dev/sda4, I need to get the End cylinder to be 38913 and the
>> Blocks adjusted accordingly.
>> Does anyone know how to do this without destroying whats on partitions 5, 6,
> You should be able to use GParted to resize sda4, then resize 5, 6,
> and 7 inside of it. You can use a LiveCD or if these are non-system
> partitions, just boot into single user mode and run parted from there.
> Of course if there is no data at all on those partitions, it is just
> as fast to delete and recreate them.
Thanks Henry. I thought about it and just used fdisk. I deleted partitions 4-7
and then recreated the proper extended partition. Then I recreated partitions
5, 6, and 7 with the same cylinder boundaries.
From there I created partition 8 and wrote the partition table. That worked
after I did a partprobe to recognize sda8. I haven't rebooted yet, but I'm
fairly confident the partition table will be OK.
More information about the SATLUG