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

Re: lvm and initrd

Does the system run on LVM2 w/o a custom compiled kernel? If so, then
this comment will not be helpful. If not, then ...

As I understand it, by default the Debian mkinitrd will create an
initrd based on the current root device. So, if you're using a non-LVM2
root device to build an initrd suitable for an LVM2 based root, you
need to either (a) chroot to what will be the LVM2 root device and then
build the initrd, or (b) change the config of mkinitrd. (b) is easier,
though I haven't been able to get it to work. (I didn't actually get
(a) to work either). Here is a link I found with some generally
relevant info:


For what it's worth, I was just struggling with root on RAID and I
could only get it to work by not using udev. I skirted the whole initrd
problem in this fashion:

o  Got system running w/ Debian kernel w/ root on ext3 (not raid)
o  Built my own kernel w/o an initrd; made sure everything needed for
root built in
o  Booted into root on raid
o  Re-installed Debian kernel just for fun; on install the initrd is
rebuilt, this time on the raid root device. Works fine.


--- Benedict Verheyen <Benedict.Verheyen@sjki.be> wrote:

> Hi,
> i installed Sarge and opted to have all partitions including root on
> lvm2.
> /boot is not on lvm2 but plain ext2.
> However when i try to compile my own kernel, the kernel is unable
> to mount /root.
> After i compile the kernel, i do this:
>     mkinitrd -k -o /boot/initrd-2.6.8 2.6.8.custom
> Then when booting, it loads the initrd ok and starts loading until
> this:
> ...
> device-mapper: 4.1.0-iotcl (2003-12-10) initialised:
> dm@uk.sistina.com
> Logging initialised at Fri Nov 5 14:23:12 2004
> Set umask to 0077
> Creating directory "/etc/lvm/archive"
> Creating directory "/etc/lvm/backup"
> Creating directory "/var/lock/lvm"
> Finding all volume groups
> No volume groups found
> pivot_root: No such file or directory
> /sbin/init: 426: cannot open dev/console: No such file
> Kernel panic - not syncing: Attempted to kill init!
> My grub looks like this:
> title      kernel 2.6.8
> root      (hd0,0)
> kernel   /vmlinuz-2.6.8 root=/dev/mapper/main-lv_root
> initrd    /initrd-2.6.8
> savedefault
> boot
> I tried with different kernels (2.6.8,2.6.9), tried different root
> devices 
> (/dev/main/lv_root, /dev/mapper/main-lv_root) but it doesn't seem to
> work.
> What am i doing wrong?
> I saw that there was a bug in initrd-tools regarding root & lvm2 but
> that is solved
> in the version that i'm running.
> Thanks,
> Benedict
> > ****** Message from InterScan E-Mail VirusWall NT ******
> ** No virus found in attached file noname.htm
> ** No virus found in attached file noname.htm
> This message has been scanned, and is intended to be virus-free.
> *****************     End of message     ***************

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Reply to: