From 1380f4308cc6aae3a53a996104da793b19e4c000 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Tue, 17 Oct 2023 17:22:29 +0900 Subject: [PATCH] Update InstallNET.sh --- Linux_reinstall/InstallNET.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Linux_reinstall/InstallNET.sh b/Linux_reinstall/InstallNET.sh index 9c1f968..da0224e 100644 --- a/Linux_reinstall/InstallNET.sh +++ b/Linux_reinstall/InstallNET.sh @@ -4299,6 +4299,10 @@ find . | cpio -o -H newc | gzip -1 >/tmp/initrd.img # Debian/Ubuntu/Kali/AlpineLinux Grub1 setting start if [[ ! -z "$GRUBTYPE" && "$GRUBTYPE" == "isGrub1" ]]; then if [[ "$setNetbootXyz" == "0" ]]; then + # In templates of Debian of equinix.com, the default "grub.cfg" is not match with the standard format, so it should be re-generated. + [[ ! $(grep -iE '/etc/grub.d|begin|end|savedefault|load_video|gfxmode' $GRUBDIR/$GRUBFILE) ]] && { + grub-mkconfig -o $GRUBDIR/$GRUBFILE >>/dev/null 2>&1 + } READGRUB='/tmp/grub.read' [[ -f $READGRUB ]] && rm -rf $READGRUB touch $READGRUB