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

112 lines
3.2 KiB
Bash
Executable File

#!/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
# Revisions:
# 12-MAR-00 changes for new boot-disk orginazation --jwest
set -e
N=$1
CDDIR=$2
cd $CDDIR/..
# move all the bootdisks to /install
# put the relevant parts of SILO boot loader
mkdir -p $CDDIR/install
ln -sf install $CDDIR/etc
#ln -sf install $CDDIR/boot
mkdir -p boot1/boot
BOOTDIR=1/dists/$CODENAME/main/disks-$ARCH/current/
# Disks != 1 and not 2
if [ $N != 1 ]; then
echo -n "-J" > $N.mkisofs_opts
rm -r $CDDIR/doc #remove doc dir on #2,#3,#4
exit 0;
fi
# make a copy of the boot disks in the /install dir
cp -pr $BOOTDIR/* $CDDIR/install
# remove the /install/doc directory as it is reduntant to /doc
rm -r $CDDIR/install/doc
echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot1" > 1.mkisofs_opts
(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
cp sun4cdm/images-1.44/resc*.bin $CDDIR/install ; \
cp sun4cdm/* $CDDIR/install ; \
cp images-1.44/root.bin $CDDIR/install )
mkdir -p boot1/boot
cp $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/sun4cdm/images-1.44/rescue.bin boot1/boot
cat - > $CDDIR/install/silo.conf << __EOF__
partition=1
message=/install/debian.txt
timeout=600
read-write
image[sun4c,sun4d,sun4m]=/install/sun4cdm/linux-a.out
label=linux-cdm
initrd=/install/root.bin
image[sun4u]=/install/sun4u/linux-a.out
label=linux-4u
initrd=/install/root.bin
image[sun4u]=/install/sun4u/linux-a.out
label=linux-4u
initrd=/install/root.bin
__EOF__
# linux kernel & co are fetched directly from the install dir
# ... put the message banner in boot/debian.txt
#CHANGE!!! Dont beleive the below is necessary 12-Mar-00 --jwest
#(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
# cp -pr sun4cdm/* $CDDIR/install )
#(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
# cp -pr images-1.44/* $CDDIR/install )
cat - > $CDDIR/install/debian.txt << __EOF__
Welcome to Debian GNU/Linux 2.2!
This is the Debian Rescue CD. Keep it once you have installed
your system, as you can boot from it to repair the system on your
hard disk if that ever becomes necessary.
On most systems, you can go ahead and press <ENTER> to begin
installation. You will probably want to try doing that before you try
anything else. If you run into trouble, or if you already have
questions, press the <TAB> key to list alternative boot options or
enter the "help" keyword to show a message about SILO boot commands.
WARNING: You should completely back up all of your hard disks before
proceeding. The installation procedure can completely and
irreversibly erase them! If you haven't made backups yet, remove
the rescue CD from the drive and enter the "halt" keyword
to get back to the monitor.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
This CD uses Linux 2.2.14
Press <ENTER> to boot!
__EOF__