Update netboot.sh

This commit is contained in:
Brent, Yang Bohan
2019-03-25 00:29:21 +08:00
committed by GitHub
parent d306652c97
commit 1ff3b29d16
+7 -2
View File
@@ -163,8 +163,13 @@ if [ "$DRYRUN" != true ]; then
BOOT=/boot/debian-$SUITE BOOT=/boot/debian-$SUITE
URL=$PROTO://$HOST$DIR/dists/$SUITE/main/installer-$ARCH/current/images/netboot/debian-installer/$ARCH URL=$PROTO://$HOST$DIR/dists/$SUITE/main/installer-$ARCH/current/images/netboot/debian-installer/$ARCH
if type update-grub >/dev/null; then
update-grub update-grub
GRUBCFG=/boot/grub/grub.cfg
else
GRUBCFG=/boot/grub2/grub.cfg
grub2-mkconfig –o "$GRUBCFG"
fi
rm -fr "$BOOT" rm -fr "$BOOT"
mkdir -p "$BOOT" mkdir -p "$BOOT"
cd "$BOOT" cd "$BOOT"
@@ -358,7 +363,7 @@ gunzip initrd.gz
echo preseed.cfg | cpio -H newc -o -A -F initrd echo preseed.cfg | cpio -H newc -o -A -F initrd
gzip initrd gzip initrd
cat >> ../grub/grub.cfg << EOF cat >> "$GRUBCFG" << EOF
menuentry 'New Install' { menuentry 'New Install' {
insmod part_msdos insmod part_msdos
insmod ext2 insmod ext2