Bug 838367 - dracut-020-51 broke Rawhide systems
dracut-020-51 broke Rawhide systems
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
:
: 838105 838230 838331 838631 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-08 17:02 EDT by nucleo
Modified: 2012-07-10 04:46 EDT (History)
9 users (show)

See Also:
Fixed In Version: dracut-020-57.git20120709.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-09 02:30:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description nucleo 2012-07-08 17:02:07 EDT
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 17:05:16 EDT
Sorry for typo, I mean file /etc/os-release
Comment 2 nucleo 2012-07-08 17:06:23 EDT
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 02:30:13 EDT
should be fixed with 020-52
Comment 4 Harald Hoyer 2012-07-09 02:31:13 EDT
*** Bug 838105 has been marked as a duplicate of this bug. ***
Comment 5 Harald Hoyer 2012-07-09 02:44:37 EDT
*** Bug 838331 has been marked as a duplicate of this bug. ***
Comment 6 Richard W.M. Jones 2012-07-09 03:22:11 EDT
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 03:46:50 EDT
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 04:23:40 EDT
dracut-020-57.git20120709.fc18
Comment 9 Harald Hoyer 2012-07-09 06:10:45 EDT
# 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 06:58:59 EDT
(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 07:53:23 EDT
*** Bug 838230 has been marked as a duplicate of this bug. ***
Comment 12 Harald Hoyer 2012-07-10 04:46:26 EDT
*** 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.