Bug 5790 - dracut generating non-hostonly initrd after upgrade using live cd.
Summary: dracut generating non-hostonly initrd after upgrade using live cd.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: Mageia 3
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: (MGA2)
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-08 02:03 CEST by Dave Hodgins
Modified: 2015-03-29 04:22 CEST (History)
3 users (show)

See Also:
Source RPM: dracut-017-13.mga2.src.rpm
CVE:
Status comment:


Attachments
dracut.log from dracut -f after upgrade using live cd (156.14 KB, text/plain)
2012-05-11 02:15 CEST, Dave Hodgins
Details

Description Dave Hodgins 2012-05-08 02:03:51 CEST
While testing an install using the rc Gnome livecd, the generated initrd
is now asking for the password for each encrypted filesystem, even if they
are not being mounted.

I installed from the live cd to sda4, a normal ext4 partition. The swap
is on /dev/sda10, again, a normal partition.

The fstab contains ...
# Entry for /dev/sda4 :
UUID=0f26dec9-3a9c-441a-ba53-3b9682a26ad3 / ext4 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda10 :
UUID=253a0fdc-2b85-4b29-8ede-301dca5ef681 swap swap defaults 0 0

At boot, I'm asked for the passphrase for each of my 3 encrypted logical
volumes, even though they will not be mounted.  I have to press the enter
key 5 times for each one, to bypass the mount.  (I normally mount one of
them, at user login, using a script called from ~/.profile).

Having to press enter 15 times is rather annoying, and will prevent remote
rebooting.
Comment 1 Thomas Backlund 2012-05-08 09:35:28 CEST
Are the encrypted partitions added in /etc/crypttab ?

CC: (none) => tmb

Comment 2 Dave Hodgins 2012-05-09 04:13:39 CEST
(In reply to comment #1)
> Are the encrypted partitions added in /etc/crypttab ?

Sorry for the delay.  I had overwritten that installation while testing
other iso images, so had to redo a live cd install to recreate it.

I fully exptected to find /etc/crypttab had been created, as that seems
like a likely possible cause, but to my surprise the file does not exist,
either in the root file system, or the initrd.

I don't see what's different with the live cd, such that the problem
remains even if I run "dracut -f" after rebooting, to ensure a hostonly
initrd.  This does not happen with a dual or dvd upgrade of an existing
Mageia 1 system, or in my other permanent cauldron installation.
Comment 3 Dave Hodgins 2012-05-09 05:37:59 CEST
I've run dracut -f on both installations, and found the responsible
difference.

On a system installed from a live cd dracut produces a non-hostonly initrd.
as the live cd's have #hostonly="yes" in /etc/dracut.conf.

While the live cd does need to use a non-hostonly initrd, the dracut-conf
included in the actual iso should now have the line commented out.
Comment 4 Paul Blackburn 2012-05-09 17:58:29 CEST
I tried installing Mageia 2 rc from the i586 install dvd on a disk with a mix of NTFS, encrypted (3)  and unencrypted Linux partitions. The first encrypted partition was recognised so I could check the "use (encryption)" box and enter the passphrase. The 2nd and 3rd encrypted partitions were not recognized and showed simply as ext2 (previous contents lost or overwritten). I will try re-installing Mageia 1 with the 3 encrypted partitions then have another go at installing Mageia 2 (to see if I can reproduce this).

CC: (none) => paul.blackburn

Dave Hodgins 2012-05-11 02:09:58 CEST

Summary: dracut generated initrd now asks for password for encrypted file systems, even if they won't be mounted. => dracut generating non-hostonly initrd after upgrade using live cd.

Comment 5 Dave Hodgins 2012-05-11 02:15:45 CEST
Created attachment 2258 [details]
dracut.log from dracut -f after upgrade using live cd

This was produced by running dracut -f after rebooting into an
installation upgraded using a live cd.

Note the line
D: Installing /usr/lib/dracut/modules.d/90lvm/non-hostonly-init-lvm.sh

In addition to asking for the password for all encrypted file
systems, whether used or not, I suspect this is also the cause
of the long run time for mandrake_everytime.
Comment 6 Dave Hodgins 2012-05-15 02:24:11 CEST
I've compared the dracut.log generated when installing from the live cd
versus installing the desktop586 kernel in an existing cauldron install.
diff live normal
0a1
> D: Installing /usr/lib/dracut/modules.d/02caps/caps.sh
8,13d8
< D: Installing /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh
< D: Installing /usr/lib/dracut/modules.d/90crypt/probe-keydev.sh
< D: Installing /usr/lib/dracut/modules.d/90crypt/parse-keydev.sh
< D: Installing /usr/lib/dracut/modules.d/90crypt/parse-crypt.sh
< D: Installing /usr/lib/dracut/modules.d/90crypt/crypt-cleanup.sh
< D: Installing /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh
17,19d11
< D: Installing /usr/lib/dracut/modules.d/90dmraid/dmraid.sh
< D: Installing /usr/lib/dracut/modules.d/90dmraid/61-dmraid-imsm.rules
< D: Installing /usr/lib/dracut/modules.d/90dmraid/parse-dm.sh
23d14
< D: Installing /usr/lib/dracut/modules.d/90lvm/non-hostonly-init-lvm.sh
26,28d16
< D: Installing /usr/lib/dracut/modules.d/90mgalive/mgalive-parse.sh
< D: Installing /usr/lib/dracut/modules.d/90mgalive/mgalive-genrules.sh
< D: Installing /usr/lib/dracut/modules.d/90mgalive/mgalive-root.sh

So these are the dracut modules that need to be looked at, so they get
added only if needed, not just because the live cd is currently running
a non-hostonly initrd.

I don't have a ny raid devices, and am not using the encrypted file
systems for this install.
Comment 7 Dave Hodgins 2012-05-15 03:33:18 CEST
Workaround suggested by Thomas Backlund on the qa discussion mailing list,
boot with the option rd.luks=0 and run "dracut -f".
Comment 8 Thomas Backlund 2012-05-15 12:18:33 CEST
(In reply to comment #6)

> 
> So these are the dracut modules that need to be looked at, so they get
> added only if needed, not just because the live cd is currently running
> a non-hostonly initrd.


Hm, As we boot livecds without dmraid, mdadm, lvm, and crypt probing, I think I will just simply disable the dracut modules in livecd initrd. That will save some well needed space on the isos.
Comment 9 Marja Van Waes 2012-05-26 13:09:28 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 10 Dave Hodgins 2012-06-20 05:01:06 CEST
Setting milestone to Mageia 3, as it's a live cd install problem.

Keywords: NEEDINFO => (none)
Target Milestone: --- => Mageia 3
Whiteboard: (none) => (MGA2)

Comment 11 Nic Baxter 2015-03-10 03:47:39 CET
Still valid?

CC: (none) => nic

Comment 12 Nic Baxter 2015-03-29 04:22:44 CEST
no response so assume fixed by comment 8

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.