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

« back to all changes in this revision

Viewing changes to tools/boot/dapper/boot-i386

  • Committer: Colin Watson
  • Date: 2005-10-14 10:38:59 UTC
  • Revision ID: Arch-1:colin.watson@canonical.com--2005%debian-cd--ubuntu--0--patch-196
add CONF.sh bits for dapper; copy breezy -> dapper elsewhere

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# Do install stuff for i386, including making bootable CDs
 
4
# Works with debian-installer
 
5
#
 
6
# $1 is the CD number
 
7
# $2 is the temporary CD build dir
 
8
 
 
9
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
 
10
 
 
11
set -e
 
12
 
 
13
N=$1
 
14
CDDIR=$2
 
15
BOOTDIR=
 
16
if [ "$DI_WWW_HOME" = "default" ];then
 
17
   DI_WWW_HOME="http://people.debian.org/~joeyh/d-i/images/daily"
 
18
fi
 
19
if [ ! "$DI_DIST" ]; then
 
20
   export DI_DIST="$DI_CODENAME"
 
21
fi
 
22
if [ -z "$DI_TYPE" ]; then
 
23
   DI_TYPE="$($BASEDIR/tools/find-newest-installer)"
 
24
fi
 
25
 
 
26
case $PROJECT in
 
27
    edubuntu)
 
28
        DEFAULT_PRESEED='preseed/file=/cdrom/preseed/edubuntu.seed'
 
29
        ;;
 
30
    kubuntu)
 
31
        DEFAULT_PRESEED='preseed/file=/cdrom/preseed/kubuntu.seed'
 
32
        ;;
 
33
    ubuntu-server)
 
34
        DEFAULT_PRESEED='preseed/file=/cdrom/preseed/ubuntu-server.seed'
 
35
        ;;
 
36
    *)
 
37
        DEFAULT_PRESEED=
 
38
        ;;
 
39
esac
 
40
 
 
41
cd $CDDIR/..
 
42
 
 
43
#
 
44
# This script is called with $1 (now $N) as the CD to 
 
45
# make bootable.  N may be in the form "n" or "n_NONUS"
 
46
# There may be more than 4 disks...support extras.
 
47
 
 
48
# Strip NONUS part of disk number
 
49
# NN will be 1...N so it can be used as an index
 
50
#
 
51
NN=`echo $N | sed -e 's/_NONUS//'`
 
52
 
 
53
# List of boot image for each CD
 
54
KTYPE[1]="" #isolinux multiboot in fact
 
55
KTYPE[2]="cdrom"
 
56
# XXX add net-image back when it's fixed
 
57
KTYPE[3]=""
 
58
KTYPE[4]=""
 
59
KTYPE[5]=""
 
60
KTYPE[6]=""
 
61
KTYPE[7]=""
 
62
KTYPE[8]=""
 
63
KTYPE[9]=""
 
64
KTYPE[10]=""
 
65
 
 
66
THISTYPE=${KTYPE[$NN]}
 
67
 
 
68
BOOT_IMAGES="cdrom/initrd.gz cdrom/initrd.list cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
 
69
DISK_IMAGES=""
 
70
TAR_IMAGES="netboot/netboot.tar.gz"
 
71
 
 
72
# Download boot images
 
73
for image in $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do
 
74
    if [ ! -e "$image" ]; then
 
75
        dir=$(dirname $image)
 
76
        mkdir -p $dir
 
77
        if [ ! "$DI_WWW_HOME" ];then
 
78
                cp "$MIRROR/dists/$DI_DIST/main/$DI_TYPE-$ARCH/current/images/$image" "$image"
 
79
                #cp "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/20041227ubuntu13/images/$image" "$image"
 
80
        else
 
81
                wget "$DI_WWW_HOME/$image" -O "$image"
 
82
        fi
 
83
    fi
 
84
done
 
85
 
 
86
if [ "$NN" = "1" ]; then
 
87
    echo "Using ISOLINUX boot-disks image on CD$N"
 
88
    mkdir -p boot$N/isolinux
 
89
    cp -f $BASEDIR/data/$DI_CODENAME/isolinux.bin boot$N/isolinux/
 
