Skip to content

Commit

Permalink
feat(grub): dynamically set root variable & add startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Bayroom committed Apr 7, 2023
1 parent d5e9ea9 commit 80e51c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion target/linux/x86/image/grub-efi.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set default="0"
set timeout="@TIMEOUT@"
set root='(hd0,gpt1)'
search --no-floppy --label kernel --set=root

menuentry "@TITLE@" {
linux /boot/vmlinuz @GPT_ROOTPART@ @CMDLINE@ noinitrd
Expand Down
8 changes: 8 additions & 0 deletions target/linux/x86/image/startup.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

for %d in 9 8 7 6 5 4 3 2 1 0
set bootapp "fs%d:\efi\boot\bootx64.efi"
if exist %bootapp% then
%bootapp%
endif
endfor
exit

0 comments on commit 80e51c3

Please sign in to comment.