datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
576 stars 122 forks source link

dracut may generate initrd at wrong location #93

Closed crawfxrd closed 7 years ago

crawfxrd commented 7 years ago

Fedora 25:

  Installing  : dattobd-utils-0.9.16-11.1.fc25.x86_64
Configuring dracut, please wait...
  Verifying   : dattobd-utils-0.9.16-11.1.fc25.x86_64
[root@segv-f25 ~]# lsinitrd /boot/initramfs-4.11.10-200.fc25.x86_64.img | grep "datto"
dattobd
drwxr-xr-x   3 root     root            0 Nov  7  2016 etc/datto
drwxr-xr-x   3 root     root            0 Nov  7  2016 etc/datto/dla
drwxr-xr-x   2 root     root            0 Nov  7  2016 etc/datto/dla/mnt
-rw-r--r--   1 root     root           31 Nov  7  2016 etc/modules-load.d/dattobd.conf
-rwxr-xr-x   1 root     root         1365 Nov  7  2016 usr/lib/dracut/hooks/pre-mount/01-dattobd.sh
-rw-r--r--   1 root     root        87688 Nov  7  2016 usr/lib/modules/4.11.10-200.fc25.x86_64/extra/dattobd.ko
-rwxr-xr-x   1 root     root          195 Nov  7  2016 usr/sbin/datto_reload

Fedora 26:

  Installing       : dattobd-utils-0.9.16-11.2.fc26.x86_64
  Running scriptlet: dattobd-utils-0.9.16-11.2.fc26.x86_64
Configuring dracut, please wait...
/bin/dracut: line 1619: warning: command substitution: ignored null byte in input
  Verifying        : dattobd-utils-0.9.16-11.2.fc26.x86_64
[root@segv-f26ws ~]# lsinitrd /boot/initramfs-4.11.9-300.fc26.x86_64.img | grep "datto"
[root@segv-f26ws ~]# 

/boot/initramfs-4.11.9-300.fc26.x86_64.img was not regenerated after dracut was run. The timestamp remains the same as before running, when I installed the current kernel.

[root@segv-f26ws ~]# ls -lh /boot/initramfs-$(uname -r)*
-rw-------. 1 root root 20M Jul 17 09:35 /boot/initramfs-4.11.9-300.fc26.x86_64.img
crawfxrd commented 7 years ago

Running dracut -f -v shows the initrd is generated at a completely different location than previous versions of Fedora.

Fedora 25:

dracut: *** Creating image file '/boot/initramfs-4.11.10-200.fc25.x86_64.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-4.11.10-200.fc25.x86_64.img' done ***

Fedora 26:

dracut: *** Creating image file '/boot/dc6ce07d63f24b5aaae9c6f20d80fd51/4.11.9-300.fc26.x86_64/initrd' ***
dracut: *** Creating initramfs image file '/boot/dc6ce07d63f24b5aaae9c6f20d80fd51/4.11.9-300.fc26.x86_64/initrd' done ***
crawfxrd commented 7 years ago

Deleting the folder dc6ce07d63f24b5aaae9c6f20d80fd51 and running dracut again shows it is generated in the expected location.

dracut: *** Creating image file '/boot/initramfs-4.11.9-300.fc26.x86_64.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-4.11.9-300.fc26.x86_64.img' done ***
crawfxrd commented 7 years ago

Upstream ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1475565