grub-devel
[Top][All Lists]
Advanced

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

lvm does not work when included in core.img


From: Jan Nieuwenhuizen
Subject: lvm does not work when included in core.img
Date: Sat, 08 Dec 2007 13:30:32 +0100

Hi,

I'm trying out Grub2 to for a setup with root on lvm, and it
almost works :-) (grub2 looks great, btw!)  If I install grub on a
non-lvm partition without lvm preloaded in core.img, it works
fine.  It looks as if the lvm module is defunct when it is loaded
from core.img: ls shows no lvm devices.

Whenever I `insmod lvm' after grub starts (ie: from the grub
rescue command line reading from a non-lvm partition, or from
within grub.cfg with grub's root and grub.cfg on a non-lvm
partition), ls will show my lvm devices.

Here is what I do

    grub-mkimage --output=/boot/grub/core.img lvm ext2 pc gpt biosdisk
    grub-setup --root-device='(lvmraid-lvm0)' '(hd0)'

(no errors)

    mount |grep '/ '
    /dev/mapper/lvmraid-lvm0 on / type ext3 (rw,errors=remount-ro)

(reboot)

    grub rescue> set
    prefix=(lvmraid-lvm0)/boot/grub
    root=lvmraid-lvm0
    grub rescue> insmod normal
    error: unknown device
    grub rescue> lsmod
    Name  Ref Count  Dependencies
    biosdisk 1
    gpt 1
    pc 1
    ext2 1 fshelp
    fshelp 2
    lvm 1
    grub rescue> ls
    (hd0) (hd0,1) (hd0,5) (hd0,6) (hd0) (hd1,1) (hd1,5) (hd1,6)
    grub rescue> rmmod lvm
    grub rescue> insmod (hd1,1)/boot/grub/lvm.mod
    grub rescue> ls
    (lvmraid-lvm0) ...
    grub rescue> insmod normal
    grub rescue> normal

and the menu appears.

Any ideas?  I'm using grub-pc 20071101-CVS from Ubuntu (on x86_64),
but I also tried a core.img built using today's CVS.

Greetings,
Jan.


/boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automaticaly generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=2
set timeout=5
set root=(lvmraid-lvm0)
font (lvmraid-lvm0)/usr/share/grub/unifont.pff
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal gfxterm
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, linux 2.6.22-14-generic" {
        linux   (lvmraid-lvm0)/boot/vmlinuz-2.6.22-14-generic 
root=/dev/mapper/lvmraid-lvm0 ro 
        initrd  (lvmraid-lvm0)/boot/initrd.img-2.6.22-14-generic
}
menuentry "Debian GNU/Linux, linux 2.6.22-14-generic (single-user mode)" {
        linux   (lvmraid-lvm0)/boot/vmlinuz-2.6.22-14-generic 
root=/dev/mapper/lvmraid-lvm0 ro single 
        initrd  (lvmraid-lvm0)/boot/initrd.img-2.6.22-14-generic
}
menuentry "Debian GNU/Linux, linux 2.6.20-16-generic" {
        linux   (lvmraid-lvm0)/boot/vmlinuz-2.6.20-16-generic 
root=/dev/mapper/lvmraid-lvm0 ro 
        initrd  (lvmraid-lvm0)/boot/initrd.img-2.6.20-16-generic-lvm0
}
menuentry "Debian GNU/Linux, linux 2.6.20-16-generic (single-user mode)" {
        linux   (lvmraid-lvm0)/boot/vmlinuz-2.6.20-16-generic 
root=/dev/mapper/lvmraid-lvm0 ro single 
        initrd  (lvmraid-lvm0)/boot/initrd.img-2.6.20-16-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        linux   (lvmraid-lvm0)/boot/memtest86+.bin
}
### END /etc/grub.d/20_memtest86+ ###

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

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