From 14ff9bbfab5d2c9ced752acd4c4e956489b7a475 Mon Sep 17 00:00:00 2001 From: Alastair McKinstry Date: Fri, 14 Mar 2003 22:10:45 +0000 Subject: [PATCH] Initial cut at boot-alpha --- tools/boot/sarge/boot-alpha | 126 ++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100755 tools/boot/sarge/boot-alpha diff --git a/tools/boot/sarge/boot-alpha b/tools/boot/sarge/boot-alpha new file mode 100755 index 00000000..1268eead --- /dev/null +++ b/tools/boot/sarge/boot-alpha @@ -0,0 +1,126 @@ +#!/bin/bash +# +# Do install stuff for alpha, including making bootable CDs +# Works with debian-installer +# +# Currently untested. + +# $1 is the CD number +# $2 is the temporary CD build dir + +set -e + +N=$1 +CDDIR=$2 + +# FIXME +# Change this to $ARCHIVE/dists/$CODENAME/main/disks-alpha/current/ +# when the images are known to work +BOOTIMAGEDIR=http://people.debian.org/~mckinstry/d-i/images/alpha + +# +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//'` + +# List of boot image for each CD +KTYPE[1]="" #isolinux multiboot in fact +KTYPE[2]="cdrom-2880" +KTYPE[3]="net-1440" +KTYPE[4]="cdrom144-1440" +KTYPE[5]="" +KTYPE[6]="" +KTYPE[7]="" +KTYPE[8]="" +KTYPE[9]="" +KTYPE[10]="" + +THISTYPE=${KTYPE[$NN]} + +# Download boot images +for image in cdrom-2880.img cdrom-initrd.gz cdrom144-1440.img cdrom144-initrd.gz net-1440.img net-initrd.gz vmlinuz ; do + if [ ! -e "$image" ]; then + wget -q $BOOTIMAGEDIR/$image + fi +done + +if [ "$NN" = "1" ]; then + echo "Using ISOLINUX boot-disks image on CD$N" + mkdir -p boot$N/isolinux + cp -f $BASEDIR/data/$CODENAME/isolinux.bin boot$N/isolinux/ + cp -lf vmlinuz $CDDIR/install/ + cp -lf cdrom-initrd.gz $CDDIR/install/cdrom.gz + cp -lf cdrom144-initrd.gz $CDDIR/install/cdrom144.gz + cp -lf net-initrd.gz $CDDIR/install/net.gz + echo -n "-cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table " > $N.mkisofs_opts +else + if [ -n "$THISTYPE" ]; then + echo "Using $THISTYPE boot-disks image on CD$N" + mkdir -p boot$N/boot + cp $THISTYPE.img boot$N/boot/ + echo -n "-cache-inodes -J -l -b boot/$THISTYPE.img " > $N.mkisofs_opts + else + mkdir boot$N + echo -n "-cache-inodes -J -l " > $N.mkisofs_opts + fi +fi + + + +# Only disk one gets the extra files installed +# +if [ "$NN" = "1" ]; then + + +# populate the install directory as well +cp -lf *.img $CDDIR/install + + +# Taken from boot-i386 +cat > boot$N/isolinux/isolinux.cfg <> $N.mkisofs_opts +else + if [ -n "$THISTYPE" ]; then + echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts + fi +fi +