-   Linux - Newbie (
-   -   boot fails when booting from lvm partition (

jlatl69 03-04-2006 08:43 PM

boot fails when booting from lvm partition
I am trying to convert my root partition to use LVM. I have the LVM set up and the root has been copied to the partition, but when I try to boot with the root in the LVM partition I get a system panic saying it cant mount the root partition.

Running on Slackware V10.2
Kernel Version is 2.4.31

I get the messages


VFS: Mounted root (ext2 filesystem)
VFS: Cannot open root device "3a00" or 3A:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 3a:00
My lilo.conf file is


image = /boot/vmlinuz
root = /dev/hdb1
label = Linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

image = /boot/vmlinuz
label = "LVM"
root = /dev/vg/root
initrd = /boot/initrd-lvm-2.4.31.gz
ramdisk = 4477
When I boot from the original partition I can mount /dev/vg/root (setup as Linux LVM) and access the data fine.

From what I have read the kernel should already include support for lvm so I did not apply any patches or recompile the kernel. The vmlinuz is the bare.i kernel from the distribution disk. Am I correct making this assumption?

Any help would be appreciated. Thanks.

comptiger5000 03-05-2006 02:06 PM

you can never have the root partition in LVM, and avoid putting it in software raid, although that is possible.

this doesn't work because it needs to access the root partition to get the lvm driver, so if it needs the driver to get the driver, and therefore can't get to the root partition, it doesn't work

jlatl69 03-05-2006 04:38 PM

I have the /boot partition set up separately as x2fs format from what I was reading in the HOWTO It sounded as though I could do this as long as the LVM support was in the kernel and the ramdisk that was loaded from the boot partition.

My disk is partitioned as so

/dev/hda 83 Linux
/dev/hdb 82 Linux swap
/dev/hdc 8e Linux LVM
I have the /boot in the /dev/hda with the kernel and the Ramdisk files there. Then I am trying to move everything else to the /dev/hdc partition (LVM).

I have a second disk (configured as 1 type 83 Linux partition)that I have the original install of the root (/) on

Just to make sure I understand what you are saying. I need to have the root on a linux (type 83) partition also (and I am guessing also leave the /proc and /dev there). then I should be able to move everything else (i.e. /usr /var etc.) to the LVM. Is the /bin and /sbin required for boot also or can I put them in the LVM?

I am installing on an old machine with smaller drives and the disk space is going to be pretty tight in order to install X and KDE. I would like the more flexible control of the drive space with LVM.

comptiger5000 03-05-2006 04:59 PM

you can, just make a seperate partition for / outside the lvm, you'll be fine


have to stay on the / partition, outside the lvm

lurker79 03-06-2006 04:09 AM

It is not usually a good idea to have / on an lvm partition, although if you do want it you need to make sure that your initial ramdisk image has all of the relevant lvm modules in it to be able to access your root filesystem. If you don't when you boot you will get a kernel panic with the message saying something like unable to find root filesystem.

jlatl69 03-06-2006 11:23 PM

ok, thanks all. I think I have a much better understanding now. Seems like a lot of trouble at best trying to get the root on LVM so I'll leave those in a normal ext2 partition and just move the /usr /opt /var etc to LVM

Thanks for all your help. ;)

comptiger5000 03-07-2006 06:23 AM

ok, although you should use ext3, its better at corruption recovery

All times are GMT -5. The time now is 11:33 PM.