diff --git a/rpm_spec/core-dom0-linux.spec b/rpm_spec/core-dom0-linux.spec index 68cc143..378c29c 100644 --- a/rpm_spec/core-dom0-linux.spec +++ b/rpm_spec/core-dom0-linux.spec @@ -151,6 +151,7 @@ install -m 644 system-config/00-qubes-ignore-devices.rules $RPM_BUILD_ROOT/etc/u install -m 644 system-config/60-persistent-storage.rules $RPM_BUILD_ROOT/etc/udev/rules.d/ install -m 644 -D system-config/disable-lesspipe $RPM_BUILD_ROOT/etc/profile.d/zz-disable-lesspipe install -m 755 -D system-config/kernel-grub2.install $RPM_BUILD_ROOT/usr/lib/kernel/install.d/90-grub2.install +install -m 755 -D system-config/kernel-remove-bls.install $RPM_BUILD_ROOT/usr/lib/kernel/install.d/99-remove-bls.install ### Icons mkdir -p $RPM_BUILD_ROOT/usr/share/qubes/icons @@ -275,5 +276,6 @@ chmod -x /etc/grub.d/10_linux %files kernel-install /usr/lib/kernel/install.d/90-grub2.install +/usr/lib/kernel/install.d/99-remove-bls.install %changelog diff --git a/system-config/kernel-remove-bls.install b/system-config/kernel-remove-bls.install new file mode 100755 index 0000000..1db623e --- /dev/null +++ b/system-config/kernel-remove-bls.install @@ -0,0 +1,15 @@ +#!/bin/sh + +# The Boot Loader Specification is not useful for Qubes OS, because it handles +# only direct Linux boot, not Xen or any other multiboot application (like +# tboot). +# Because of that Qubes OS still uses generated grub2 configuration. +# Unfortunately the sole existence of /boot/${MACHINE_ID} changes behaviour of +# some tools - for example default output file in dracut. So forcibly remove +# the directory (which was just created...). + +[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + +if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then + rm -rf /boot/${MACHINE_ID} +fi