90
    cp -lf cdrom/vmlinuz $CDDIR/install/
 
91
    cp -lf cdrom/initrd.gz $CDDIR/install/
 
92
    cp -lf cdrom/initrd.list $CDDIR/install/
 
93
    echo -n "-cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table " > $N.mkisofs_opts
 
94
else
 
95
    if [ -n "$THISTYPE" ]; then
 
96
        echo "Using $THISTYPE boot-disks image on CD$N"
 
97
        mkdir -p boot$N/boot
 
98
        cp $THISTYPE/boot.img boot$N/boot/
 
99
        echo -n "-cache-inodes -J -l -b boot/boot.img "  > $N.mkisofs_opts
 
100
    else
 
101
        mkdir boot$N
 
102
        echo -n "-cache-inodes -J -l " > $N.mkisofs_opts
 
103
    fi
 
104
fi
 
105
 
 
106
"$BASEDIR/tools/sorting_weights" "$N"
 
107
echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
 
108
 
 
109
#install_languages $CDDIR
 
110
 
 
111
# Only disk one gets the extra files installed
 
112
#
 
113
if [ "$NN" = "1" ]; then
 
114
 
 
115
 
 
116
# populate the install directory as well
 
117
for disk in $DISK_IMAGES; do
 
118
        dir=$(dirname $disk)
 
119
        mkdir -p $CDDIR/install/$dir
 
120
        cp -lf $disk $CDDIR/install/$dir
 
121
done
 
122
 
 
123
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
124
        for tar in $TAR_IMAGES; do
 
125
                dir=$(dirname $tar)
 
126
                mkdir -p $CDDIR/install/$dir
 
127
                tar -C $CDDIR/install/$dir -xzpf $tar
 
128
        done
 
129
fi
 
130
 
 
131
# ISOLINUX setup
 
132
 
 
133
# Include Smart Boot Manager image for people where isolinux fails
 
134
gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
 
135
# Keep the original file timestamp
 
136
touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin
 
137
cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/
 
138
# Extract memtest86+ from the archive
 
139
MEMTEST86DEB="$($BASEDIR/tools/apt-selection cache show memtest86+ | \
 
140
        grep ^Filename | awk '{print $2}')"
 
141
ar p "$MIRROR/$MEMTEST86DEB" data.tar.gz | \
 
142
        tar xzf - -C $CDDIR/install/ ./boot/memtest86+.bin
 
143
mv $CDDIR/install/boot/memtest86+.bin $CDDIR/install/mt86plus
 
144
rm -rf $CDDIR/install/boot
 
145
# Isolinux help files come from d-i.
 
146
cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
 
147
# Override splash screen.
 
148
if [ "$SPLASHRLE" ] && [ -e "$SPLASHRLE" ]; then
 
149
    cp -p "$SPLASHRLE" boot$N/isolinux/splash.rle
 
150
fi
 
151
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
152
    rm -f boot$N/isolinux/*.txt.live
 
153
else
 
154
    for x in boot$N/isolinux/*.txt.live; do
 
155
        mv "$x" "${x%.live}"
 
156
    done
 
157
fi
 
158
if [ "$CDIMAGE_DVD" = 1 ] && [ "$CDIMAGE_LIVE" = 1 ]; then
 
159
    # overrides; these should go in debian-installer instead
 
160
    for x in $BASEDIR/data/$DI_CODENAME/isolinux/*.txt.dvd; do
 
161
        base="${x##*/}"
 
162
        cp -p "$x" "boot$N/isolinux/${base%.dvd}"
 
163
    done
 
164
fi
 
165
if [ "$PROJECT" = ubuntu-server ]; then
 
166
    # last-minute override for ubuntu-server
 
167
    for x in $BASEDIR/data/$DI_CODENAME/isolinux/*.txt.server; do
 
168
        base="${x##*/}"
 
169
        cp -p "$x" "boot$N/isolinux/${base%.server}"
 
170
    done
 
171
fi
 
172
sed -e "s#Ubuntu#$CAPPROJECT#g" boot$N/isolinux/syslinux.txt \
 
173
    > boot$N/isolinux/isolinux.txt
 
174
rm -f boot$N/isolinux/syslinux.txt
 
