Undo 'Boot Loader Spec' by deleting /boot/MACHINE_ID

The specification doesn't cover how to boot Xen (or any other multiboot
binary), but the sole presence of such directory changes dracut default
path. So get rid of that directory.
This commit is contained in:
Marek Marczykowski-Górecki 2015-08-03 03:00:59 +02:00
parent c85fc7a098
commit f795e58483
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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