[Mageia-dev] Questions on dualbooting/grub/bootloader-utils

JA Magallón jamagallon at ono.com
Fri Jan 18 13:06:00 CET 2013


Hi...

I have a curious problem...
I have a box with tow drives, the first one has Windows7 and the second
Mageia Cauldron.
I tweaked the W7 bootloader to add an entry for the second drive with EasyBCD
(it gets wrong the hd1,1 part for its grub entry, it shoud be hd1,0, but that
is another story...).

I can boot Mageia from W7 bootloader, so my linux disk is sdb, and win
is sda. Root is right as it should be, /dev/sdb1:

direwolf:~# lsscsi
[0:0:0:0]    cd/dvd  HL-DT-ST DVD-RAM GH22NP20 2.00  /dev/sr0
[2:0:0:0]    disk    ATA      ST3400833AS      3.AA  /dev/sda
[3:0:0:0]    disk    ATA      ST3250310AS      3.AA  /dev/sdb

direwolf:~# df
Filesystem     Type      Size  Used Avail Use% Mounted on
rootfs         rootfs    244G  6.1G  226G   3% /
devtmpfs       devtmpfs  1.6G     0  1.6G   0% /dev
tmpfs          tmpfs     1.6G   87k  1.6G   1% /dev/shm
tmpfs          tmpfs     1.6G  877k  1.6G   1% /run
/dev/sdb1      ext4      244G  6.1G  226G   3% /
tmpfs          tmpfs     1.6G     0  1.6G   0% /sys/fs/cgroup
tmpfs          tmpfs     1.6G   13k  1.6G   1% /tmp
/dev/sda2      fuseblk   400G  134G  267G  34% /media/win

I rewrote GRUBs device.map like:

(hd0) /dev/sda
(hd1) /dev/sdb

and menu.lst to use (hd1,0) as root.

But every time I install/update a kernel, GRUBs files get rewritten to invert
the disk mapping, so (hd0) is sdb, and menu.lst changed to boot from (hd0,0),
and install.sh to write grub on hd0.
But that settings do no work on boot, after EasyBCD chainloads to second drive,
it is still the _second_ drive...and grub runs to hd0 to look for kernel/initrd...
AFAIK, the map hd0->sdb is only usefull for grub installation, once the boot
sector is stored it is just something like 'ask bios which is the first drive',
so it fails.

Why do bootloader-utils (I think?) change device.map, menu.lst settings ?
Why forces the boot disk to be always hd0 ?
Is there anyway to tell them I dont want to change anything ?

TIA

PD: is there an easier way to tell 'boot from the second drive' in the
Win7 boot menu than using EasyBCD (I think it is doing some things not so well,
like numbering first partition in second drive as hd1,1 instead of hd1,0...).

-- 
J.A. Magallon <jamagallon()ono!com>        \               Winter is coming...


More information about the Mageia-dev mailing list