mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-27 06:26:15 +00:00
Update netboot.sh
This commit is contained in:
+13
-5
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user