debian-cd-clone/tools/boot/potato/boot-sparc

109 lines
2.9 KiB
Plaintext
Raw Normal View History

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
# -----------------------------------------------------------------
#
# 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
set -e
1999-11-11 16:10:37 -01:00
N=$1
CDDIR=$2
cd $CDDIR/..
# Disk 1 only
if [ $N != 1 ]; then
:> $N.mkisofs_opts
exit 0;
fi
echo -n "boot1" > $N.mkisofs_opts
rm -fr boot1
# 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
# put the relevant parts of SILO boot loader
mkdir -p boot1/boot
#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
(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 )
#echo mount -r -o loop \
# $MIRROR/dists/$CODENAME/main/disks-$ARCH/current/resc1440.bin \
# $mountpoint
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