Need help booting into LVM root

I'm trying to boot an LVM-based root filesystem (btw, it's ext4 as well). I created a raw disk image out of spare space, made it a pv, created a vg from that, created a few lv inside of that, mounted them under /mnt/lvm and rsync'd -ax root over to them. I edited /etc/fstab to mount them instead of the straight partitions (/dev/rootvg/rootlv). I mkinitrd a new initrd file. I created an initrd disk image and copied my initrd to it. I put the initrd into place in the console and changed the root device to /dev/rootvg/rootlv (I tried /dev/mapper/rootvg-rootlv as well). It still doesn't appear to be able to access the root filesystem. This is all based on Fedora-11 32 bit. Any ideas? The reboot gives me this on the console:

SCTP: Hash tables configured (established 65536 bind 65536)

Using IPI Shortcut mode

registered taskstats version 1

XENBUS: Device with no driver: device/console/0

md: Waiting for all devices to be available before autodetect

md: If you don't use raid, use raid=noautodetect

md: Autodetecting RAID arrays.

md: Scanned 0 and added 0 devices.

md: autorun …

md: … autorun DONE.

RAMDISK: ext2 filesystem found at block 0

RAMDISK: Loading 32768KiB [1 disk] into ram disk… done.

kjournald starting. Commit interval 5 seconds

EXT3 FS on ram0, internal journal

EXT3-fs: mounted filesystem with writeback data mode.

VFS: Mounted root (ext3 filesystem) on device 1:0.

VFS: Cannot open root device "mapper/rootvg-rootlv" or unknown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions:

ca00 45875200 xvda driver: vbd

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Pid: 1, comm: swapper Not tainted 2.6.32-linode23 #1

Call Trace:

[] ? panic+0x42/0xf2

[] ? mountblockroot+0x158/0x26c

[] ? mount_root+0x46/0x5a

[] ? initrd_load+0x27e/0x381

[] ? prepare_namespace+0xe0/0x1a2

[] ? sys_access+0x1f/0x30

[] ? kernel_init+0x17b/0x195

[] ? kernel_init+0x0/0x195

4 Replies

I've tried this with Arch Linux and get the same problem.

Is anyone booting an LVM root? The profile dashboard makes it seem possible:
> Select the /dev/xvdX device to use as your root device, or provide a custom root device (useful for root LVM, etc).

Any ideas how?

Initially when I started using Linode I wanted to jump right into using an LVM root, but then I realized that I had a little to learn first. So instead I decided that I should just figure out how to boot my own custom kernel.

I started with Linode source http://www.linode.com/src, built it, and boot it. All worked well. So I decided to try my own kernel sources/configs. I have a much better understanding of how Linode's Xen configuration is working, but there are still a few missing pieces.

From looking at your boot-log, I'd guess that it cannot find your root, because it cannot read from your LVM. I haven't got much further than that myself, but I'm pretty certain that we probably need to make use of an initrd file.

If I make any headway, I'll let you know.

I managed to figure this out. I'll try and respond again with a link to guide.

I noticed after playing around with PVGRUB, that it kept looking for '(hd0)/boot/grub/menu.lst' so I figured I'd give it that. I created a filesystem directly on a disk, then I copied my /boot to it's /boot. I had to ensure that the target file system still contained a /boot directory. Then in my /boot/grub/menu.lst, I pointed it to root (hd1,0). hd1,0 is a second drive containing my real /boot partition.

So I started up my Linode with /dev/xvda being my boot-disk and /dev/xvdb containing two slices one for /boot and one for lvm. This way I still have a bootable system if I remove /dev/xvda.

Like I said, I'll try to provide more details later.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct