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

78 lines
1.8 KiB
Plaintext
Raw Normal View History

#!/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
set -e
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
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
__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 linux-a.out linux-2.2.1-sun4u-a.out \
linux-2.2.1-a.out root.bin 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/resc1440.bin \
$mountpoint
cp -p $mountpoint/debian.txt boot1/boot/debian.txt
umount $mountpoint