From 046b2cc5a66775a754dd50d3fd109c503785aa7f Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 16 Jun 2021 03:33:22 -0300 Subject: [PATCH] root: add grub --- config.yaml | 1 + root/config.yaml | 7 ++++++ root/grub | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 root/grub diff --git a/config.yaml b/config.yaml index 17c979e..231ca8b 100644 --- a/config.yaml +++ b/config.yaml @@ -194,6 +194,7 @@ dynvariables: blender_version: | pacman -Qi blender | grep "^Version" | cut -d: -f3 | cut -d. -f1-2 || blender --version | head -n1 | sed -E 's|^Blender (.*)\..*|\1|g' + root_uuid: blkid /dev/sda2 -s UUID -o value ############################################################### diff --git a/root/config.yaml b/root/config.yaml index 66178c7..64a6463 100644 --- a/root/config.yaml +++ b/root/config.yaml @@ -23,6 +23,7 @@ actions: greetd_install: | sudo chown -R greeter:greeter /etc/greetd/ + grub_install: update-grub elogind_install: > { sv restart elogind || @@ -47,6 +48,12 @@ dotfiles: actions: - elogind_install + grub: + src: grub + dst: /etc/default/grub + actions: + - grub_install + ############################################################### profiles: diff --git a/root/grub b/root/grub new file mode 100644 index 0000000..6e6a42c --- /dev/null +++ b/root/grub @@ -0,0 +1,63 @@ +# {{@@ header() @@}} + +# GRUB boot loader configuration + +GRUB_DEFAULT=0 +GRUB_TIMEOUT=0 +GRUB_HIDDEN_TIMEOUT=1 +GRUB_RECORDFAIL_TIMEOUT=$GRUB_HIDDEN_TIMEOUT + +GRUB_DISTRIBUTOR="Artix" + +GRUB_CMDLINE_LINUX_DEFAULT="" +GRUB_CMDLINE_LINUX="cryptdevice=UUID={{@@ root_uuid @@}}:main" +GRUB_CMDLINE_LINUX+="root=/dev/mapper/main rootflags=rw,noative,compress=zstd,subvol=/@artix-root" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable booting from LUKS encrypted devices +#GRUB_ENABLE_CRYPTODISK=y + +# Set to 'countdown' or 'hidden' to change timeout behavior, +# press ESC key to display menu. +GRUB_TIMEOUT_STYLE=menu + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `vbeinfo' +GRUB_GFXMODE=auto + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +#GRUB_COLOR_NORMAL="light-blue/black" +#GRUB_COLOR_HIGHLIGHT="light-cyan/blue" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/path/to/wallpaper" +#GRUB_THEME="/path/to/gfxtheme" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +# Uncomment to make GRUB remember the last selection. This requires +# setting 'GRUB_DEFAULT=saved' above. +#GRUB_SAVEDEFAULT="true" + +# vim: ft=sh