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

« back to all changes in this revision

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

  • 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 amd64, 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://debian-amd64.alioth.debian.org/debian-installer/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
        else
 
80
                wget "$DI_WWW_HOME/$image" -O "$image"
 
81
        fi
 
82
    fi
 
83
done
 
84
 
 
85
if [ "$NN" = "1" ]; then
 
86
    echo "Using ISOLINUX boot-disks image on CD$N"
 
87
    mkdir -p boot$N/isolinux
 
88
    cp -f $BASEDIR/data/$DI_CODENAME/isolinux.bin boot$N/isolinux/
 
89
    cp -lf cdrom/vmlinuz $CDDIR/install/
 
90
    cp -lf cdrom/initrd.gz $CDDIR/install/
 
91
    cp -lf cdrom/initrd.list $CDDIR/install/
 
92
    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
 
93
else
 
94
    if [ -n "$THISTYPE" ]; then
 
95
        echo "Using $THISTYPE boot-disks image on CD$N"
 
96
        mkdir -p boot$N/boot
 
97
        cp $THISTYPE/boot.img boot$N/boot/
 
98
        echo -n "-cache-inodes -J -l -b boot/boot.img "  > $N.mkisofs_opts
 
99
    else
 
100
        mkdir boot$N
 
101
        echo -n "-cache-inodes -J -l " > $N.mkisofs_opts
 
102
    fi
 
103
fi
 
104
 
 
105
"$BASEDIR/tools/sorting_weights" "$N"
 
106
echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
 
107
 
 
108
#install_languages $CDDIR
 
109
 
 
110
# Only disk one gets the extra files installed
 
111
#
 
112
if [ "$NN" = "1" ]; then
 
113
 
 
114
 
 
115
# populate the install directory as well
 
116
for disk in $DISK_IMAGES; do
 
117
        dir=$(dirname $disk)
 
118
        mkdir -p $CDDIR/install/$dir
 
119
        cp -lf $disk $CDDIR/install/$dir
 
120
done
 
121
 
 
122
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
123
        for tar in $TAR_IMAGES; do
 
124
                dir=$(dirname $tar)
 
125
                mkdir -p $CDDIR/install/$dir
 
126
                tar -C $CDDIR/install/$dir -xzpf $tar
 
127
        done
 
128
fi
 
129
 
 
130
# ISOLINUX setup
 
131
 
 
132
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
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
fi
 
139
# Extract memtest86+ from the archive
 
140
MEMTEST86DEB="$($BASEDIR/tools/apt-selection cache show memtest86+ | \
 
141
        grep ^Filename | awk '{print $2}')"
 
142
ar p "$MIRROR/$MEMTEST86DEB" data.tar.gz | \
 
143
        tar xzf - -C $CDDIR/install/ ./boot/memtest86+.bin
 
144
mv $CDDIR/install/boot/memtest86+.bin $CDDIR/install/mt86plus
 
145
rm -rf $CDDIR/install/boot
 
146
# Isolinux help files come from d-i.
 
147
cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
 
148
# Override splash screen.
 
149
if [ "$SPLASHRLE" ] && [ -e "$SPLASHRLE" ]; then
 
150
    cp -p "$SPLASHRLE" boot$N/isolinux/splash.rle
 
151
fi
 
152
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
153
    rm -f boot$N/isolinux/*.txt.live
 
154
else
 
155
    for x in boot$N/isolinux/*.txt.live; do
 
156
        mv "$x" "${x%.live}"
 
157
    done
 
158
fi
 
159
if [ "$CDIMAGE_DVD" = 1 ] && [ "$CDIMAGE_LIVE" = 1 ]; then
 
160
    # overrides; these should go in debian-installer instead
 
161
    for x in $BASEDIR/data/$DI_CODENAME/isolinux/*.txt.dvd; do
 
162
        base="${x##*/}"
 
163
        cp -p "$x" "boot$N/isolinux/${base%.dvd}"
 
