#!/bin/bash # # boot-i386 v 1.13 (c) Steve McIntyre # Released under GPL 31 Mar 1999 # 06-10-99 jjw Added $CODENAME and $CODENAME_STATUS support # # Heavily hacked by Raphaël Hertzog for # YACS (the new debian-cd in potato) # 12MAR00 updated for current i386 bootdisks --jwest # 02JAN01 cd1=default-kern, cd2=compact-kern, cd3=idepci-kern --jwest # # Do install stuff for i386, including making bootable CDs # # $1 is the CD number # $2 is the temporary CD build dir . $BASEDIR/tools/boot/$CODENAME/common.sh set -e N=$1 CDDIR=$2 BOOTDIR= 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//'` # what kernel-type to put on what disk? # a null "" value will use the default boot-disk kernel # KTYPE[1]="bf2.4" #multiboot in fact KTYPE[2]="" #vanilla KTYPE[3]="compact" KTYPE[4]="idepci" KTYPE[5]="bf2.4" KTYPE[6]="" KTYPE[7]="" KTYPE[8]="" # Show user what is going on. # THISTYPE=${KTYPE[$NN]} # Put boot images on CD1...CD(N) # :> $N.mkisofs_opts if [ "${ISOLINUX:-0}" != "0" ] && [ "$NN" = "1" ]; then echo "Using ISOLINUX boot-disks image on CD$N" mkdir -p boot$N/isolinux cp -f /usr/lib/syslinux/isolinux.bin boot$N/isolinux/ cp -lf CD1/dists/$CODENAME/main/disks-$ARCH/current/images-1.44/root.bin boot$N/isolinux/ cp -lf CD1/dists/$CODENAME/main/disks-$ARCH/current/images-1.44/bf2.4/root.bin boot$N/isolinux/bf24.bin cp -lf CD1/dists/$CODENAME/main/disks-$ARCH/current/images-1.44/compact/root.bin boot$N/isolinux/compact.bin cp -lf CD1/dists/$CODENAME/main/disks-$ARCH/current/images-1.44/idepci/root.bin boot$N/isolinux/idepci.bin 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 else echo "Using ${THISTYPE:-vanilla} boot-disks image on CD$N" mkdir -p boot$N/boot cp -lf CD1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/${THISTYPE}/rescue.bin boot$N/boot/ echo -n "-cache-inodes -J -b boot/rescue.bin " > $N.mkisofs_opts fi install_languages $CDDIR # Only disk one gets the extra files installed # if [ "$N" = "1" ] || [ "$N" = "1_NONUS" ] ; then # populate the install directory as well (cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \ cp -lf images-1.44/resc*.bin $CDDIR/install ; \ cp -lf linux.bin $CDDIR/install/linux ; \ cp -lf compact/linux.bin $CDDIR/install/lincompt ; \ cp -lf idepci/linux.bin $CDDIR/install/linpci ; \ cp -lf bf2.4/linux.bin $CDDIR/install/lin24 ; \ cp -lf images-1.44/root.bin $CDDIR/install ; \ cp -lf images-1.44/bf2.4/root.bin $CDDIR/install/bf24.bin; \ cp -lf images-1.44/compact/root.bin $CDDIR/install/compact.bin; \ cp -lf images-1.44/idepci/root.bin $CDDIR/install/idepci.bin) # Tools for disc 1 # and include the legacy DOS stuff if [ "${ISOLINUX:-0}" != "0" ]; then cp -f $BASEDIR/data/woody/isolinux.txt $BASEDIR/data/woody/f*.txt boot$N/isolinux/ cat > boot$N/isolinux/isolinux.cfg < $CDDIR/tools/README.tools (cat < $CDDIR/install/boot.bat fi # write final lines to mkisofs_opts if [ "${ISOLINUX:-0}" != "0" ] && [ "$NN" = "1" ]; then echo -n "boot$N " >> $N.mkisofs_opts else echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts fi # th,th, thats all