1999-11-11 16:10:37 -01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# boot-sparc v 1.13 (c) Steve Dunham <dunham@cse.msu.edu>, Eric
|
|
|
|
# Delaunay <delaunay@lix.polytechnique.fr>, Steve McIntyre
|
|
|
|
# <stevem@chiark.greenend.org.uk>
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# Do install stuff for sparc, including making bootable CDs
|
2000-03-12 15:27:26 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
# -----------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# 13MAR00 jwest@d.o Hummph, I do not beleive this
|
|
|
|
# is currently working as I do NOT see a call to slilo or
|
|
|
|
# intelslilo anwhere.
|
|
|
|
#
|
|
|
|
# I have cleaned it up a bit, and changed the paths to match the
|
|
|
|
# sparc boot-disks 2.2.8 file structure, but me thinks that one
|
|
|
|
# still has to make a call (baised on the hardware it is on) to
|
|
|
|
# intelslilo or slilo to create the cd.b and second.b ????????
|
|
|
|
#
|
|
|
|
# I will do a bit more investigation, and begging for help.
|
|
|
|
#
|
|
|
|
# Note that intelslilo is not currently a debian package,
|
|
|
|
# and you can get it from http://www.cse.msu.edu/~dunham/debian/silo/
|
|
|
|
# and was made by Steve dunham@cse.msu.edu
|
|
|
|
#
|
|
|
|
# I have found another writeup about making bootable sparc cd's at:
|
|
|
|
# http://ultra.penguin.cz/ultrapenguin-1.1/ultrapenguin-7.html
|
|
|
|
#
|
|
|
|
# -------------------------------------------------------------------
|
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-13 16:55:31 -01:00
|
|
|
# Disk 1 only
|
|
|
|
if [ $N != 1 ]; then
|
|
|
|
:> $N.mkisofs_opts
|
|
|
|
exit 0;
|
2000-03-12 21:30:06 -01:00
|
|
|
fi
|
2000-03-12 23:35:26 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
echo -n "boot1" > $N.mkisofs_opts
|
2000-03-12 23:35:26 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
rm -fr boot1
|
2000-03-12 21:30:06 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
# temporary mount point (eg. for silo to create the bootable CD image)
|
|
|
|
# only needed for Sparc so far...
|
|
|
|
#vecho Checking for temporary mount point for SILO
|
|
|
|
mountpoint=/var/tmp/debian_cd.mnt
|
|
|
|
if [ -d $mountpoint ]; then
|
|
|
|
umount $mountpoint || true
|
|
|
|
else
|
|
|
|
mkdir -p $mountpoint
|
|
|
|
fi
|
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-12 21:30:06 -01:00
|
|
|
mkdir -p boot1/boot
|
2000-03-13 16:55:31 -01:00
|
|
|
#the below moved to after the mount
|
|
|
|
#cp -p $BOOTDIR/cd.b $BOOTDIR/second.b boot1/boot
|
|
|
|
|
|
|
|
cat - > boot1/boot/silo.conf << __EOF__
|
|
|
|
message=!cd1
|
|
|
|
timeout=300
|
|
|
|
root=/dev/ram
|
|
|
|
image[sun4c,sun4d,sun4m]=!cd2
|
|
|
|
label=linux
|
|
|
|
initrd=!cd5
|
|
|
|
image[sun4u]=!cd4
|
|
|
|
label=linux
|
|
|
|
initrd=!cd5
|
|
|
|
image[sun4c,sun4d,sun4m]=!cd3
|
|
|
|
label=linux-2.2
|
|
|
|
initrd=!cd5
|
|
|
|
image[sun4u]=!cd4
|
|
|
|
label=linux-2.2
|
|
|
|
initrd=!cd5
|
1999-11-11 16:10:37 -01:00
|
|
|
__EOF__
|
|
|
|
|
|
|
|
# linux kernel & co are fetched directly from the install dir
|
|
|
|
# ... put the message banner in boot/debian.txt
|
|
|
|
|
2000-03-09 20:06:03 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
|
|
|
|
cp -p sun4cdm/linux-a.out $CDDIR/install ; \
|
|
|
|
cp -p sun4u/linux-a.out $CDDIR/install/linux-4u-a.out ; \
|
|
|
|
cp -p sun4c/linux-a.out $CDDIR/install/linux-4c-a.out ; \
|
|
|
|
cp -p images-1.44/root.bin $CDDIR/install ; \
|
|
|
|
cp -p doc/sparc_release_note.txt $CDDIR/install )
|
2000-03-09 20:06:03 -01:00
|
|
|
|
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
#echo mount -r -o loop \
|
|
|
|
# $MIRROR/dists/$CODENAME/main/disks-$ARCH/current/resc1440.bin \
|
|
|
|
# $mountpoint
|
2000-03-09 20:06:03 -01:00
|
|
|
|
2000-03-13 16:55:31 -01:00
|
|
|
mount -r -o loop \
|
|
|
|
$MIRROR/dists/$CODENAME/main/disks-$ARCH/current/sun4cdm/images-1.44/rescue.bin \
|
|
|
|
$mountpoint
|
|
|
|
cp -p $mountpoint/debian.txt boot1/boot/debian.txt
|
|
|
|
cp -p $mountpoint/boot/cd.b boot1/boot
|
|
|
|
cp -p $mountpoint/boot/second.b boot1/boot
|
|
|
|
umount $mountpoint
|
2000-03-09 20:06:03 -01:00
|
|
|
|
|
|
|
|