Friday, 25 January 2008

kubuntu feisty ahh ohhh .... ARGH!

After bedtime songs over (I peeped in - Maeve, Airport up in Knock - Kate, Does God have a name) Maeve directs me to go on computer. Unusual! Fionn out residents meeting. So well I _have_ been meaning to backup photos and get video upload and editing working so I toddle over, fire in kubuntu live CD and after a little clicking go and install. I see qtparted and lots of nice things so I can probably recover if something goes wrong.

BTW, need to update at this stage as SuSE 9.1 even after kernel and driver upgrades and reconfig cannot access new SATA DVD/RW and usb driver hangs/goes ultra-very-slow when communicating with HD camcorder. And of course have reached limit of adding bleeding edge versions of various libs built from source in order to get later versions of anything (Wesnoth :) Scribus/Inkscape ...)

So 1st reboot later and ARGH! Blinky cursor top left of black blank screen where grub should be starting up. NOOOOOOOOOOOOOOOOOOOOOO!!!!!!

Typical. Plus ca change ... PAS! :)
Redhat install pre-1998 involved lilo loopiness first and then every teeny step of the way needed configuring and persuading (keyboard, mouse, graphics, sound, modem, ...)
SuSE 9.1 install maybe 2002/3 was much easier. Resized an ntfs windows partition and grub did everything right. Had fun with Nvidia 3D gfx drivers (Makefile edits).

After rebooting with live CD lots of times, reading up on grub/kubuntu install problems (quite possibly down to sata handling) poking at grub. retrospectively backing up mbrs of every partition. At about 4:30am I get a grub menu BAUGH!! Of course nothing boots but I can quickly see hd0 seems to be sdb not sda and vice-versa for hd1 and sda so another liveCD boot, edit grub manu.lst and YAY! can boot new ubuntu. And YAY! boot old SuSE 9.1 but urk! can't boot windows?
Install install install stuff on ubuntu.
Kids educational and games.
Graphics, some music and video edit.

I hear ... something beeping beeping beeping ... waurgh! It's my alarm clock.
Glance at clock .... 7am!! Ach jaypers! I leg it to spare bed and crash.
Fionn up with kids, I'm really cold during getting ready/breakfast.
Galke force winds.
There's been crash on M50 and traffic is CrAzY can see it backing up in our estate.
All Leopardstown road is jammed, lots of N11 much busier than usual and around port too.
Windy but grand and dry and not cold really for motorbiking. Lots of motorbikes/scooters around.

TODO: 3D/nvidia setup, java+flash+licenced extras around system, transfer photos and music (or ...), transfer video, backup & setup editing.
Installer doesn't recognise SATA disks as primary.
Grub installs to wrong drive's MBR in default install. No way to change in standard installer.
grub guessed BIOS disk order incorrectly
grub uses wrong bootparameters with sda after install

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.


No comments: