From 6422e5ae8eee2e12b6eb7dc81e32fd9c2d6c6fd2 Mon Sep 17 00:00:00 2001 From: Ing Date: Mon, 26 Feb 2024 01:33:52 +0800 Subject: [PATCH] add Recovery --- files/initrd/opt/rr/boot.sh | 4 ++++ files/p1/boot/grub/grub.cfg | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index cb7626dd..b09362c8 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -113,6 +113,10 @@ CMDLINE['netif_num']="0" if grep -q "force_junior" /proc/cmdline; then CMDLINE['force_junior']="" fi +if grep -q "recovery" /proc/cmdline; then + CMDLINE['force_junior']="" + CMDLINE['recovery']="" +fi if [ ${EFI} -eq 1 ]; then CMDLINE['withefi']="" else diff --git a/files/p1/boot/grub/grub.cfg b/files/p1/boot/grub/grub.cfg index 5bdbe305..f6d8ae4e 100644 --- a/files/p1/boot/grub/grub.cfg +++ b/files/p1/boot/grub/grub.cfg @@ -91,6 +91,14 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then initrd /initrd-rr echo "Booting..." } + menuentry 'Boot Recovery' --id recovery { + set_gfxpayload + echo "Loading kernel..." + linux /bzImage-rr ${RR_CMDLINE} recovery + echo "Loading initramfs..." + initrd /initrd-rr + echo "Booting..." + } menuentry 'Force re-install DSM' --id junior { set_gfxpayload echo "Loading kernel..."