Skip to content

Commit

Permalink
feat: Hide grub menu
Browse files Browse the repository at this point in the history
Press the shift key during boot to display the menu

See: https://github.com/ublue-os/isogenerator/issues/71
  • Loading branch information
EyeCantCU committed Jun 6, 2023
1 parent 8e49b7f commit f8d1d07
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions installer/kickstart/hide-grub.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%include /tmp/ks-urls.txt

%post --logfile=/root/ks-post.log --erroronfail --nochroot
%ksappend /run/install/repo/kickstart/hide-grub.sh
%end
11 changes: 11 additions & 0 deletions installer/kickstart/hide-grub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
set -oue pipefail

grub2-editenv - set menu_auto_hide=1

# Verify if EFI or legacy
if [ -f "/usr/etc/grub2-efi.cfg" ]; then
grub2-mkconfig -o /usr/etc/grub2-efi.cfg
else
grub2-mkconfig -o /boot/grub2/grub.cfg
fi

0 comments on commit f8d1d07

Please sign in to comment.