grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setup for LVM on RAID


From: Johannes Peeters
Subject: Setup for LVM on RAID
Date: Sun, 14 Oct 2007 23:22:13 +0200

Hi,

I am currently testing grub 1.95+20070604 (debian testing, but I also tried the latest CVS) with the following setup:
/dev/md0: raid1

lvm on this raid:
master: volume group
root: logical volume, mounted on "/"

This setup is working perfect with lilo 22.6, but, as I want to start using xen, I need the multiboot options from grub.

I tried the following steps to get my setup working, but when I rebooted my system, I got into the grub console and I have to change my root device myself to (master-root) as it is set to (md0). Once I set this root option, I can manually boot the system (see below).

master:~# grub-install --modules="configfile _linux linux pc ext2 raid lvm boot ls help" /dev/md0
grub-probe: error: Cannot detect partition map for master-root
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)   /dev/fd0
(hd0)   /dev/sda
master:~# grub-setup --verbose \(md0\)
grub-setup: info: prefix = /boot/grub
grub-setup: info: changing current directory to /dev/mapper
grub-setup: info: /dev/sda starts from 0
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: reading /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: reading /boot/grub/core.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: the size of hd0 is 83886080
grub-setup: info: setting the root device to `master-root'
grub-setup: info: opening the device `/dev/sda'
grub-setup: info: will embed the core image into after the MBR
grub-setup: info: dos partition is -2, bsd partition is -2, prefix is (md0)(master-root)/boot/grub
grub-setup: info: opening the device `/dev/sda'
grub-setup: info: opening the device `/dev/sda'
grub-setup: info: opening the device `/dev/sda'
grub-setup: info: opening the device `/dev/sda'
master:~#


After reboot:
grub> set
prefix=(md0)(master-root)/boot/grub
root=md0
grub>

Manually booting the system:
grub> set root=(master-root)
grub> linux /boot/vmlinuz-2.6.18-5-686 root=/dev/mapper/master-root
grub> initrd /boot/initrd.img-2.6.18-5-686
grub> boot

What can I do to get this working? grub-setup tells me that the root device will be master-root, which is correct. But once I reboot it is set to md0?

Kind regards,
Johannes Peeters





reply via email to

[Prev in Thread] Current Thread [Next in Thread]