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
Sorry for typo, I mean file /etc/os-release
I tried twice to update dracut to 020-51 with the same result. No problems with 020-22.
should be fixed with 020-52
*** Bug 838105 has been marked as a duplicate of this bug. ***
*** Bug 838331 has been marked as a duplicate of this bug. ***
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.
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
dracut-020-57.git20120709.fc18
# 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
(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...
*** Bug 838230 has been marked as a duplicate of this bug. ***
*** Bug 838631 has been marked as a duplicate of this bug. ***