3
# boot-i386 v 1.13 (c) Steve McIntyre <stevem@chiark.greenend.org.uk>
4
# Released under GPL 31 Mar 1999
5
# See the file COPYING for license details
6
# Released as part of the slink_cd package, not much use standalone
8
# Do install stuff for i386, including making bootable CDs
10
# $1 is Debian-mirror location
11
# $2 is start directory location (where the scripts live)
12
# $3 is tmpdir location
13
# $4 is the binary arch
15
# $6 is $BOOTDIR (not needed for i386, but let's stay consistent)
24
. $BASEDIR/vecho # Include local definitions for vecho, vvecho, vvvecho
26
# Now check the boot-disks; make sure they exist and we
27
# have a "current" directory. If not, exit
28
if [ ! -e slink1/dists/stable/main/disks-$ARCH ] ; then
29
echo "No boot disks found for arch $ARCH."
34
(cd slink1/dists/stable/main/disks-$ARCH/current/ ; \
35
cp resc*.bin linux root.bin $TDIR/slink1/install )
37
cd slink1/dists/stable/main/disks-$ARCH
38
if [ ! -e current ] ; then
39
echo "No \"current\" boot disks found for arch $ARCH."
44
# OK, we have what we need. Now check and see what mess
45
# things are in. We _don't_ need more than one set of boot
46
# disks and it would be useful if the ftp maintainers
47
# would remove old versions instead of leaving them
50
if [ -L current ] ; then
51
# Find the link, rename it for safety then put it back
52
CURRENT_LINK=`ls -l current | awk '{print $11}'`
53
mv $CURRENT_LINK .tmp_link
55
mv .tmp_link $CURRENT_LINK
57
# We can simply remove all the others if current is a directory
62
# Hack for bootable disks
63
vecho "Copying boot image to <root>/boot for disc 1"
64
cp slink1/dists/stable/main/disks-$ARCH/current/resc1440.bin \
66
if [ -e slink1/dists/stable/main/disks-$ARCH/current/resc1440tecra.bin ] ; then
68
vecho "Copying tecra boot image to <root>/boot for disc 2"
69
cp slink1/dists/stable/main/disks-$ARCH/current/resc1440tecra.bin \
73
vecho "Extracting tools for disc 1"
74
mkdir -p slink1/tools/fips20
75
(cd slink1/tools/fips20; \
76
unzip -Lq $MIRROR/tools/fips20.zip; \
77
rm restorrb source -rf)
80
unzip -Lq $MIRROR/tools/lodlin16.zip; \
81
rm lodlin16/src lodlin16/initrd loadlin16/debian -rf )
83
mkdir slink1/tools/rawrite1
84
(cd slink1/tools/rawrite1; \
85
unzip -Lq $MIRROR/tools/rawrite1.zip )
87
mkdir slink1/tools/rawrite2
88
(cd slink1/tools/rawrite2; \
89
unzip -Lq $MIRROR/tools/rawrite2.zip; \
92
(echo "Tools for DOS :" ; \
93
echo "fips20/ non-destructively shorten a FAT partition" ; \
94
echo "lodlin16/ load Linux kernel from DOS" ;\
95
echo "rawrite1/ rawrite 1.3 : create disks from disk images (*.bin)"; \
96
echo "rawrite2/ rawrite 2.0 : create disks from disk images (*.bin)"; \
97
echo " rawrite 2.0 is much faster, but it locks up on some machines";\
98
) |todos > slink1/tools/README.tools
100
cp slink1/tools/lodlin16/*.exe slink1/install
101
cp slink1/tools/rawrite1/rawrite3.com slink1/install/rw1_3.com
102
cp slink1/tools/rawrite2/rawrite2.exe slink1/install/rw2_0.exe
103
cp slink1/tools/fips*/*.exe slink1/install
105
(echo "@ echo off" ; \
106
echo "rem Flush any write-cached disk blocks before we leave DOS. " ; \
107
echo "smartdrv /c" ; \
108
echo "loadlin.exe linux root=/dev/ram ro initrd=root.bin" ; \
109
) |todos > slink1/install/boot.bat