Skip to content

Instantly share code, notes, and snippets.

@nemanjan00
Created October 21, 2018 19:33
Show Gist options
  • Save nemanjan00/04fd9bb83ede682b948389b9412ba662 to your computer and use it in GitHub Desktop.
Save nemanjan00/04fd9bb83ede682b948389b9412ba662 to your computer and use it in GitHub Desktop.
insmod part_gpt
insmod part_msdos
insmod lvm
insmod luks
insmod cryptodisk
insmod gcry_rijndael
insmod gcry_sha256
font=(cbfsdisk)/grub/unicode.pf2
loadfont $font
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.********************************
insmod all_video
if loadfont $font ; then
set gfxmode=1366x768x32
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input at_keyboard
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=2
else
set timeout=2
fi
menuentry 'Load grub.cfg from encrypted root LV [q]' --hotkey='q' --unrestricted {
cryptomount "(ahci0,gpt1)"
configfile "(lvm/ssd-root)/boot/grub/grub.cfg"
}
menuentry 'Scan for OS on internal HDD' {
insmod regexp
insmod ahci
insmod part_msdos
for x in (ahci0,*) ; do
if [ -f "$x/grub/grub.cfg" ] ; then
menuentry "Load Config from $x" $x {
root=$2
configfile /grub/grub.cfg
}
fi
if [ -f "$x/boot/grub/grub.cfg" ] ; then
menuentry "Load Config from $x" $x {
root=$2
configfile /boot/grub/grub.cfg
}
fi
done
}
menuentry 'Boot ANARCHYV100' {
set root=(usb0)
linux /arch/boot/x86_64/vmlinux archisobasedir=arch archisolabel=ANARCHYV100 iomem=relaxed
initrd /arch/boot/intel_ucode.img
initrd /arch/boot/x86_64/archiso.img
boot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment