update i386 boot routines to include boot blocks on all binary disks
This commit is contained in:
parent
d32dd75402
commit
c42826c0e8
|
@ -7,81 +7,97 @@
|
|||
# Heavily hacked by Raphaël Hertzog <hertzog@debian.org> 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
|
||||
# CODENAME1 to point to potato boot disks if woody boot disks
|
||||
# do not exist 05-JUL-2000 -- jwest
|
||||
|
||||
set -e
|
||||
|
||||
N=$1
|
||||
CDDIR=$2
|
||||
BOOTDIR=
|
||||
|
||||
|
||||
# set bootdisks to potato for the moment.
|
||||
if [ -f $MIRROR/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/compact/rescue.bin ]; then
|
||||
CODENAME1=$CODENAME
|
||||
else
|
||||
echo "Using potato bootdisks - woody bootdisks not available"
|
||||
CODENAME1=potato
|
||||
fi
|
||||
|
||||
|
||||
cd $CDDIR/..
|
||||
|
||||
# Compact image for disk 2
|
||||
if [ $N == 2 ]; then
|
||||
:> 2.mkisofs_opts
|
||||
if [ -e $MIRROR/dists/$CODENAME1/main/disks-$ARCH/current/images-2.88/compact/rescue.bin ]
|
||||
then
|
||||
mkdir -p boot2/boot
|
||||
cp $MIRROR/dists/$CODENAME1/main/disks-$ARCH/current/images-2.88/compact/rescue.bin boot2/boot/
|
||||
echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot2" \
|
||||
> 2.mkisofs_opts
|
||||
fi
|
||||
exit 0;
|
||||
fi
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Disks != 1 and not 2
|
||||
if [ $N != 1 ]; then
|
||||
echo -n "-J" > $N.mkisofs_opts
|
||||
exit 0;
|
||||
fi
|
||||
# Strip stupid NONUS sutff
|
||||
#
|
||||
if [ $N == "1_NONUS" ] || [ $N == "1" ] ; then NN=1 ; fi
|
||||
if [ $N == "2_NONUS" ] || [ $N == "2" ] ; then NN=2 ; fi
|
||||
if [ $N == "3_NONUS" ] || [ $N == "3" ] ; then NN=3 ; fi
|
||||
if [ $N == "4_NONUS" ] || [ $N == "4" ] ; then NN=4 ; fi
|
||||
if [ $N == "5_NONUS" ] || [ $N == "5" ] ; then NN=5 ; fi
|
||||
if [ $N == "6_NONUS" ] || [ $N == "6" ] ; then NN=6 ; fi
|
||||
# NN is now 1...N so it can be used as an index
|
||||
|
||||
# Now we do disk 1 ...
|
||||
# couple of changes for 2.2.x bootdisks 27-dec-99 -- jwest
|
||||
# what kernel-type to put on what disk?
|
||||
# a null "" value will use the default boot-disk kernel
|
||||
#
|
||||
KTYPE[1]=""
|
||||
KTYPE[2]=compact
|
||||
KTYPE[3]=idepci
|
||||
KTYPE[4]=""
|
||||
KTYPE[5]=""
|
||||
KTYPE[6]=""
|
||||
|
||||
echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot1" > 1.mkisofs_opts
|
||||
# Show user what is going on.
|
||||
#
|
||||
echo "Using ${KTYPE[$NN]} boot-disks image on CD$N"
|
||||
|
||||
(cd $MIRROR/dists/$CODENAME1/main/disks-$ARCH/current/ ; \
|
||||
cp images-1.44/resc*.bin $CDDIR/install ; \
|
||||
cp linux $CDDIR/install ; \
|
||||
cp images-1.44/root.bin $CDDIR/install )
|
||||
|
||||
mkdir -p boot1/boot
|
||||
|
||||
cp $MIRROR/dists/$CODENAME1/main/disks-$ARCH/current/images-2.88/rescue.bin boot1/boot
|
||||
# Put boot images on CD1...CD(N)
|
||||
#
|
||||
:> $N.mkisofs_opts
|
||||
mkdir -p boot$N/boot
|
||||
cp -f CD1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/${KTYPE[$NN]}/rescue.bin boot$N/boot/
|
||||
echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot$N" > $N.mkisofs_opts
|
||||
|
||||
|
||||
#Extracting tools for disc 1
|
||||
# Only disk one gets the extra files installed
|
||||
#
|
||||
if [ $N == "1" ] || [ $N == "1_NONUS" ] ; then
|
||||
|
||||
mkdir -p $CDDIR/install/dosutils
|
||||
# populate the install directory as well
|
||||
(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
|
||||
cp -f images-1.44/resc*.bin $CDDIR/install ; \
|
||||
cp -f linux $CDDIR/install ; \
|
||||
cp -f images-1.44/root.bin $CDDIR/install )
|
||||
|
||||
cp $MIRROR/dists/$CODENAME1/main/disks-$ARCH/current/dosutils/* $CDDIR/install/dosutils/
|
||||
|
||||
## 24-Mar-2000 notes from Ben Collins on using cd as live file-system
|
||||
## for 2.2.9 bootdisks
|
||||
# (cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/images-1.44/ ; \
|
||||
# gzip -dc root.bin > /tmp/root.bin.uncompressed ; \
|
||||
# mount -o loop /tmp/root.bin.uncompressed /mnt ; \
|
||||
# touch /mnt/cdrom_image ; \
|
||||
# umount /mnt ; \
|
||||
# sync ; \
|
||||
# gzip -c9 /tmp/root.bin.uncompressed > $CDDIR/install/root.bin ; \
|
||||
# rm /tmp/root.bin.uncompressed )
|
||||
## end notes
|
||||
|
||||
|
||||
|
||||
# Tools for disc 1
|
||||
# and include the legacy DOS stuff
|
||||
|
||||
cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
|
||||
|
||||
(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
|
||||
|
||||
|
||||
(echo "@ echo off" ; \
|
||||
echo "rem Flush any write-cached disk blocks before we leave DOS. " ; \
|
||||
echo "smartdrv /c" ; \
|
||||
echo "loadlin.exe linux root=/dev/ram ro initrd=root.bin" ; \
|
||||
) |todos > $CDDIR/install/boot.bat
|
||||
|
||||
fi
|
||||
# th,th, thats all
|
||||
|
|
Loading…
Reference in New Issue