You are not logged in.

#1 2012-11-23 08:13:05

whudwl
Member
Registered: 2012-11-23
Posts: 4

arch linux installed on LVM won't boot

My hard disk has only 1 partition.
I created 1 volume group and 1 logical volume on it.
my fstab looks like this:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
# UUID=7e4cc742-0eda-4a69-8357-4b769cd51520
/dev/mapper/vg000-lv000	/         	ext4      	rw,relatime,data=ordered	0 2

I configured /etc/mkinitcpio.conf as following and ran mkinitcpio -p linux again:

MODULES="dm_mod"
HOOKS="base udev usb lvm2 filesystems"

After installation, I rebooted the system, selected the 1st entry in grub menu, the screen shows:

Loading Linux core repo kernel ...
Loading initial ramdisk ...

then the following errors occured:

ERROR:device '/dev/mapper/vg000-lv000' not found. Skipping fsck.
ERROR:Unable to find root device 'dev/mapper/vg000-lv000'

Could anybody please help?
PS: I then rebooted to arch-linux using cd, I noticed that /dev/mapper/vg000-lv000 was not there. I had to use vgchange -ay vg000 to make it appear. Could this be related to the ERRORS?

Last edited by whudwl (2012-11-23 08:14:47)

Offline

#2 2012-11-23 12:15:38

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: arch linux installed on LVM won't boot

whudwl wrote:

PS: I then rebooted to arch-linux using cd, I noticed that /dev/mapper/vg000-lv000 was not there. I had to use vgchange -ay vg000 to make it appear. Could this be related to the ERRORS?

This is how it should work.

You rebuilt the initramfs after adding the lvm2 to the mkinitcpio.conf, yes?

This is what the HOOKS array looks like in my mkinitcpio.conf (you don't need the encrypt, or the usb)

HOOKS="base udev autodetect pata scsi sata keymap usb encrypt lvm2 filesystems usbinput fsck"

I do not have dm_mod in my MODULES array, however you may want to add "dm-snapshot" that way you can boot into an LVM snapshot if you like.

I don't remember if I put these in the MODULES array for the LUKS or for the LVM but it could not hurt to add them.
"ata_generic ata_piix nls_cp437 ext4"


One other note, on my Arch server/router with LVM. sometimes I get that error your getting if I don't allow GRUB to timeout. I think that mothermoard is just like slow to find the drive.

Last edited by hunterthomson (2012-11-23 12:33:16)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#3 2012-11-26 03:06:53

whudwl
Member
Registered: 2012-11-23
Posts: 4

Re: arch linux installed on LVM won't boot

Thanks, hunterthomson.
I have managed to make it work.
It turned out that I had 2 lines of "HOOKS=..." in my mkinitcpio.conf. 
The 1 line looks like this

HOOKS="base udev usb lvm2 filesystems"

The other line at the end of the file looks like this:

HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck"

I merged them and the system booted.

Offline

#4 2012-11-26 03:39:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: arch linux installed on LVM won't boot

Is your hard disk attached via usb?  If not, you did not have the proper modules for the intramfs to access the hard disk itself.  You had it set up so that it could boot from a usb device, but not an internal device.  You should have read the comments for each of those examples.  It explains pretty cearly what each example would be used for.


Edit: I use lvm and my mkinitcpio.conf HOOKS line looks like this:

HOOKS="base udev autodetect sata lvm2 filesystems fsck timestamp" 

My SSD's are connected via SATA III, the lvm2 hook is obvious, the filesystems load the ext4 module (all filesystems are ext4), fsck adds fsck and fsck.ext4, timestamp makes 'systemd-analyze' able to tell you how long it takes the initramfs and kernel to load individually instead of together.  base should always be there, and first (unless you really really know what you are doing), udev adds... udev, and autodetect tries its best to strip everything you don't need for your particular system.

For info on a paritcular hook, use the -H option with mkinitcpio. (ie. 'mkinipcio -H lvm2').  There is also a fantasticlly informative wiki page about mkinitcpio.

Last edited by WonderWoofy (2012-11-26 03:44:40)

Offline

Board footer

Powered by FluxBB