windows overwrote boot record

Derek Broughton news at pointerstop.ca
Mon Aug 25 20:04:31 UTC 2008


Karl Klinger wrote:

> Derek Broughton wrote:
>> Karl Klinger wrote:
>> 
>>> It looks like your partition table is messed up.  The extended partition
>>> should always be sda4.  This is my fdisk -l output:
>>>
>> Huh?  There's absolutely no reason that the extended partition needs to
>> be
>> sda4.  You simply make any one of the four available primaries extended.
>> 
>> I have _far_ more messed up partition tables than that :-)
> 
> Yes, I see now that this can be done, but the partitioners that I have
> used (cfdisk, the partitioner on the alternate install cd) always make
> the extended partition sda4 and the first logical partition sda5.

Any partitioner will try to do that.  Some partition programs seem to, at
least mildly, object to out-of-order partitions:

 $ fdisk -l
 ...
 Partition table entries are not in disk order

but I've never known that to cause a problem.

> Juan's fstab shows that this was the way his disk was originally
> partitioned:

Almost certainly.  I had two partitions on the system as delivered - Windows
and a Recovery partition, normally /dev/sda1 and /dev/sda2.  I shrank
Windows and made a third partition with the Ubuntu installer, which
_was_ /dev/sda4, in between 1 & 2.

> Reinstalling Windows must have changed the partition numbers.  This
> seems to confuse grub:
> 
>> grub> find /boot/grub/stage1
>>  (hd0,5)

Never in my experience.

As Nils points out, what's changed here is that a partition has been
deleted, and his real boot device is /dev/sda5, not /dev/sda6 - but that
won't matter to Linux because both necessary partitions are identified by
UUID in fstab, so we only need to fix the grub menu. 
-- 
derek





More information about the kubuntu-users mailing list