Bug 838367 - dracut-020-51 broke Rawhide systems
Summary: dracut-020-51 broke Rawhide systems
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 838105 838230 838331 838631 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-08 21:02 UTC by nucleo
Modified: 2012-07-10 08:46 UTC (History)
9 users (show)

Fixed In Version: dracut-020-57.git20120709.fc18
Clone Of:
Environment:
Last Closed: 2012-07-09 06:30:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description nucleo 2012-07-08 21:02:07 UTC
Description of problem:
dractut-020-51 writes files in wrong location when creating initramfs.

Version-Release number of selected component (if applicable):
dracut-020-51.git20120706.fc18

Steps to Reproduce:
1. update dracut
2. update kernel (or re-generate initramfs with "dracut -f"
  
Actual results:
Files /etc/os/release, /etc/profile, /etc/initrd-release written in wrong location, in /etc/fstab added lines with /sysroot.
Also /etc/systemd/system/default.target can be removed.
Created initramfs file in /boot broken (only 1141 bytes).
Rawhide system can't boot.

Additional info:
Here steps how I can restore system:

1. Boot from LiveCD, chroot in rawhide system
2. downgrade dracut  to 020-22
3. remove lines added in /etc/fstab with sysroot
4. remove overwritten files /etc/os/release, /etc/profile, /etc/initrd-release
5. reinstall fedora-release, setup
6. re-generate initramfs with "dracut -f"
7. restore /etc/systemd/system/default.target
8. reboot

Comment 1 nucleo 2012-07-08 21:05:16 UTC
Sorry for typo, I mean file /etc/os-release

Comment 2 nucleo 2012-07-08 21:06:23 UTC
I tried twice to update dracut to 020-51 with the same result.
No problems with 020-22.

Comment 3 Harald Hoyer 2012-07-09 06:30:13 UTC
should be fixed with 020-52

Comment 4 Harald Hoyer 2012-07-09 06:31:13 UTC
*** Bug 838105 has been marked as a duplicate of this bug. ***

Comment 5 Harald Hoyer 2012-07-09 06:44:37 UTC
*** Bug 838331 has been marked as a duplicate of this bug. ***

Comment 6 Richard W.M. Jones 2012-07-09 07:22:11 UTC
Anyone got a definitive list of the files that dracut
broke?  I noticed it was writing over /etc/profile and
/etc/fstab and had to use 'chattr +i' to stop it from
doing that.

Comment 7 Harald Hoyer 2012-07-09 07:46:50 UTC
Sorry for those, who have been bitten by dracut-020-51. Instead of installing to
the /var/tmp/initramfs.* directory, it installed in your real root.

To remove most (if not all) of the files, it has installed, do the following:

# rm /.bash_history
# rm /dracut-state.sh
# rm /lib/dracut-crypt-lib.sh  /lib/dracut-lib.sh /lib/dracut/modules.txt
# rm -r /lib/dracut/hooks
# rm /sbin/btrfs_finished /sbin/btrfs_timeout /sbin/cryptroot-ask
# rm /sbin/initqueue /sbin/insmodpost.sh /sbin/iscsiroot /sbin/loginit
# rm /sbin/lvm_scan
# rm /sbin/mdraid-cleanup /sbin/mdraid_start /sbin/nbdroot /sbin/netroot
# rm /sbin/nfsroot /sbin/probe-keydev /bin/dracut-cmdline /bin/dracut-initqueue
# rm /bin/dracut-pre-pivot /bin/dracut-pre-trigger /bin/dracut-pre-udev
# rm /bin/mount-hook /bin/mount-lun.sh
# rm /lib/fs-lib.sh  /lib/net-lib.sh  /lib/nfs-lib.sh
# rm /etc/initrd-release
# rm /lib/systemd/system/dracut*
# rm /lib/systemd/system/*/dracut*
# rm /lib/systemd/system/default.target
# rm /lib/systemd/system/initrd-switch-root.service
# rm -r /lib/systemd/system/initrd-switch-root.target
# vi /etc/fstab .. remove all /sysroot lines
# mkdir /tmp/dracut-fixup;  ( cd /tmp/dracut-fixup; yumdownloader setup; \
  rpm2cpio setup*.rpm | cpio -id ;  cp etc/profile /etc ); \
  rm -fr /tmp/dracut-fixup
# mkdir /tmp/dracut-fixup;  ( cd /tmp/dracut-fixup; \
  yumdownloader --archlist=$(arch) systemd; \
  rpm2cpio systemd*.$(arch).rpm | cpio -id ; \
  cp usr/lib/systemd/system/emergency.service /usr/lib/systemd/system; \
  cp usr/lib/systemd/system/rescue.service /usr/lib/systemd/system; ); \
  rm -fr /tmp/dracut-fixup
# for i in 10-console.rules 10-dm.rules 11-dm.rules 13-dm-disk.rules \
  40-multipath.rules 50-firmware.rules 50-udev-default.rules 50-udev.rules \
  59-persistent-storage.rules 60-cdrom_id.rules 60-pcmcia.rules \
  60-persistent-storage.rules 61-dmraid-imsm.rules \
  61-persistent-storage-edd.rules 61-persistent-storage.rules \
  64-device-mapper.rules 64-lvm.rules  64-md-raid.rules \
  65-md-incremental-imsm.rules 71-biosdevname.rules \
  80-btrfs.rules 80-drivers.rules 95-dm-notify.rules 95-late.rules \
  95-udev-late.rules ; do [[ -f $i ]] && rm -vf /etc/udev/rules.d/$i; done

Comment 8 Harald Hoyer 2012-07-09 08:23:40 UTC
dracut-020-57.git20120709.fc18

Comment 9 Harald Hoyer 2012-07-09 10:10:45 UTC
# rm -f /etc/os-release; mkdir /tmp/dracut-fixup; \
  ( cd /tmp/dracut-fixup; yumdownloader fedora-release; \
   rpm2cpio fedora-release*.rpm | cpio -id ;  cp etc/os-release /etc ); \
   rm -fr /tmp/dracut-fixup

Comment 10 Mamoru TASAKA 2012-07-09 10:58:59 UTC
(In reply to comment #6)
> Anyone got a definitive list of the files that dracut
> broke?  I noticed it was writing over /etc/profile and
> /etc/fstab and had to use 'chattr +i' to stop it from
> doing that.

Oh, this may explain why I could not reboot cleanup even with old (saved) initramfs...

Comment 11 Harald Hoyer 2012-07-09 11:53:23 UTC
*** Bug 838230 has been marked as a duplicate of this bug. ***

Comment 12 Harald Hoyer 2012-07-10 08:46:26 UTC
*** Bug 838631 has been marked as a duplicate of this bug. ***


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