2005-05-05 16:15:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Do install stuff for amd64, including making bootable CDs
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
BOOTDIR=
|
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
|
|
|
DI_WWW_HOME="http://debian-amd64.alioth.debian.org/debian-installer/daily"
|
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
|
|
# This script is called with $1 (now $N) as the CD to
|
|
|
|
# make bootable. N may be in the form "n" or "n_NONUS"
|
|
|
|
# There may be more than 4 disks...support extras.
|
|
|
|
|
|
|
|
# Strip NONUS part of disk number
|
|
|
|
# NN will be 1...N so it can be used as an index
|
|
|
|
NN=`echo $N | sed -e 's/_NONUS//'`
|
|
|
|
|
2005-05-17 16:08:15 +00:00
|
|
|
if [ "$NN" != "1" ]; then
|
|
|
|
echo "CD$NN is not bootable"
|
|
|
|
exit 0
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
|
|
|
|
2005-05-17 16:08:15 +00:00
|
|
|
BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
|
2005-05-05 16:15:44 +00:00
|
|
|
|
2005-05-17 16:08:15 +00:00
|
|
|
# Download boot images.
|
|
|
|
for image in $BOOT_IMAGES; do
|
2005-05-05 16:15:44 +00:00
|
|
|
if [ ! -e "$image" ]; then
|
|
|
|
dir=$(dirname $image)
|
|
|
|
mkdir -p $dir
|
2005-05-17 16:08:15 +00:00
|
|
|
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
|
|
|
|
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
|
|
|
|
elif [ ! "$DI_WWW_HOME" ];then
|
2005-05-05 16:15:44 +00:00
|
|
|
cp "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/$image" "$image"
|
|
|
|
else
|
|
|
|
wget "$DI_WWW_HOME/$image" -O "$image"
|
|
|
|
fi
|
|
|
|
fi
|
2005-05-17 16:08:15 +00:00
|
|
|
done
|
2005-05-05 16:15:44 +00:00
|
|
|
|
2005-05-17 16:08:15 +00:00
|
|
|
echo "Using ISOLINUX boot-disks image on CD$N"
|
|
|
|
mkdir -p boot$N/isolinux
|
|
|
|
cp -f $BASEDIR/data/$DI_CODENAME/isolinux.bin boot$N/isolinux/
|
|
|
|
cp -lf cdrom/vmlinuz $CDDIR/install/
|
|
|
|
cp -lf cdrom/initrd.gz $CDDIR/install/
|
|
|
|
echo -n "-cache-inodes -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table " > $N.mkisofs_opts
|
2005-05-05 16:15:44 +00:00
|
|
|
|
|
|
|
cat > boot$N/isolinux/isolinux.cfg <<EOF
|
|
|
|
DEFAULT /install/vmlinuz
|
2005-05-17 16:08:15 +00:00
|
|
|
APPEND $KERNEL_PARAMS vga=normal initrd=/install/initrd.gz ramdisk_size=10240 root=/dev/rd/0 devfs=mount,dall rw --
|
2005-05-05 16:15:44 +00:00
|
|
|
LABEL linux
|
|
|
|
kernel /install/vmlinuz
|
|
|
|
LABEL cdrom
|
|
|
|
kernel /install/vmlinuz
|
|
|
|
LABEL expert
|
|
|
|
kernel /install/vmlinuz
|
2005-05-17 16:08:15 +00:00
|
|
|
append $KERNEL_PARAMS DEBCONF_PRIORITY=low vga=normal initrd=/install/initrd.gz ramdisk_size=10240 root=/dev/rd/0 devfs=mount,dall rw --
|
2005-05-05 16:15:44 +00:00
|
|
|
DISPLAY isolinux.txt
|
|
|
|
TIMEOUT 0
|
|
|
|
PROMPT 1
|
|
|
|
F1 f1.txt
|
|
|
|
F2 f2.txt
|
|
|
|
F3 f3.txt
|
|
|
|
F4 f4.txt
|
|
|
|
F5 f5.txt
|
|
|
|
F6 f6.txt
|
|
|
|
F7 f7.txt
|
|
|
|
F8 f8.txt
|
|
|
|
F9 f9.txt
|
|
|
|
F0 f10.txt
|
|
|
|
EOF
|
|
|
|
|
2005-05-17 16:08:15 +00:00
|
|
|
# Include Smart Boot Manager image for people where isolinux fails
|
|
|
|
gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
|
|
|
|
# Keep the original file timestamp
|
|
|
|
touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin
|
|
|
|
cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/
|
|
|
|
# Isolinux help files come from d-i.
|
|
|
|
cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
|
|
|
|
mv -f boot$N/isolinux/syslinux.txt boot$N/isolinux/isolinux.txt
|
|
|
|
if [ -e boot$N/isolinux/f3.txt.only26 ];then
|
|
|
|
mv boot$N/isolinux/f3.txt.only26 boot$N/isolinux/f3.txt
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
2005-05-17 16:08:15 +00:00
|
|
|
if [ "$SPLASHPNG" ] ; then
|
|
|
|
# Insert our own splash screen. Color index 15 is
|
|
|
|
# background, and index 7 is foreground. Set to black and
|
|
|
|
# white respecively
|
|
|
|
pngtopnm < $SPLASHPNG | ppmquant 16 | \
|
|
|
|
ppmtolss16 "#ffffff=7" "#000000=15" > boot$N/isolinux/splash.rle
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# write final lines to mkisofs_opts
|
2005-05-17 16:08:15 +00:00
|
|
|
echo -n "boot$N " >> $N.mkisofs_opts
|
2005-05-05 16:15:44 +00:00
|
|
|
|
|
|
|
# th,th, thats all
|