Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configures grub to be used by abroot #34

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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