~tsimonq2/debian-cd/lubuntu-cosmic-changes

« back to all changes in this revision

Viewing changes to boot-i386

  • Committer: Arch Librarian
  • Date: 2005-03-22 00:35:34 UTC
  • Revision ID: Arch-1:debian-cd@arch.ubuntu.com%debian-cd--MAIN--0--base-0
Initial revision
Author: 93sam
Date: 1999-04-01 06:58:03 GMT
Initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
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
 
7
#
 
8
# Do install stuff for i386, including making bootable CDs
 
9
#
 
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
 
14
# $5 is debug level
 
15
# $6 is $BOOTDIR (not needed for i386, but let's stay consistent)
 
16
 
 
17
MIRROR=$1
 
18
BASEDIR=$2
 
19
TDIR=$3
 
20
ARCH=$4
 
21
VERBOSE=$5
 
22
BOOTDIR=$6
 
23
 
 
24
. $BASEDIR/vecho # Include local definitions for vecho, vvecho, vvvecho
 
25
 
 
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."
 
30
        echo "Exit."
 
31
        exit 1
 
32
fi
 
33
 
 
34
(cd slink1/dists/stable/main/disks-$ARCH/current/ ; \
 
35
        cp resc*.bin linux root.bin $TDIR/slink1/install )
 
36
 
 
37
cd slink1/dists/stable/main/disks-$ARCH
 
38
if [ ! -e current ] ; then
 
39
        echo "No \"current\" boot disks found for arch $ARCH."
 
40
        echo "Exit."
 
41
        exit 1
 
42
fi                      
 
43
 
 
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
 
48
# around...
 
49
 
 
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
 
54
        rm -rf 2*
 
55
        mv .tmp_link $CURRENT_LINK
 
56
else
 
57
        # We can simply remove all the others if current is a directory
 
58
        rm -rf 2*
 
59
fi
 
60
 
 
61
cd $TDIR
 
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 \
 
65
        boot1/boot
 
66
if [ -e slink1/dists/stable/main/disks-$ARCH/current/resc1440tecra.bin ] ; then
 
67
        mkdir -p boot2/boot
 
68
        vecho "Copying tecra boot image to <root>/boot for disc 2"
 
69
        cp slink1/dists/stable/main/disks-$ARCH/current/resc1440tecra.bin \
 
70
                boot2/boot
 
71
fi
 
72
 
 
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)
 
78
 
 
79
(cd slink1/tools; \
 
80
        unzip -Lq $MIRROR/tools/lodlin16.zip; \
 
81
        rm lodlin16/src lodlin16/initrd loadlin16/debian -rf )
 
82
 
 
83
mkdir slink1/tools/rawrite1
 
84
(cd slink1/tools/rawrite1; \
 
85
        unzip -Lq $MIRROR/tools/rawrite1.zip )
 
86
 
 
87
mkdir slink1/tools/rawrite2
 
88
(cd slink1/tools/rawrite2; \
 
89
        unzip -Lq $MIRROR/tools/rawrite2.zip; \
 
90
        rm rawrite2.c )
 
91
 
 
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
 
99
 
 
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
 
104
 
 
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
 
110