164
    done
 
165
fi
 
166
if [ "$PROJECT" = ubuntu-server ]; then
 
167
    # last-minute override for ubuntu-server
 
168
    for x in $BASEDIR/data/$DI_CODENAME/isolinux/*.txt.server; do
 
169
        base="${x##*/}"
 
170
        cp -p "$x" "boot$N/isolinux/${base%.server}"
 
171
    done
 
172
fi
 
173
sed -e "s#Ubuntu#$CAPPROJECT#g" boot$N/isolinux/syslinux.txt \
 
174
    > boot$N/isolinux/isolinux.txt
 
175
rm -f boot$N/isolinux/syslinux.txt
 
176
# Isolinux config file.
 
177
cat > boot$N/isolinux/isolinux.cfg <<EOF
 
178
DEFAULT /install/vmlinuz
 
179
EOF
 
180
if [ "$CDIMAGE_LIVE" = 1 ]; then
 
181
    cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
182
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 --
 
183
LABEL live
 
184
  kernel /install/vmlinuz
 
185
  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 --
 
186
LABEL live-expert
 
187
  kernel /install/vmlinuz
 
188
  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 --
 
189
EOF
 
190
fi
 
191
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
192
    if [ "$CDIMAGE_LIVE" != 1 ]; then
 
193
        cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
194
APPEND $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
195
EOF
 
196
    fi
 
197
    cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
198
LABEL install
 
199
  kernel /install/vmlinuz
 
200
  append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
201
LABEL linux
 
202
  kernel /install/vmlinuz
 
203
  append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
204
LABEL cdrom
 
205
  kernel /install/vmlinuz
 
206
  append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
207
LABEL expert
 
208
  kernel /install/vmlinuz
 
209
  append $KERNEL_PARAMS $DEFAULT_PRESEED DEBCONF_PRIORITY=low vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
210
EOF
 
211
    if [ "$PROJECT" = edubuntu ]; then
 
212
        cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
213
LABEL workstation
 
214
  kernel /install/vmlinuz
 
215
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/workstation.seed vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
216
EOF
 
217
    fi
 
218
    if [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then
 
219
        cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
220
LABEL oem
 
221
  kernel /install/vmlinuz
 
222
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/oem.seed vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
223
EOF
 
224
    fi
 
225
fi
 
226
if [ "$CDIMAGE_INSTALL_BASE" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
 
227
    cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
228
LABEL server
 
229
  kernel /install/vmlinuz
 
230
  append $KERNEL_PARAMS preseed/file=/cdrom/preseed/server.seed vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
231
LABEL server-expert
 
232
  kernel /install/vmlinuz
 
233
  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 --
 
234
EOF
 
235
fi
 
236
cat >> boot$N/isolinux/isolinux.cfg <<EOF
 
237
LABEL rescue
 
238
  kernel /install/vmlinuz
 
239
  append $KERNEL_PARAMS rescue/enable=true vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
 
240
LABEL memtest
 
241
  kernel /install/mt86plus
 
242
  append -
 
243
DISPLAY isolinux.txt
 
244
TIMEOUT 0
 
245
PROMPT 1
 
246
F1 f1.txt
 
247
F2 f2.txt
 
248
F3 f3.txt
 
249
F4 f4.txt
 
250
F5 f5.txt
 
251
F6 f6.txt
 
252
F7 f7.txt
 
253
F8 f8.txt
 
254
F9 f9.txt
 
255
F0 f10.txt
 
256
EOF
 
257
 
 
258
fi
 
259
 
 
260
# write final lines to mkisofs_opts
 
261
if [ "$NN" = "1" ]; then
 
262
    echo -n "boot$N " >> $N.mkisofs_opts
 
263
else
 
264
    if [ -n "$THISTYPE" ]; then
 
265
        echo -n "-c boot/boot.catalog boot$N "  >> $N.mkisofs_opts
 
266
    fi
 
267
fi
 
268
 
 
269
# th,th, thats all