Skip to content

Commit

Permalink
configures grub to be used by abroot
Browse files Browse the repository at this point in the history
  • Loading branch information
taukakao authored and mirkobrombin committed Mar 2, 2024
1 parent 2624d26 commit 3d8ec28
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions includes.container/etc/default/grub
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions includes.container/etc/grub.d/10_vanilla
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions includes.container/etc/grub.d/31_os_prober_cleanup
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions modules/999-remove-grub-files.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d8ec28

Please sign in to comment.