Bug 786261

Summary: dracut doesn't include libc.so.6 when generating an initramfs
Product: [Fedora] Fedora Reporter: Tom H <tomh0665>
Component: dracutAssignee: dracut-maint
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dracut-maint, frankly3d, jonathan, mschmidt, rh-bugzilla, robatino
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-02 21:41:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
log from dracut --debug
none
dracut.log x86_64 none

Description Tom H 2012-01-31 21:02:37 UTC
Description of problem:

When installing any kernel package after doing the /usr move updates or running dracut, the generated initramfs doesn't contain libc.so.6.


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

dracut-014-77.git20120126.fc17.1.noarch


How reproducible:

Run through Harald's usrmove procedure and install a new kernel from f17-usrmove or run dracut.


Actual results:

Unbootable system from the kernel installed from f17-usrmove or the kernel who's initramfs has been updated post usrmove procedure.

The boot process stops at

/bin/sh: error while loading shared libraries: libc.so.6:
cannot open shared object file: No such file or directory

Kernel panic - not syncing: Attempted to kill init!

Unpacked the initramfs corresponding to the bootable (rc4) and non-bootable (rc6) kernels and searched for libc.so.6

[root@localhost ~]# find . -name 'libc.so.6'
./rc4/run/initramfs/lib/libc.so.6
[root@localhost ~]#


Expected results:

Bootable system.

Comment 1 Tom H 2012-01-31 21:14:21 UTC
Duped my VM and ran dracut for the bootable kernel - and it's now unbootable.

Bootable kernel
kernel-3.3.0-0.rc1.git4.1.fc17.i686
(installed from rawhide repository)

Unbootable kernels
kernel-3.3.0-0.rc1.git5.1.fc17.i686
kernel-3.3.0-0.rc1.git6.1.fc17.i686
(installed from f17-usrmove repository)

Comment 2 Martin Kho 2012-01-31 21:33:26 UTC
Hi,

FYI: I've two f17-usermoved bare-metal installations (KDE and GNOME). Both are running git5.1 and git6.1 kernels fine. There were no problems with dracut. May be the issue is VM related?

Martin Kho

Comment 3 Frank Murphy 2012-01-31 22:06:10 UTC
I got the same error in kvm_guest.
will test more tomorrow.

Comment 4 Martin Kho 2012-02-01 11:30:25 UTC
It can also be an arch issue. My installs are both X86_64.

Martin Kho

Comment 5 Frank Murphy 2012-02-01 14:34:34 UTC
# ldd /bin/sh
linux-gate.so.1 =>  (0x00798000)
        libtinfo.so.5 => /lib/libtinfo.so.5 (0x4a82b000)
        libdl.so.2 => /lib/libdl.so.2 (0x4971d000)
        libc.so.6 => /lib/libc.so.6 (0x4956d000)
        /lib/ld-linux.so.2 (0x4954a000)

Should it be finding /usr/lib* ?

Comment 6 Frank Murphy 2012-02-01 19:52:04 UTC
@ Tom H.

Can you do a test for me.
I managed to get the following /usrmove kernel booting.

is kernel-3.3.0-0.rc2.git0.2.fc17.i686 is giving the same problem?
yum erase kernel-3.3.0-0.rc2.git0.2.fc17

(I yum erased all non-booting kernels for clarity)

then:
vim /etc/ld.so.conf
add the follwing lines:
/usr/lib
/usr/lib64
save
then:
ldconfig -v

yum update kernel
reboot

If this works for you then, it should work with any "yum update kernel"?

Comment 7 Tom H 2012-02-01 20:36:07 UTC
@ Frank M

I created /etc/ld.so.conf.d/usrmove.conf (content "/usr/lib"), ran "ldconfig", and rebuilt "initramfs-3.3.0-0.rc1.git5.1.fc17.i686.img" and "initramfs-3.3.0-0.rc1.git6.1.fc17.i686.img" and installed "kernel-3.3.0-0.rc2.git0.2.fc17.i686".

I can now boot from all three f17-usrmove kernels. Thanks.

Comment 8 Frank Murphy 2012-02-01 22:09:03 UTC
Good tip will make separate conf.
Will you let the test list know of the workaround.
It's bedtime for me.

Comment 9 Michal Schmidt 2012-02-02 14:34:31 UTC
Created attachment 559059 [details]
log from dracut --debug

I'm seeing the bug in a i686 Rawhide VM. Attached is the dracut debug log.

Comment 10 Michal Schmidt 2012-02-02 14:46:15 UTC
It seems it affects only i686.

<michich> there's only run/initramfs/usr/lib/i686/nosegneg/libc-2.15.so but no symlink to it
<haraldh> ah, nosegneg.. damn

Comment 11 Martin Kho 2012-02-02 16:57:50 UTC
Created attachment 559090 [details]
dracut.log x86_64

Hi,

I can confirm that dracut works for x86_64 ok. libc.so.6 is in:
/run/initramfs/lib64/libc.so.6 -> libc-2.15.so

Martin Kho

FYI: dracut.log

Comment 12 Michal Schmidt 2012-02-02 20:00:03 UTC
dracut-014-81.git20120202.fc17 fixes the bug for me.

Comment 13 Tom H 2012-02-02 21:18:16 UTC
@Michal

For me too (installed it, deleted usrmove.conf, ran ldconfig, rebuilt initramfs, rebooted successfully). Thank you Harald.