Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 84242

Summary: LVM not started until after checkroot (fails if / is on LVM)
Product: Gentoo Linux Reporter: Nathaniel McCallum (RETIRED) <npmccallum>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED DUPLICATE    
Severity: normal CC: magnade
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://gentoo-wiki.com/HOWTO_Install_Gentoo_on_an_LVM2_root_partition#System_Side
Whiteboard:
Package list:
Runtime testing required: ---

Description Nathaniel McCallum (RETIRED) gentoo-dev 2005-03-05 15:06:34 UTC
/etc/init.d/checkroot runs to try to check root, but fails because the device in fstab has no /dev/xxxx file.  This is because root is on LVM and lvm hasn't been started (nodes not created).  

Reproducible: Always
Steps to Reproduce:
1. Put / on LVM
2. Reboot


Actual Results:  
fsck failed unable to find device node.

Expected Results:  
Checked the root filesystem.

The URL I posed above adds vgscan/vgchange to checkroot.  However, it may just
be easiest to have the LVM startup script start before checkroot.  I assume that
the softraid folks have a similar problem.
Comment 1 Eric Edgar (RETIRED) gentoo-dev 2005-03-08 09:03:29 UTC
to have / on an lvm you need to have an initrd.  lvm is initialized in the initrd.

genkernel --lvm2 --udev all

with a recent version of genkernel it will create an appropriate initrd.
Comment 2 Nathaniel McCallum (RETIRED) gentoo-dev 2005-03-08 09:09:19 UTC
Correct, that will generate an initrd that will mount / as read only.  However, once the init pivot has occurred (and /dev is remounted), the /dev files disappear.  Thus you have / mounted read only and when you go to check the file system, no /dev file exists for that partition (or any LVM partition).  Thus you need LVM both on the initrd (to do the initial ro mount of /) *and* LVM starting before checkroot to reestablish the /dev files for FS checking.
Comment 3 SpanKY gentoo-dev 2006-01-11 05:22:14 UTC

*** This bug has been marked as a duplicate of 50711 ***