3
# Do install stuff for i386, including making bootable CDs
4
# Works with debian-installer
7
# $2 is the temporary CD build dir
9
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
16
if [ "$DI_WWW_HOME" = "default" ];then
17
DI_WWW_HOME="http://people.debian.org/~joeyh/d-i/images/daily"
19
if [ ! "$DI_DIST" ]; then
20
export DI_DIST="$DI_CODENAME"
22
if [ -z "$DI_TYPE" ]; then
23
DI_TYPE="$($BASEDIR/tools/find-newest-installer)"
28
DEFAULT_PRESEED='preseed/file=/cdrom/preseed/edubuntu.seed'
31
DEFAULT_PRESEED='preseed/file=/cdrom/preseed/kubuntu.seed'
34
DEFAULT_PRESEED='preseed/file=/cdrom/preseed/ubuntu-server.seed'
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.
48
# Strip NONUS part of disk number
49
# NN will be 1...N so it can be used as an index
51
NN=`echo $N | sed -e 's/_NONUS//'`
53
# List of boot image for each CD
54
KTYPE[1]="" #isolinux multiboot in fact
56
# XXX add net-image back when it's fixed
66
THISTYPE=${KTYPE[$NN]}
68
BOOT_IMAGES="cdrom/initrd.gz cdrom/initrd.list cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
70
TAR_IMAGES="netboot/netboot.tar.gz"
72
# Download boot images
73
for image in $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do
74
if [ ! -e "$image" ]; then
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"
81
wget "$DI_WWW_HOME/$image" -O "$image"
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
95
if [ -n "$THISTYPE" ]; then
96
echo "Using $THISTYPE boot-disks image on CD$N"
98
cp $THISTYPE/boot.img boot$N/boot/
99
echo -n "-cache-inodes -J -l -b boot/boot.img " > $N.mkisofs_opts
102
echo -n "-cache-inodes -J -l " > $N.mkisofs_opts
106
"$BASEDIR/tools/sorting_weights" "$N"
107
echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
109
#install_languages $CDDIR
111
# Only disk one gets the extra files installed
113
if [ "$NN" = "1" ]; then
116
# populate the install directory as well
117
for disk in $DISK_IMAGES; do
119
mkdir -p $CDDIR/install/$dir
120
cp -lf $disk $CDDIR/install/$dir
123
if [ "$CDIMAGE_INSTALL" = 1 ]; then
124
for tar in $TAR_IMAGES; do
126
mkdir -p $CDDIR/install/$dir
127
tar -C $CDDIR/install/$dir -xzpf $tar
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
151
if [ "$CDIMAGE_INSTALL" = 1 ]; then
152
rm -f boot$N/isolinux/*.txt.live
154
for x in boot$N/isolinux/*.txt.live; do
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
162
cp -p "$x" "boot$N/isolinux/${base%.dvd}"
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
169
cp -p "$x" "boot$N/isolinux/${base%.server}"
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
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 --
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 --
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 --
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 --
196
cat >> boot$N/isolinux/isolinux.cfg <<EOF
198
kernel /install/vmlinuz
199
append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
201
kernel /install/vmlinuz
202
append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
204
kernel /install/vmlinuz
205
append $KERNEL_PARAMS $DEFAULT_PRESEED vga=normal initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/rd/0 rw --
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 --
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 --
213
if [ "$PROJECT" = edubuntu ]; then
214
cat >> boot$N/isolinux/isolinux.cfg <<EOF
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 --
220
if [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then
221
cat >> boot$N/isolinux/isolinux.cfg <<EOF
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 --
228
if [ "$CDIMAGE_INSTALL_BASE" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
229
cat >> boot$N/isolinux/isolinux.cfg <<EOF
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 --
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 --
238
cat >> boot$N/isolinux/isolinux.cfg <<EOF
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 --
243
kernel /install/mt86plus
262
# write final lines to mkisofs_opts
263
if [ "$NN" = "1" ]; then
264
echo -n "boot$N " >> $N.mkisofs_opts
266
if [ -n "$THISTYPE" ]; then
267
echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts