diff --git a/includes.container/etc/default/grub b/includes.container/etc/default/grub new file mode 100644 index 0000000..4f7a27d --- /dev/null +++ b/includes.container/etc/default/grub @@ -0,0 +1,14 @@ +# If you change this file, run 'abroot upgrade -f' afterwards to apply the settings + +GRUB_DEFAULT=0 +GRUB_TIMEOUT=0 +GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` +GRUB_CMDLINE_LINUX_DEFAULT="quiet" +GRUB_CMDLINE_LINUX="" + +# If your computer has multiple operating systems installed, then you +# probably want to run os-prober. However, if your computer is a host +# for guest OSes installed via LVM or raw disk devices, running +# os-prober can cause damage to those guest OSes as it mounts +# filesystems to look for things. +GRUB_DISABLE_OS_PROBER=true diff --git a/includes.container/etc/grub.d/10_vanilla b/includes.container/etc/grub.d/10_vanilla new file mode 100755 index 0000000..97753e8 --- /dev/null +++ b/includes.container/etc/grub.d/10_vanilla @@ -0,0 +1,11 @@ +#!/bin/sh + +# vanilla os entry, don't change the REPLACED_BY_ABROOT placeholder +cat << EOF +menuentry "Vanilla OS" --class gnu-linux --class gnu --class os { + insmod gzio + insmod part_gpt + insmod ext2 +REPLACED_BY_ABROOT +} +EOF diff --git a/includes.container/etc/grub.d/31_os_prober_cleanup b/includes.container/etc/grub.d/31_os_prober_cleanup new file mode 100755 index 0000000..71ad694 --- /dev/null +++ b/includes.container/etc/grub.d/31_os_prober_cleanup @@ -0,0 +1,6 @@ +#!/bin/sh +# 30_os-prober in chroot fails to unmount this directory + +set +e +umount -R /var/lib/os-prober/mount/ +set -e diff --git a/modules/999-remove-grub-files.yml b/modules/999-remove-grub-files.yml new file mode 100644 index 0000000..c823f66 --- /dev/null +++ b/modules/999-remove-grub-files.yml @@ -0,0 +1,6 @@ +name: remove-grub-files +type: shell +commands: +- rm /etc/grub.d/05_debian_theme +- rm /etc/grub.d/10_linux +- rm /etc/grub.d/20_linux_xen diff --git a/recipe.yml b/recipe.yml index c25d15f..4ec93d0 100644 --- a/recipe.yml +++ b/recipe.yml @@ -42,6 +42,7 @@ modules: - modules/140-manpages - modules/998-podman-registry - modules/999-replace-locale-gen + - modules/999-remove-grub-files - name: zram-config type: shell