-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
set rugpi_bootpart=2 | ||
set rugpi_boot_spare=false | ||
|
||
set RUGPI_DEFAULT_ENV=(${root})/rugpi/bootpart.default.grubenv | ||
set RUGPI_SPARE_ENV=(${root})/rugpi/boot_spare.grubenv | ||
|
||
load_env -f "${RUGPI_DEFAULT_ENV}" | ||
load_env -f "${RUGPI_SPARE_ENV}" | ||
|
||
if [ "${rugpi_boot_spare}" = "true" ]; then | ||
if [ "${rugpi_bootpart}" = "2" ]; then | ||
set rugpi_bootpart=3 | ||
elif [ "${rugpi_bootpart}" = "3" ]; then | ||
set rugpi_bootpart=2 | ||
fi | ||
|
||
set rugpi_boot_spare=false | ||
save_env -f "${RUGPI_SPARE_ENV}" rugpi_boot_spare | ||
set rugpi_boot_spare=true | ||
fi | ||
|
||
# TODO: This should not be hardcoded to `hd0`, either use `search` or extract the correct | ||
# root drive from the existing value of `root` in some way. | ||
set root=(hd0,${rugpi_bootpart}) | ||
|
||
source (${root})/second.grub.cfg |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
linux /vmlinuz ro init=/usr/bin/rugpi-ctrl | ||
initrd /initrd.img | ||
boot |