Update netboot.sh

pull/8/head
Brent, Yang Bohan 7 years ago committed by GitHub
parent 1ff3b29d16
commit e7f62396d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      netboot.sh

@ -109,6 +109,9 @@ while [ $# -gt 0 ]; do
ARCH=$2 ARCH=$2
shift shift
;; ;;
-lvm)
ISLVM=true
;;
*) *)
echo "Illegal option $1" echo "Illegal option $1"
exit 1 exit 1
@ -160,8 +163,14 @@ fi
if [ "$DRYRUN" != true ]; then if [ "$DRYRUN" != true ]; then
BOOTNAME="debian-$SUITE"
BOOT=/boot/debian-$SUITE if [ "$ISLVM" = true ]; then
BOOTROOT=/
else
BOOTROOT=/boot/
fi
BOOT="/boot/$BOOTNAME"
OUTPUTBOOT="$BOOTROOT$BOOTNAME"
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 if type update-grub >/dev/null; then
update-grub update-grub
@ -173,7 +182,6 @@ fi
rm -fr "$BOOT" rm -fr "$BOOT"
mkdir -p "$BOOT" mkdir -p "$BOOT"
cd "$BOOT" cd "$BOOT"
fi fi
cat >> preseed.cfg << EOF cat >> preseed.cfg << EOF
@ -368,8 +376,8 @@ menuentry 'New Install' {
insmod part_msdos insmod part_msdos
insmod ext2 insmod ext2
set root='(hd0,msdos1)' set root='(hd0,msdos1)'
linux $BOOT/linux linux $OUTPUTBOOT/linux
initrd $BOOT/initrd.gz initrd $OUTPUTBOOT/initrd.gz
} }
EOF EOF

Loading…
Cancel
Save