2002-10-10 12:56:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Do install stuff for i386, including making bootable CDs
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $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//'`
|
|
|
|
|
|
|
|
# List of boot image for each CD
|
2002-10-11 09:05:55 +00:00
|
|
|
KTYPE[1]="" #isolinux multiboot in fact
|
2002-10-10 12:56:48 +00:00
|
|
|
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
|
2002-10-11 09:38:26 +00:00
|
|
|
for image in cdrom-2880.img cdrom-initrd.gz cdrom144-1440.img cdrom144-initrd.gz net-1440.img net-initrd.gz vmlinuz ; do
|
2002-10-10 12:56:48 +00:00
|
|
|
if [ ! -e "$image" ]; then
|
2002-11-22 16:14:32 -01:00
|
|
|
wget -q http://people.debian.org/~tfheen/d-i/images/daily/$image
|
2002-10-10 12:56:48 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2002-10-10 17:27:12 +00:00
|
|
|
if [ "$NN" = "1" ]; then
|
2002-10-10 12:56:48 +00:00
|
|
|
echo "Using ISOLINUX boot-disks image on CD$N"
|
|
|
|
mkdir -p boot$N/isolinux
|
|
|
|
cp -f $BASEDIR/data/$CODENAME/isolinux.bin boot$N/isolinux/
|
2002-10-11 09:05:55 +00:00
|
|
|
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
|
2002-10-10 12:56:48 +00:00
|
|
|
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
|
2002-10-11 09:05:55 +00:00
|
|
|
echo "Using $THISTYPE boot-disks image on CD$N"
|
2002-10-10 12:56:48 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
#install_languages $CDDIR
|
|
|
|
|
|
|
|
# Only disk one gets the extra files installed
|
|
|
|
#
|
|
|
|
if [ "$NN" = "1" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
# populate the install directory as well
|
|
|
|
cp -lf *.img $CDDIR/install
|
|
|
|
|
2002-10-11 09:05:55 +00:00
|
|
|
# ISOLINUX setup
|
|
|
|
|
|
|
|
# Include Smart Boot Manager image for people where isolinux fails
|
|
|
|
gzip -dc $BASEDIR/data/$CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
|
|
|
|
touch -r $BASEDIR/data/$CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin
|
|
|
|
cp -p $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/
|
|
|
|
cat > boot$N/isolinux/isolinux.cfg <<EOF
|
|
|
|
DEFAULT /install/vmlinuz
|
2002-10-13 14:27:53 +00:00
|
|
|
APPEND vga=normal initrd=/install/cdrom.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
|
2002-10-10 12:56:48 +00:00
|
|
|
LABEL linux
|
2002-10-11 09:05:55 +00:00
|
|
|
kernel /install/vmlinuz
|
2002-10-10 12:56:48 +00:00
|
|
|
LABEL cdrom
|
2002-10-11 09:05:55 +00:00
|
|
|
kernel /install/vmlinuz
|
2002-10-10 12:56:48 +00:00
|
|
|
LABEL cdrom144
|
2002-10-11 09:05:55 +00:00
|
|
|
kernel /install/vmlinuz
|
2002-10-13 14:27:53 +00:00
|
|
|
append vga=normal initrd=/install/cdrom144.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
|
2002-10-10 12:56:48 +00:00
|
|
|
LABEL net
|
2002-10-11 09:05:55 +00:00
|
|
|
kernel /install/vmlinuz
|
2002-10-13 14:27:53 +00:00
|
|
|
append vga=normal initrd=/install/net.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
|
2002-10-10 12:56:48 +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
|
|
|
|
|
|
|
|
(echo "Tools for DOS :" ; \
|
|
|
|
echo "lodlin/ load Linux kernel from DOS" ;\
|
|
|
|
echo "rawrite2/ rawrite 2.0 : create disks from disk images (*.bin)"; \
|
|
|
|
) |todos > $CDDIR/tools/README.tools
|
|
|
|
|
2002-10-11 09:05:55 +00:00
|
|
|
# Loadlin script for starting install via dos/windows
|
2002-10-10 12:56:48 +00: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
|
|
|
|
|
2002-10-11 09:05:55 +00:00
|
|
|
echo Please choose an install method now
|
|
|
|
echo 1= CDROM install
|
|
|
|
echo 2= CDROM install (1.44Mb image)
|
|
|
|
echo 3= NET install
|
2002-10-10 12:56:48 +00:00
|
|
|
|
2002-10-11 09:05:55 +00:00
|
|
|
choice /c:123
|
2002-10-10 12:56:48 +00:00
|
|
|
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-10-11 09:05:55 +00:00
|
|
|
echo using CDROM install
|
|
|
|
loadlin.exe vmlinuz vga=normal initrd=cdrom.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
|
2002-10-10 12:56:48 +00:00
|
|
|
|
|
|
|
:TWO
|
2002-10-11 09:05:55 +00:00
|
|
|
echo using CDROM (1.44Mb) install
|
|
|
|
loadlin.exe vmlinuz vga=normal initrd=cdrom144.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
|
2002-10-10 12:56:48 +00:00
|
|
|
|
|
|
|
:THREE
|
2002-10-11 09:05:55 +00:00
|
|
|
echo using NET install
|
|
|
|
loadlin.exe vmlinuz vga=normal initrd=net.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
|
2002-10-10 12:56:48 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
) |todos > $CDDIR/install/boot.bat
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
# write final lines to mkisofs_opts
|
|
|
|
if [ "$NN" = "1" ]; then
|
|
|
|
echo -n "boot$N " >> $N.mkisofs_opts
|
|
|
|
else
|
2002-10-11 09:05:55 +00:00
|
|
|
if [ -n "$THISTYPE" ]; then
|
|
|
|
echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts
|
|
|
|
fi
|
2002-10-10 12:56:48 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# th,th, thats all
|