Although I've used lilo for over seven years and am familiar with it, I decided to take the plunge and give grub a try. Big mistake. On reboot after installation, I wound up with an error 22 message and a blinking cursor. Couldn't even get to a grub prompt to see what was going on. Wound up restoring my lilo from my mdv2007 install and creating an entry for mdv2007.1 there. Rebooted into mdv2007.1 without a problem but decided to investigate what went wrong with grub. Thought I'd pass along what I found as I've encountered the identical problem in debian based sidux.
This is a problem you may encounter if you have both pata and sata drives in your system and use grub. It is a problem with grub and not mandriva as the same problem has been reported on ubuntu:
https://bugs.launchpad.net/ubuntu/+source/grub/+bug/8497
and mepis:
http://www.mepis.org/node/12536
And I've seen the same thing on sidux.
Essentially, the problem arises from grub's attempt to identify and label the bootable hard drives on your system. When you have both sata and pata drives, this identification occurs differently at boot time than after the kernel is loaded. To illustrate, I have two pata hard drives on hde and hdg and two sata drives on sda and sdb. mdv2007.1 is installed sda12. During installation, grub designated sda as hd2 with root at (hd2,11) and that was reflected in menu.lst. I confirmed this again after I rebooted by running:
# grub
grub> find /boot/grub/stage1
and sure enough, it came back with (hd2,11).
I reinstalled grub but made a grub boot floppy so I could investigate things if I got another error 22. Sure enough, that's exactly what happened, error 22. Rebooted with the grub floppy I made and ran from the grub prompt:
grub> find /boot/grub/stage1
but this time it came back with (hd1,11). That, in a nutshell is the problem.
I believe, I found the source of the problem as well. By checking device.map, it is clear that with kernel loaded which is the state the system is in when grub is installed during the installation, the hard drives are enumerated as follows:
(hd0) /dev/hde
(hd1) /dev/hdg
(hd2) /dev/sda
(hd3) /dev/sdb
In short, the pata drives come first followed by the sata drives. However, at boot, the bios setup seems to control this enumeration. In my bios setup, I had the boot order for the hard drives set as follows:
hde
sda
hdg
sdb
and using my grub boot floppy, I confirmed that the enumeration from the floppy grub prompt was:
(hd0) /dev/hde
(hd1) /dev/sda
(hd2) /dev/hdg
(hd3) /dev/sdb
I could boot from the grub floppy with:
> root (hd1,11)
> kernel (hd1,11)/boot/vmlinuz root=sda12
> initrd (hd1,11)/boot/initrd.img
> boot
But running grub from a console after booting gave:
grub> find /boot/grub/stage1
(hd2,11)
I went back and changed the boot order in my bios setup to:
hde
hdg
sda
sdb
and booted with the grub floppy. Then the enumeration changed in line with mdv2007.1:
(hd0) /dev/hde
(hd1) /dev/hdg
(hd2) /dev/sda
(hd3) /dev/sdb
I booted back into mdv2007.1 reinstalled grub and rebooted. It finally worked.
The moral of the story, if you have both pata and sata drives and get an error 22 with grub, get ready to spend several hours playing with your new and improved Grand Unified Boot Loader.
[moved from software - arctic]