Comment 27 for bug 32357

Revision history for this message
James Coleman (jamesc-dspsrv) wrote :

Same problem for me feisty 7.04. Two SATA drives sda and sdb. Dell optiplex desktop.
There seem to be a few problems for users coming up related to grub + sata difficulties
and the issue seems to be ongoing so I'll just add my piece.

bios before was booting from hd0 (suse + grub)
kubuntu new installed on sdb, wrote grub mbr to hd0, sdb was unformatted before install
After kubuntu install sdb bios was looking for hd1 mbr only? Boot hung.

After woe and wailing and gnashing of teeth wrote kubuntu sdb grub mbr to hd1
(in grub root(hd1,1) setup(hd1)) and got a grub menu YAY. But nothing worked.
Weirdly could see sdb was now hd0 and sda was hd1.
So if boot kubuntu live cd grub hd0 = sda, hd1 = sdb.
But in grub from bios boot hd0 = sdb (disk booting from) and hd1 = sda.
Swap hd0<->hd1 in menu.lst

Also the os scan could see suse and windows on sda but entry for suse was not added in kubuntu's menu.lst.

So ... hurmmm. What should the grub install do?
The grub setup(hd0) write by kubuntu gui install flashed up very fast and I didn't see it.
Write to hd0 or hd1 ? If I think you can't trust bios
I think it could have some helpful things added:
 1. make a backup of any mbr it is writing over, put it in /boot/grub/backup_mbr_xxxx (and rotate)
     (consider also backup of all partition mbr areas - user would appreciate that if they have to start
      running grub install themselves)
 2. if kubuntu successfully boots from install mark grub as having a successful boot
 3. If user has come back in on live CD and there is an mbr backup then options to
     restore these would be nice (display options if advanced user OR if user has come back and
     a successful boot has not happened).
 4. If user has come back in on live CD and there is no grub successful boot mark then ... ... ?
     offer option to audit hardware/software and send report somethere?
 5. If there is another grub ... play nice, warn user. Can't cover all options but it would be nice.

bloat bloat bloat :) but in the name of user-friendliness and that's what the grub install intends?

I think the bios behaviour is odd.

To handle bios weirdness I'd guess after any partition editing a reboot would have to be done (YEUCH!) and then the assigned handles would probably be correct so that grub install could run and be reasonably sure the handles have not changed.

Otherwise write grub mbr to all disks seen? Especially if have just formatted a disk ...
In my case the sdb mbr was left uninitialised so when it was attempted to boot from by bios it hung.
If a grub mbr was sneakily written to new disks it could save hassle for a few people.

But grub is clever and ?should?/could be made to be a bit more flexible?
i.e. if (hd0,x)/boot/grub/menu.lst not found then look for it on (hd1.x) (hd2.x) ... ?
Maybe that is hard to do.

James.