recent kernel upgrades damage mbr

Gene Heskett gene.heskett at verizon.net
Wed Jun 18 01:56:28 UTC 2008


On Tuesday 17 June 2008, Mikkel L. Ellertson wrote:
>Gene Heskett wrote:
>> On Tuesday 17 June 2008, M A Young wrote:
>>> On Tue, 17 Jun 2008, Maurizio Marini wrote:
>>>> I would advice any list member that it is in the wild a issue regarding
>>>> grub and mbr.
>>>
>>> I don't know if this is relevant, but F8 grub (unless the latest update
>>> has been written to the boot sector) can't cope with filesystems created
>>> on F9 because of the inode size change. So it is definitely a good idea
>>> to upgrade grub if you are upgrading.
>>>
>>> 	Michael Young
>>
>> Which may be a good idea, Michael, but does this require the silent
>> re-writing of the mbr to accomplish this?  For existing, already setup and
>> working drives, I don't think so.
>
>Yes, it does require re-writing the MBR. This is because Grub stage
>1 is in the MBR, and it needs to know where on the disk Grub stage
>1.5 is. When you upgrade Grub, the location changes. Stage 1.5 is
>the part of Grub that know how to read file systems, and can then
>load the rest of Grub. Remember, all stage 1 can do is load a chunk
>of code from a specific location on the disk, and the location is
>part of the code stored in the MBR when you install/upgrade Grub.
>Why would you think that upgrading the boot loader would not
>re-write the MBR?
>
>Mikkel

Well, considering this machine has to have a customized device.map, one which 
grub will cheerfully wipe, and has once already, replacing it with its own 
version, effectively swapping /sda, /sdb and /sdc around, and totally 
preventing a boot cuz then the bios cannot see the correct drive.  This bios 
doesn't know a thing about how to boot from a sata drive on an accessory 
controller.  You can call it /dev/sda all you want once linux is running I 
guess, but if the bios can't see it to boot from it, which it cannot, well, you 
get the picture I hope.

So yes, if it silently rewrote the mbr, it will just as silently rewrite the 
device.map, and this list will, whenever I do manage to get it booted again, 
hear from one very unhappy camper.

So thanks for the warning, I'm off to dd a backup of the mbr and /boot/grub to a 
usb key and to what is now /dev/sdc in hopes I can recover from such a 
boneheaded 'upgrade'.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
I was at this restaurant.  The sign said "Breakfast Anytime."  So I
ordered French Toast in the Rennaissance.
		-- Steven Wright




More information about the fedora-list mailing list