Blew away my partition table

J. Epperson Dell at
Sun Jul 4 11:49:59 CDT 2010

On Wed, June 30, 2010 09:31, J. Epperson wrote:
> On Tue, June 29, 2010 22:16, Jefferson Ogata wrote:
>> On 2010-06-30 01:53, J. Epperson wrote:
>>> On Tue, June 29, 2010 21:27, Jefferson Ogata wrote:
>>>>> Number  Start       End         Size        Type     File system
>>>>> Flags 1      63s         401622s     401560s     primary  ext3
>>>>> boot 2      401625s     139299608s  138897984s  primary  ext3 3
>>>>> 139299616s  143380124s  4080509s    primary               swap
>>>> I would say those end sectors on partitions 1 and 2 should be one
>>>> less than the following partition's start sector. The end sector of
>>>>  partition 3 looks correct; though the last sector on the disk is
>>>> 143380479, when you round down to a cylinder boundary you end up at
>>>>  143380124.
>>> I was thinking the same thing, but that's what the parted rescue
>>> "found", so I assumed it was correct.  Looking at another F12 system,
>>>  what you say is how that one is.  Not sure what to do, try it as is
>>> or make the adjustment.  I do notice from the other system that I
>>> should probably mark the swap as FS type linux-swap(v1).  The other
>>> system looks like:
>> I don't think it would actually matter with partition 1. If your
>> filesystem has a 2kB or 4kB block size, then those extra 2 sectors
>> won't ever be addressed. With partition 2, however, the additional 7
>> sectors extend the volume by one or two filesystem blocks (with 3 extra
>> sectors on the end).
>> I would go ahead and extend the partitions to the n-1 values. It's
>> always safe to have a filesystem on a block device that is larger than
>> the filesystem, but the converse is not true. You can also check the
>> superblock with tune2fs -l to see how big the filesytem thinks the
>> block device is. "Block count" * "Block size" / 512 should be <= the
>> number of sectors.
> I understand and will take that advice.  Hilariously, although gparted
> blithely let me blow away the previous partition table without a whimper
> and parted let me build a new one with the partitions mounted, parted now
>  refuses to let me adjust the partition end points because they are
> mounted.  I suppose I could blow the whole thing away again and redo from
>  scratch, but I think I'm going to boot rescue and do with it with them
> not mounted.

Just got around to doing the live boot and making the adjustments
suggested by Jefferson Ogata.  I ended up removing the partitions and
adding back with correct end points rather than using "move" in parted. 
All is well.

I did have to manually redo swap after reboot with:
mkswap -c -U<my_uuid> /dev/sda3
with uuid gleaned from /etc/fstab.

Thanks to all who offered help, and particularly to Jefferson Ogata and to
Bond Masuda.  Happy Fourth of July.

More information about the Linux-PowerEdge mailing list