2000-03-14 03:07:15 -01:00
|
|
|
#!/bin/bash -e
|
|
|
|
#
|
|
|
|
# boot-sparc v 2.00 (c) Steve Dunham <dunham@cse.msu.edu>, Eric
|
1999-11-11 16:10:37 -01:00
|
|
|
# Delaunay <delaunay@lix.polytechnique.fr>, Steve McIntyre
|
2000-03-14 03:07:15 -01:00
|
|
|
# <stevem@chiark.greenend.org.uk>, Ben Collins <bcollins@debian.org>
|
1999-11-11 16:10:37 -01:00
|
|
|
# Released under GPL 31 Mar 1999
|
|
|
|
# See the file COPYING for license details
|
|
|
|
# Released as part of the slink_cd package, not much use standalone
|
|
|
|
#
|
2000-03-14 03:07:15 -01:00
|
|
|
# Mar 2000: Converted to an ext2 CD partition for the first CD
|
2000-03-13 16:55:31 -01:00
|
|
|
#
|
2000-03-14 03:07:15 -01:00
|
|
|
# Do install stuff for sparc, including making bootable CDs
|
1999-11-11 16:10:37 -01:00
|
|
|
|
2000-02-19 16:52:52 -01:00
|
|
|
set -e
|
|
|
|
|
1999-11-11 16:10:37 -01:00
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
2000-03-14 03:07:15 -01:00
|
|
|
:> $N.mkisofs_opts
|
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
# Disk 1 only
|
2000-03-14 03:07:15 -01:00
|
|
|
[ "$N" = 1 ] || exit 0
|
2000-03-12 23:35:26 -01:00
|
|
|
|
2000-03-14 03:07:15 -01:00
|
|
|
echo "-B boot/cd.b boot1" > $N.mkisofs_opts
|
|
|
|
rm -rf boot1
|
2000-03-12 23:35:26 -01:00
|
|
|
|
2000-03-14 03:07:15 -01:00
|
|
|
inst=boot1
|
2000-03-12 21:30:06 -01:00
|
|
|
|
2000-03-14 03:07:15 -01:00
|
|
|
<<<<<<< boot-sparc
|
|
|
|
# Setup directories
|
|
|
|
mkdir -p $inst/{boot/sun4{u,cdm},etc}
|
2000-03-12 21:30:06 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
# put the relevant parts of SILO boot loader
|
2000-03-14 03:07:15 -01:00
|
|
|
cp -p $BOOTDIR/{cd,second}.b $inst/boot/
|
2000-03-09 20:06:03 -01:00
|
|
|
|
2000-03-14 03:07:15 -01:00
|
|
|
# Some custom etc files
|
|
|
|
cp -p $BASEDIR/tools/boot/potato/sparc-etc/* $inst/etc/
|
2000-03-09 20:06:03 -01:00
|
|
|
|
2000-03-14 03:07:15 -01:00
|
|
|
# linux kernel & co are fetched directly from the rescue disks
|
|
|
|
tmp=/var/tmp/debian_cd
|
|
|
|
mnt=$tmp/mnt
|
|
|
|
if [ -d $mnt/ ]; then
|
|
|
|
umount $mnt >/dev/null 2>&1 || true
|
|
|
|
else
|
|
|
|
mkdir -p $mnt
|
|
|
|
fi
|
|
|
|
for suba in sun4cdm sun4u; do
|
|
|
|
cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/$suba/images-1.44/rescue.bin \
|
|
|
|
$tmp/rescue.bin
|
|
|
|
mount -o loop,ro $tmp/rescue.bin $mnt
|
|
|
|
cp $mnt/linux $inst/boot/$suba/linux
|
|
|
|
umount $mnt
|
|
|
|
rm -f $tmp/rescue.bin
|
|
|
|
done
|
|
|
|
|
|
|
|
# Unpack the root tree into the directory. we use the tftp root.tar.gz
|
|
|
|
tar zxf $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/root.tar.gz -C $tmp/
|
|
|
|
cp -a $tmp/debian-sparc-root/* $inst/.
|
|
|
|
|
|
|
|
# no longer need this
|
|
|
|
rm -rf $tmp
|
|
|
|
|
|
|
|
# make this as a cdrom root. this gives dbootstrap a heads up
|
|
|
|
echo $CODENAME > $inst/cdrom_image
|
|
|
|
|
|
|
|
# Get rid of some junk
|
|
|
|
rm -f $inst/{boot_message,release_notes,type.txt}
|
|
|
|
|
|
|
|
# Make writable areas point to /tmp
|
|
|
|
rmdir $inst/var/{log,run}
|
|
|
|
ln -s ../tmp $inst/var/log
|
|
|
|
ln -s ../tmp $inst/var/run
|