175
# Isolinux config file.
 
176
cat > boot$N/isolinux/isolinux.cfg <<EOF
 
177
DEFAULT /install/vmlinuz
 
178
EOF
 
179
if [ "$CDIMAGE_LIVE" = 1 ]; then
 
180
    cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
181
APPEND $KERNEL_PARAMS casper/enable=true casper-udeb/snapshot/backing-file=/cdrom/casper/filesystem.cloop vga=normal initrd=/install/initrd.gz ramdisk_size=1048576 root=/dev/rd/0 rw --
 
182
LABEL live
 
183
  kernel /install/vmlinuz
 
184
  append $KERNEL_PARAMS casper/enable=true casper-udeb/snapshot/backing-file=/cdrom/casper/filesystem.cloop vga=normal initrd=/install/initrd.gz ramdisk_size=1048576 root=/dev/rd/0 rw --
 
185
LABEL live-expert
 
186
  kernel /install/vmlinuz
 
187
  append $KERNEL_PARAMS DEBCONF_PRIORITY=low casper/enable=true casper-udeb/snapshot/backing-file=/cdrom/casper/filesystem.cloop vga=normal initrd=/install/initrd.gz ramdisk_size=1048576 root=/dev/rd/0 rw --
 
188
EOF
 
189
fi
 
190
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
191
    if [ "$CDIMAGE_LIVE" != 1 ]; then
 
192
        cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
193
APPEND $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
194
EOF
 
195
    fi
 
196
    cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
197
LABEL install
 
198
  kernel /install/vmlinuz
 
199
  append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
200
LABEL linux
 
201
  kernel /install/vmlinuz
 
202
  append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
203
LABEL cdrom
 
204
  kernel /install/vmlinuz
 
205
  append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
206
LABEL expert
 
207
  kernel /install/vmlinuz
 
208
  append $KERNEL_PARAMS $DEFAULT_PRESEED DEBCONF_PRIORITY=low vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
209
LABEL multiseat
 
210
  kernel /install/vmlinuz
 
211
  append $KERNEL_PARAMS $DEFAULT_PRESEED anna/choose_modules=multiseat-udeb vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
212
EOF
 
213
    if [ "$PROJECT" = edubuntu ]; then
 
214
        cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
215
LABEL workstation
 
216
  kernel /install/vmlinuz
 
217
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/workstation.seed vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
218
EOF
 
219
    fi
 
220
    if [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then
 
221
        cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
222
LABEL oem
 
223
  kernel /install/vmlinuz
 
224
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/oem.seed vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
225
EOF
 
226
    fi
 
227
fi
 
228
if [ "$CDIMAGE_INSTALL_BASE" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
 
229
    cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
230
LABEL server
 
231
  kernel /install/vmlinuz
 
232
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/server.seed vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
233
LABEL server-expert
 
234
  kernel /install/vmlinuz
 
235
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/server.seed DEBCONF_PRIORITY=low vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
236
EOF
 
237
fi
 
238
cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
239
LABEL rescue
 
240
  kernel /install/vmlinuz
 
241
  append $KERNEL_PARAMS rescue/enable=true vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
242
LABEL memtest
 
243
  kernel /install/mt86plus
 
244
  append -
 
245
DISPLAY isolinux.txt
 
246
TIMEOUT 0
 
247
PROMPT 1
 
248
F1 f1.txt
 
249
F2 f2.txt
 
250
F3 f3.txt
 
251
F4 f4.txt
 
252
F5 f5.txt
 
253
F6 f6.txt
 
254
F7 f7.txt
 
255
F8 f8.txt
 
256
F9 f9.txt
 
257
F0 f10.txt
 
258
EOF
 
259
 
 
260
fi
 
261
 
 
262
# write final lines to mkisofs_opts
 
263
if [ "$NN" = "1" ]; then
 
264
    echo -n "boot$N " >> $N.mkisofs_opts
 
265
else
 
266
    if [ -n "$THISTYPE" ]; then
 
267
        echo -n "-c boot/boot.catalog boot$N "  >> $N.mkisofs_opts
 
268
    fi
 
269
fi
 
270
 
 
271
# th,th, thats all