Hello All,
I am trying to change my boot device from hd0 to hd1.
hd0(/dev/sda1) started failing so I moved my /root to hd1(dev/sdb1).
I added the new root to the menu.lst
###Don’t change this comment - YaST2 identifier: Original name: linux-2.6.25.20-0.1-Stefan2###
title Stefan2 – openSUSE 11.0 - 2.6.25.20-0.1
kernel (hd0,1)/boot/vmlinuz-2.6.25.20-0.1-Stefan2 root=/dev/sda2
initrd (hd0,1)/boot/initrd-2.6.25.20-0.1-Stefan2
I added
title Stefan3 – openSUSE 11.0 - 2.6.25.20-0.1
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.20-0.1-Stefan2 root=/dev/disk/by-id/scsi-SATA_WDC_WD3200AAKS-_WD-WCAPZ1701835-part2
initrd /boot/initrd-2.6.25.20-0.1-Stefan2
device.map
(hd0) /dev/sda
(hd1) /dev/sdb
cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 (hd0) (hd1,1)
setup --stage2=/boot/grub/stage2 (hd1) (hd1,1)
fdisk -l /dev/sda
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000be445
Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 2873 20972857+ 83 Linux
/dev/sda3 2874 121601 953682660 8e Linux LVM
fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003831a
Device Boot Start End Blocks Id System
/dev/sdb1 1 244 1959898+ 82 Linux swap / Solaris
/dev/sdb2 * 245 2677 19543072+ 83 Linux
/dev/sdb3 2678 38913 291065670 8e Linux LVM
grub-install
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> setup --stage2=/boot/grub/stage2 (hd0) (hd1,1)
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 (hd0)”… 15 sectors are embedded.
succeeded
Running “install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) (hd0)1+15 p (hd1,1)/boot/grub/stage2 /boot/grub/menu.lst”… succeeded
Done.
grub> setup --stage2=/boot/grub/stage2 (hd1) (hd1,1)
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)”… 15 sectors are embedded.
succeeded
Running “install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,1)/boot/grub/stage2 /boot/grub/menu.lst”… succeeded
Done.
grub> quit
looks all good to me.
init 0
remove hd0
machine will not boot. it seem that the install on /dev/sdb has not compleated corectly or the device map is not right.
I do have 4 more hd so the MBR could have been installed on one of them, non of them has a boot flag set.
OK NEXT step.
I pluged in the replacement hd (no partitions brand new)
Now I get Grub and I can select the boot image BUT it says it can not find “root=/dev/disk/by-id/scsi SATA_WDC_WD3200AAKS-_WD-WCAPZ1701835-part2”
which is wiered because that HD is still in the system.
I select the other menue entry which pointing to root=/dev/sda2
So now the /dev/sdb2 can bee seen as /dev/sda2
What am I missing?
I want to be able to boot of /dev/sda2 and /dev/sdb2 independently.
The idear is that I boot from /dev/sdb2
mount /dev/sda2 as /root_back , run a nighly rsync across after shutting down a few deamons. So when I have a problem with /dev/sdb2 I just boot of the other hd with the last backup on it.
you help is apriciated.
Stefan