Bug 112083

Summary: mkinitrd keys lvm1/2 off running system, not kernel version
Product: [Retired] Red Hat Raw Hide Reporter: Alexandre Oliva <aoliva>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-13 19:21:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2003-12-14 10:22:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031202

Description of problem:
If I've just installed kernel 2.6, but still haven't booted into it,
mkinitrd will set things up to use lvm version 1, not version 2, in
the 2.6 initrd.  This obviously won't work.

Testing the existing devices of the running system is of no use to
decide which lvm version is going to be available when the given
kernel boots.  It should probably look at the kernel version number
provided in the command line to decide whether to use lvm1 or lvm2.

Version-Release number of selected component (if applicable):
mkinitrd-3.5.15.1-2

How reproducible:
Always

Steps to Reproduce:
1.Boot into kernel 2.4, with root in a LV
2.Install kernel 2.6
3.Reboot into it


Actual Results:  It won't work, but not only because the LV devices
are not set up.  It will fail before it gets to that point, when it
attempts to run the lvm1 programs within kernel 2.6.

Expected Results:  Since it's kernel 2.6, it should arrange to use
lvm2, no matter what's being used in kernel 2.4.

Additional info:

It actually fails to initialize variables root_lvm and root_lvm2, but
even if I set root_lvm2=1 in mkinitrd's environment, it fails, because
then it tries *both* lvm1 and lvm2, and the former fails.

Comment 1 Jeremy Katz 2003-12-14 16:32:07 UTC
Yes, I know -- this was listed in my caveats when I first sent mail
about it to one of the fedora lists.  Just wanted to get things
working enough for installs first, migration and upgrades second. 
Have a WIP on my laptop that I'm planning to test once I get back to
the office (probably Tuesday)

Comment 2 Jeremy Katz 2004-02-09 18:45:49 UTC
It actually checks the kernel version now

Comment 3 Alexandre Oliva 2004-02-13 19:21:08 UTC
Confirmed, thanks!  (I've only tested this by running mkinitrd for my
FC2test1 install tree within a chroot, from a FC1 boot session, but
that's enough of an indication to me that it works)