cannot get 2nd partition to boot with grub legacy and 12.1

Hello,
I am using openSUSE 12.1 on my desktop, and I have my hard drives
partitioned like this (I will only write the pertinent ones):

/dev/sda2 and /dev/sdb2 are in RAID 1 mirror as /dev/md0. /dev/md0 has
the label “root”

In the extended partition:
/dev/sda5 and /dev/sdb5 are in RAID 1 mirror as /dev/md2. /dev/md2 has
the label “AltOldLinuxRoot”

My goal is to be able to boot from /dev/md2 just like I do from
/dev/md0. After I have made this work, I will install 12.2 on /dev/md0.

Here is what is happening. I set up my menu.lst file as follows:


# Modified by YaST2. Last modification on Sat Jul 21 11:13:08 PHT 2012
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are
not able to recognize it (e.g. change of flavor or strange install order
) it i as fallback installation parameters from /etc/sysconfig/bootloader

default 0
timeout 8
gfxmenu (hd1,1)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 12.1 - 3.1.10-1.16
root (hd1,1)
kernel /boot/vmlinuz-3.1.10-1.16-desktop
root=/dev/disk/by-label/root resume=/dev/disk/by-label/swap2
splash=silent quiet  showopts vga=0x317
initrd /boot/initrd-3.1.10-1.16-desktop

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1 - 3.1.10-1.16
root (hd1,1)
kernel /boot/vmlinuz-3.1.10-1.16-desktop
root=/dev/disk/by-label/root showopts apm=off noresume edd=off
powersaved=off nohz=off highres=off processo_cstate=1 nomodeset
x11failsafe vga=0x317
initrd /boot/initrd-3.1.10-1.16-desktop

###George's option on /dev/md2 ###
title openSUSE 12.1 on /dev/md2
root (hd1,4)
kernel /boot/vmlinuz-3.1.10-1.16-desktop
root=/dev/disk/by-label/AltOldLinuxRoot resume=/dev/disk/by-label/swap2
splash=silent quiet  showopts vga=0
initrd /boot/initrd-3.1.10-1.16-desktop

You can see that the first option boots from the 2nd partition on the
RAIDed hard disks (the 1st partitions are swap). Also note that the
root= command boots “by-label”, which does not cause me any problem. I
also regularly suspend to RAM, and the resume from swap2 also seems to
run very smoothly.

I do not know how grub legacy looks at RAIDed disks, but I note that the
root (hd1,1) command does not seem to have a problem, and my mdadm
–detail command gives a clean assessment of /dev/md0.

I have copied the entire root directory from /dev/md0 to /dev/md2, (I
also did this on my laptop, and it worked, but it doesn’t have RAID) so
that I would have a 2nd root partition with 12.1 installed on it. Then I
went into grub and ran the following commands:


grub> find /boot/grub/stage1
(hd0,1)
(hd0,4)
(hd1,1)
(hd1,4)
(hd1,5)

grub> root (hd1,4)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1,4)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1,4)"... failed (this is
not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd1,4)"... failed (this is
not fatal)
Running "install /boot/grub/stage1 (hd1,4) /boot/grub/stage2 p
/boot/grub/menu.lst "... succeeded
Done.


So, I shutdown my machine, and rebooted. On the multiboot selection
screen, I selected the 3rd option, and does the following. (I had to
take a picture, as I cannot copy and paste this)


doing fast boot
Creating device nodes with udev
Trying manual resume from /dev/disk/by-label/swap2
Invoking userspace resume from /dev/disk/by-label/swap2
resume: libcrypt version: 1.5.0
Trying manual resume from /dev/disk/by-label/swap2
Invoking in-kernel resume from /dev/disk/by-label/swap2
Waiting for device /dev/disk/by-label/AltOldLinuxRoot to appear:
.....^...........Could not find /dev/disk/by-label/AltOldLinuxRoot.
Want me to fall back to /dev/disk/by-label/root? (Y/n)
y
....<there might have been something else here after the answer>
Waiting for device /dev/disk/by-label/root to appear: ok

And then the machine boots up from /dev/md0.

I tried to go into grub and run the same commands manually just to see
if I could learn anything, but I get the same results. I double-checked
my labels:


linux-aw90:/home/george # blkid /dev/md0
/dev/md0: LABEL="root" UUID="609dd2ca-2e76-4394-ab63-ac392db6c838"
TYPE="ext4"
linux-aw90:/home/george # blkid /dev/md2
/dev/md2: LABEL="AltOldLinuxRoot"
UUID="becafd62-8406-413c-8d5b-eef49f403fba" TYPE="ext4"
linux-aw90:/home/george #

I even tried copying the UUID and putting it into the menu.lst file
instead of the label, and it always does the same thing. On boot up, it
cannot find the device.

What can I do to be able to select the 3rd option and make the machine
boot up?

Thanks,
G.O.


G.O.
Box #1: 12.1 | KDE 4.8.5 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB
Box #2: 12.1 | KDE 4.9.1 | AMD Athlon X3 | 64 | nVidia C61 GeForce
7025 | 4GB
Laptop: 12.2 | KDE 4.9.1 | Core i7-2620M | 64 | Intel HD Graphics 3000
| 8GB

By default only MD devices for current root, swap and resume are started in initrd. You are using initrd from your old system, so it starts only /dev/md0. Try creating another initrd using “mkinitrd -d /dev/disk/by-label/AltOldLinuxRoot” and using it to boot from alternative partition.

On 10/06/2012 01:26 PM, arvidjaar wrote:

By default only MD devices for current root, swap and resume are started in initrd. You are using initrd from your old system, so it starts only /dev/md0. Try creating another initrd using “mkinitrd -d /dev/disk/by-label/AltOldLinuxRoot” and using it to boot from alternative partition.

That was it - I created the new initrd for the partition, and it started up! Thank you very much!

G.O.