2000-02-19 16:52:52 -01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
#
|
|
|
|
|
# boot-i386 v 1.13 (c) Steve McIntyre <stevem@chiark.greenend.org.uk>
|
|
|
|
|
# Released under GPL 31 Mar 1999
|
|
|
|
|
# 06-10-99 jjw Added $CODENAME and $CODENAME_STATUS support
|
|
|
|
|
#
|
|
|
|
|
# Heavily hacked by Rapha<68>l Hertzog <hertzog@debian.org> for
|
|
|
|
|
# YACS (the new debian-cd in potato)
|
2000-04-03 22:05:07 +00:00
|
|
|
|
# 12MAR00 updated for current i386 bootdisks --jwest
|
2001-01-04 04:31:46 -01:00
|
|
|
|
# 02JAN01 cd1=default-kern, cd2=compact-kern, cd3=idepci-kern --jwest
|
2000-02-19 16:52:52 -01:00
|
|
|
|
#
|
|
|
|
|
# Do install stuff for i386, including making bootable CDs
|
|
|
|
|
#
|
|
|
|
|
# $1 is the CD number
|
|
|
|
|
# $2 is the temporary CD build dir
|
2001-01-04 04:31:46 -01:00
|
|
|
|
|
2002-03-25 09:03:53 -01:00
|
|
|
|
. $BASEDIR/tools/boot/$CODENAME/common.sh
|
|
|
|
|
|
2000-02-19 16:52:52 -01:00
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
|
CDDIR=$2
|
|
|
|
|
BOOTDIR=
|
2000-07-06 00:34:45 +00:00
|
|
|
|
|
2000-02-19 16:52:52 -01:00
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
2001-11-16 00:24:47 -01:00
|
|
|
|
# Strip NONUS part of disk number
|
|
|
|
|
# NN will be 1...N so it can be used as an index
|
2001-01-04 04:31:46 -01:00
|
|
|
|
#
|
2001-11-16 06:22:05 -01:00
|
|
|
|
NN=`echo $N | sed -e 's/_NONUS//'`
|
2001-11-16 00:24:47 -01:00
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
|
|
|
|
|
# what kernel-type to put on what disk?
|
|
|
|
|
# a null "" value will use the default boot-disk kernel
|
|
|
|
|
#
|
2002-04-13 12:17:57 +00:00
|
|
|
|
KTYPE[1]="bf2.4" #multiboot in fact
|
|
|
|
|
KTYPE[2]="" #vanilla
|
|
|
|
|
KTYPE[3]="compact"
|
|
|
|
|
KTYPE[4]="idepci"
|
|
|
|
|
KTYPE[5]="bf2.4"
|
2001-11-21 06:36:22 -01:00
|
|
|
|
KTYPE[6]=""
|
2001-11-16 13:29:49 -01:00
|
|
|
|
KTYPE[7]=""
|
|
|
|
|
KTYPE[8]=""
|
2001-01-04 04:31:46 -01:00
|
|
|
|
|
|
|
|
|
# Show user what is going on.
|
|
|
|
|
#
|
2002-04-07 04:24:22 +00:00
|
|
|
|
THISTYPE=${KTYPE[$NN]}
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
# Put boot images on CD1...CD(N)
|
|
|
|
|
#
|
2001-11-17 09:49:46 -01:00
|
|
|
|
|
2002-04-13 12:17:57 +00:00
|
|
|
|
if [ "${ISOLINUX:-0}" != "0" ] && [ "$NN" = "1" ]; then
|
2002-04-09 01:39:43 +00:00
|
|
|
|
echo "Using ISOLINUX boot-disks image on CD$N"
|
|
|
|
|
mkdir -p boot$N/isolinux
|
2002-05-15 16:13:46 +00:00
|
|
|
|
cp -f /usr/share/debian-cd/data/woody/isolinux.bin boot$N/isolinux/
|
2002-04-09 01:39:43 +00:00
|
|
|
|
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
|
2002-04-09 22:38:16 +00:00
|
|
|
|
cp -lf CD1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/${THISTYPE}/rescue.bin boot$N/boot/
|
2002-04-09 01:39:43 +00:00
|
|
|
|
echo -n "-cache-inodes -J -b boot/rescue.bin " > $N.mkisofs_opts
|
|
|
|
|
fi
|
2001-11-17 05:04:45 -01:00
|
|
|
|
|
2002-03-25 09:03:53 -01:00
|
|
|
|
install_languages $CDDIR
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
# Only disk one gets the extra files installed
|
|
|
|
|
#
|
2001-12-31 16:48:47 -01:00
|
|
|
|
if [ "$N" = "1" ] || [ "$N" = "1_NONUS" ] ; then
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
2001-11-17 05:04:45 -01:00
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
# populate the install directory as well
|
|
|
|
|
(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
|
2002-04-09 01:39:43 +00:00
|
|
|
|
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)
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
# Tools for disc 1
|
|
|
|
|
# and include the legacy DOS stuff
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
2002-04-13 12:17:57 +00:00
|
|
|
|
if [ "${ISOLINUX:-0}" != "0" ]; then
|
2002-04-28 13:56:50 +00:00
|
|
|
|
# Include Smart Boot Manager image for people where isolinux doesn't
|
|
|
|
|
# work
|
|
|
|
|
gzip -dc $BASEDIR/data/$CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
|
|
|
|
|
cp $BASEDIR/data/$CODENAME/README.sbm $CDDIR/install/
|
|
|
|
|
# Isolinux config files
|
|
|
|
|
cp -f $BASEDIR/data/$CODENAME/isolinux.txt $BASEDIR/data/$CODENAME/f*.txt boot$N/isolinux/
|
2002-04-09 01:39:43 +00:00
|
|
|
|
cat > boot$N/isolinux/isolinux.cfg <<EOF
|
|
|
|
|
DEFAULT /install/linpci
|
2002-04-09 22:38:16 +00:00
|
|
|
|
APPEND root=/dev/ram ro initrd=idepci.bin ramdisk_size=16384 disksize=1.44 flavor=idepci
|
2002-04-09 01:39:43 +00:00
|
|
|
|
LABEL linux
|
|
|
|
|
kernel /install/linpci
|
|
|
|
|
LABEL idepci
|
|
|
|
|
kernel /install/linpci
|
|
|
|
|
LABEL compact
|
|
|
|
|
kernel /install/lincompt
|
2002-04-09 22:38:16 +00:00
|
|
|
|
append root=/dev/ram ro initrd=compact.bin ramdisk_size=16384 disksize=1.44 flavor=compact
|
2002-04-09 01:39:43 +00:00
|
|
|
|
LABEL vanilla
|
|
|
|
|
kernel /install/linux
|
2002-04-13 12:17:57 +00:00
|
|
|
|
append root=/dev/ram ro initrd=root.bin ramdisk_size=16384 disksize=1.44 TERM=vt102
|
2002-04-09 01:39:43 +00:00
|
|
|
|
LABEL bf24
|
|
|
|
|
kernel /install/lin24
|
2002-04-09 22:38:16 +00:00
|
|
|
|
append root=/dev/ram ro initrd=bf24.bin ramdisk_size=16384 disksize=1.44 flavor=bf2.4
|
2002-04-09 01:39:43 +00:00
|
|
|
|
LABEL rescue
|
|
|
|
|
kernel /install/linpci
|
|
|
|
|
append noinitrd
|
|
|
|
|
LABEL resccomp
|
|
|
|
|
kernel /install/lincompt
|
|
|
|
|
append noinitrd
|
|
|
|
|
LABEL rescvanl
|
|
|
|
|
kernel /install/linux
|
|
|
|
|
append noinitrd
|
|
|
|
|
LABEL rescbf24
|
|
|
|
|
kernel /install/lin24
|
|
|
|
|
append noinitrd
|
|
|
|
|
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
|
|
|
|
|
fi
|
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
|
2000-02-19 16:52:52 -01:00
|
|
|
|
|
|
|
|
|
(echo "Tools for DOS :" ; \
|
2000-04-03 22:05:07 +00:00
|
|
|
|
echo "lodlin/ load Linux kernel from DOS" ;\
|
2000-02-19 16:52:52 -01:00
|
|
|
|
echo "rawrite2/ rawrite 2.0 : create disks from disk images (*.bin)"; \
|
|
|
|
|
) |todos > $CDDIR/tools/README.tools
|
|
|
|
|
|
2001-01-27 16:32:34 -01:00
|
|
|
|
(cat <<EOF;
|
|
|
|
|
@ echo off
|
|
|
|
|
rem Flush any write-cached disk blocks before we leave DOS.
|
|
|
|
|
If your system does not use smartdrv an error message will appear,
|
|
|
|
|
you can safely ignore that.
|
|
|
|
|
smartdrv /c
|
|
|
|
|
|
|
|
|
|
echo Please choose a linux kernel now
|
2002-04-09 01:39:43 +00:00
|
|
|
|
echo 1= IDEPCI kernel (2.2)
|
|
|
|
|
echo 2= compact (SCSI) kernel (2.2)
|
|
|
|
|
echo 3= 2.4.x kernel (2.4)
|
|
|
|
|
echo 4= vanilla (standard) kernel (2.2)
|
2001-01-27 16:32:34 -01:00
|
|
|
|
|
|
|
|
|
choice /c:1234
|
|
|
|
|
if errorlevel 4 goto FOUR
|
|
|
|
|
if errorlevel 3 goto THREE
|
|
|
|
|
if errorlevel 2 goto TWO
|
|
|
|
|
if errorlevel 1 goto ONE
|
|
|
|
|
|
|
|
|
|
echo doing default somehow and going to ONE
|
|
|
|
|
goto ONE
|
|
|
|
|
|
|
|
|
|
:ONE
|
2002-04-07 12:52:26 +00:00
|
|
|
|
echo using IDEPCI kernel
|
2002-04-09 22:45:11 +00:00
|
|
|
|
loadlin.exe linpci root=/dev/ram ro initrd=root.bin ramdisk_size=16384 disksize=1.44 flavor=idepci
|
2001-01-27 16:32:34 -01:00
|
|
|
|
|
|
|
|
|
:TWO
|
2002-04-09 01:39:43 +00:00
|
|
|
|
echo using compact (SCSI) kernel
|
2002-04-09 22:45:11 +00:00
|
|
|
|
loadlin.exe lincompt root=/dev/ram ro initrd=compact.bin ramdisk_size=16384 disksize=1.44 flavor=compact
|
2001-01-27 16:32:34 -01:00
|
|
|
|
|
|
|
|
|
:THREE
|
2002-02-11 13:04:08 -01:00
|
|
|
|
echo using 2.4.x kernel
|
2002-04-09 22:45:11 +00:00
|
|
|
|
loadlin.exe lin24 root=/dev/ram ro initrd=bf24.bin ramdisk_size=16384 disksize=1.44 flavor=bf2.4
|
2001-01-27 16:32:34 -01:00
|
|
|
|
|
|
|
|
|
:FOUR
|
2002-04-09 01:39:43 +00:00
|
|
|
|
echo using standard (vanilla) kernel
|
2002-04-13 12:17:57 +00:00
|
|
|
|
loadlin.exe linux root=/dev/ram ro initrd=root.bin ramdisk_size=16384 disksize=1.44 TERM=vt102
|
2001-11-21 19:32:30 -01:00
|
|
|
|
|
2001-01-27 16:32:34 -01:00
|
|
|
|
EOF
|
|
|
|
|
) |todos > $CDDIR/install/boot.bat
|
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
fi
|
2001-11-17 09:49:46 -01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# write final lines to mkisofs_opts
|
2002-04-13 12:17:57 +00:00
|
|
|
|
if [ "${ISOLINUX:-0}" != "0" ] && [ "$NN" = "1" ]; then
|
2002-04-09 22:38:16 +00:00
|
|
|
|
echo -n "boot$N " >> $N.mkisofs_opts
|
2002-04-09 01:39:43 +00:00
|
|
|
|
else
|
|
|
|
|
echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts
|
|
|
|
|
fi
|
2001-11-17 09:49:46 -01:00
|
|
|
|
|
|
|
|
|
|
2001-01-04 04:31:46 -01:00
|
|
|
|
# th,th, thats all
|