3
# Do install stuff for amd64, 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://debian-amd64.alioth.debian.org/debian-installer/daily"
19
if [ ! "$DI_DIST" ]; then
20
export DI_DIST="$DI_CODENAME"
22
if [ -z "$DI_PATH" ]; then
23
DI_PATH="$($BASEDIR/tools/find-newest-installer)"
32
# This script is called with $1 (now $N) as the CD to
33
# make bootable. N may be in the form "n" or "n_NONUS"
34
# There may be more than 4 disks...support extras.
36
# Strip NONUS part of disk number
37
# NN will be 1...N so it can be used as an index
39
NN=`echo $N | sed -e 's/_NONUS//'`
41
if [ "$CDIMAGE_ADDON" ]; then
42
# second disk, at least in spirit
50
echo -n "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin " >> $N.mkisofs_opts
51
# uncomment to add a small FAT partition on the media
52
# /sbin/mkfs.msdos -n Bla -C test.fat 8192
53
# echo -n "-append_partition 2 0x01 test.fat " >> $N.mkisofs_opts
57
# List of boot image for each CD
58
KTYPE[1]="" #isolinux multiboot in fact
60
# XXX add net-image back when it's fixed
70
THISTYPE=${KTYPE[$NN]}
72
PREFIX_PRESEED="$(dirname "$DEFAULT_PRESEED")/"
75
KERNEL_PREFIXES="PREFIX_GA"
76
if [ "$BACKPORT_KERNEL" ]; then
78
if [ "$PROJECT" = ubuntu-server ]; then
79
KERNEL_PREFIXES="$KERNEL_PREFIXES PREFIX_HWE"
86
for kp in $KERNEL_PREFIXES; do
87
BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/initrd.gz ${!kp}cdrom/vmlinuz ${!kp}cdrom/debian-cd_info.tar.gz"
88
TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz"
93
if [ "$CDIMAGE_LIVE" ]; then
104
# Download boot images
105
for image in MANIFEST.udebs $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do
106
if [ ! -e "$image" ]; then
107
dir=$(dirname $image)
109
if [ ! "$DI_WWW_HOME" ];then
110
cp "$DI_PATH/current/images/$image" "$image"
112
wget "$DI_WWW_HOME/$image" -O "$image"
117
if [ "$NN" = "1" ]; then
118
list_kernel_abis $BOOT_IMAGES | check_kernel_sync $FLAVOUR
120
echo "Using ISOLINUX boot-disks image on CD$N"
121
mkdir -p $CDDIR/../syslinux boot$N/isolinux
122
SYSLINUXDEB="$($BASEDIR/tools/apt-selection cache show syslinux-common | \
123
grep ^Filename | awk '{print $2}')"
124
(dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \
125
tar xf - -C $CDDIR/../syslinux ./usr/lib)
126
ISOLINUXDEB="$($BASEDIR/tools/apt-selection cache show isolinux | \
127
grep ^Filename | awk '{print $2}')"
128
(dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \
129
tar xf - -C $CDDIR/../syslinux ./usr/lib)
130
cp -f $CDDIR/../syslinux/usr/lib/ISOLINUX/isolinux.bin boot$N/isolinux/
131
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/vesamenu.c32 boot$N/isolinux/
132
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/
133
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/
134
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/
135
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/gfxboot.c32 boot$N/isolinux/
136
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/chain.c32 boot$N/isolinux/
139
if THEMEDEB="$($BASEDIR/tools/apt-selection cache show gfxboot-theme-ubuntu)"; then
140
THEMEDEB="$(echo "$THEMEDEB" | grep ^Filename | awk '{print $2}')"
141
dpkg --fsys-tarfile "$MIRROR/$THEMEDEB" | tar xf - -C . ./usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz
142
tar zxf usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz -C boot$N/isolinux
147
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
148
for kp in $KERNEL_PREFIXES; do
149
cp -lf "${!kp}cdrom/vmlinuz" "$CDDIR/install/${!kp}vmlinuz"
150
cp -lf "${!kp}cdrom/initrd.gz" "$CDDIR/install/${!kp}initrd.gz"
153
if [ "$CDIMAGE_LIVE" = 1 ]; then
154
if [ -e "$CDDIR/casper/filesystem.kernel-$FLAVOUR.efi.signed" ]; then
155
mv $CDDIR/casper/filesystem.kernel-$FLAVOUR.efi.signed $CDDIR/casper/vmlinuz.efi
156
rm -f $CDDIR/casper/filesystem.kernel-$FLAVOUR
157
CASPER_KERNEL=/casper/vmlinuz.efi
159
mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR/casper/vmlinuz
160
CASPER_KERNEL=/casper/vmlinuz
162
CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
163
mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
165
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
168
echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus " >> $N.mkisofs_opts
171
echo -n "-eltorito-alt-boot -efi-boot boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts
175
if [ -n "$THISTYPE" ]; then
176
echo "Using $THISTYPE boot-disks image on CD$N"
178
cp $THISTYPE/boot.img boot$N/boot/
179
echo -n "-cache-inodes -J -l -b boot/boot.img " >> $N.mkisofs_opts
182
echo -n "-cache-inodes -J -l " >> $N.mkisofs_opts
190
"$BASEDIR/tools/sorting_weights" "$N" boot$N/isolinux/isolinux.bin boot$N/isolinux/boot.cat
191
echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
195
#install_languages $CDDIR
197
# Only disk one gets the extra files installed
199
if [ "$NN" = "1" ]; then
203
if [ "$CDIMAGE_LIVE" = 1 ] && [ "$CDIMAGE_DVD" != 1 ]; then
205
ubuntu|ubuntu-netbook|xubuntu|ubuntukylin|kubuntu|kubuntu-plasma5|ubuntu-gnome|ubuntu-desktop-next|ubuntu-mate|ubuntu-budgie)
212
if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-access.pcx" ]; then
213
ACCESSPCX="$PROJECT-access.pcx"
215
ACCESSPCX=access-new.pcx
217
if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-blank.pcx" ]; then
218
BLANKPCX="$PROJECT-blank.pcx"
224
# populate the install directory as well
225
for disk in $DISK_IMAGES; do
227
mkdir -p $CDDIR/install/$dir
228
cp -lf $disk $CDDIR/install/$dir
231
if [ "$CDIMAGE_INSTALL" = 1 ]; then
232
for tar in $TAR_IMAGES; do
234
mkdir -p $CDDIR/install/$dir
235
tar -C $CDDIR/install/$dir -xzpf $tar
241
if [ "$CDIMAGE_INSTALL" = 1 ]; then
242
# Include Smart Boot Manager image for people where isolinux fails
243
gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
244
# Keep the original file timestamp
245
touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin
246
cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/
248
# Extract memtest86+ from the archive
249
MEMTEST86DEB="$($BASEDIR/tools/apt-selection cache show memtest86+ | \
250
grep ^Filename | awk '{print $2}')"
251
dpkg --fsys-tarfile "$MIRROR/$MEMTEST86DEB" | \
252
tar xf - -C $CDDIR/install/ ./boot/memtest86+.bin
253
mv $CDDIR/install/boot/memtest86+.bin $CDDIR/install/mt86plus
254
rm -rf $CDDIR/install/boot
255
# Isolinux help files come from d-i.
256
cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
257
# Override splash screen.
258
if [ "$SPLASHRLE" ] && [ -e "$SPLASHRLE" ]; then
259
cp -p "$SPLASHRLE" boot$N/isolinux/splash.rle
261
if [ "$GFXSPLASH" ] && [ -e "$GFXSPLASH" ]; then
262
cp -p "$GFXSPLASH" boot$N/isolinux/splash.pcx
264
if [ "$SPLASHPNG" ] && [ -e "$SPLASHPNG" ]; then
265
cp -p "$SPLASHPNG" boot$N/isolinux/splash.png
267
if [ "$HIDDEN_TIMEOUT" ] && [ "$ACCESSPCX" ]; then
268
cp -p "$BASEDIR/data/$DI_CODENAME/$ACCESSPCX" boot$N/isolinux/access.pcx
270
if [ "$HIDDEN_TIMEOUT" = 2 ]; then
271
cp -p "$BASEDIR/data/$DI_CODENAME/$BLANKPCX" boot$N/isolinux/blank.pcx
273
if [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then
275
echo en >boot$N/isolinux/lang
276
elif [ "$PROJECT" = ubuntukylin ]; then
277
echo zh_CN >boot$N/isolinux/lang
279
# Remove elilo configuration; only for Macs.
280
rm -f boot$N/isolinux/elilo*
281
rm -f boot$N/isolinux/*.msg*
282
if [ "$CDIMAGE_INSTALL" = 1 ]; then
283
rm -f boot$N/isolinux/*.txt.live
284
rm -f boot$N/isolinux/*.hlp.live
286
for x in boot$N/isolinux/*.txt.live; do
287
[ -f "$x" ] || continue
290
for x in boot$N/isolinux/*.hlp.live; do
291
[ -f "$x" ] || continue
295
# Nuke the GTK menu items for now.
296
rm -f boot$N/isolinux/*gtk.cfg
297
rm -f boot$N/isolinux/*.txt.withgtk
298
# We only support single-architecture images.
299
sed -i 's|%install%|install|' boot$N/isolinux/*.cfg
300
# Move GRUB files to the right place.
301
mkdir -p $CDDIR/EFI/BOOT
302
mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/BOOTx64.EFI $CDDIR/EFI/BOOT/BOOTx64.EFI
303
mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/grubx64.efi $CDDIR/EFI/BOOT/grubx64.efi
304
mkdir -p $CDDIR/boot/grub
305
mv boot$N/isolinux/grub/* $CDDIR/boot/grub/
306
rmdir boot$N/isolinux/grub
307
sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
309
if [ "$BACKPORT_KERNEL" ]; then
310
cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF
311
submenu 'Boot and Install with the HWE kernel' {
313
: > boot$N/isolinux/hwe-gfxboot.cfg
316
# Set up-to-date build dates. Kludgy because d-i sets its own version as
318
DI_VERSION="$(perl -lne 'if (/built on ([0-9a-z]*)/) { print $1 }' \
319
"boot$N/isolinux/f1.txt")"
320
if [ "$DI_VERSION" ]; then
321
: "${CDIMAGE_DATE:=$(date +%Y%m%d)}"
322
sed -i "s/$DI_VERSION/$CDIMAGE_DATE/g" \
323
"boot$N"/isolinux/*.txt "boot$N"/isolinux/*.hlp
326
if [ "$HIDDEN_TIMEOUT" ]; then
328
elif [ "$CDIMAGE_LIVE" = 1 ]; then
333
sed -i "s/^timeout .*/timeout $timeout/" \
334
boot$N/isolinux/isolinux.cfg boot$N/isolinux/prompt.cfg
335
# Isolinux config file.
336
if [ "$CDIMAGE_LIVE" = 1 ]; then
339
DEFAULT_LABEL=install
341
cat > boot$N/isolinux/txt.cfg <<EOF
342
default $DEFAULT_LABEL
344
> boot$N/isolinux/adtxt.cfg
345
if [ "$GFXBOOT" ]; then
346
cat >> boot$N/isolinux/isolinux.cfg <<EOF
350
if [ "$PROJECT" = ubuntu ] || [ "$PROJECT" = ubuntu-server ] || \
351
[ "$PROJECT" = ubuntu-mid ] || [ "$PROJECT" = ubuntu-netbook ] || \
352
[ "$PROJECT" = mythbuntu ] || [ "$PROJECT" = ubuntukylin ] || \
353
[ "$PROJECT" = ubuntu-desktop-next ]; then
354
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
357
screen-colour=0x270A1E
360
if [ "$PROJECT" = ubuntu-gnome ]; then
361
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
362
screen-colour=0x2D3335
365
if [ "$PROJECT" = ubuntu-budgie ]; then
366
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
369
screen-colour=0x383c4a
372
if [ "$PROJECT" = ubuntu-mate ]; then
373
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
376
screen-colour=0x3c3b37
379
if [ "$HIDDEN_TIMEOUT" ]; then
380
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
381
hidden-timeout=$HIDDEN_TIMEOUT
384
# access-options default: v1 v2 v3 brltty m1 m2
385
# d-i only supports v1 and brltty right now.
386
if [ "$CDIMAGE_LIVE" != 1 ]; then
387
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
388
access-options=v1 brltty
389
access-options-v1=access=v1 FRONTEND_BACKGROUND=dark
391
elif [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then
392
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
393
access-options=v1 v2 brltty m1
395
elif [ "$PROJECT" = xubuntu ]; then
396
# v1 and m1 don't have the necessary sed calls for Xubuntu yet.
397
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
398
access-options=v2 v3 brltty m2
401
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
405
if [ "$CDIMAGE_LIVE" = 1 ]; then
406
if [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then
407
livelabel="^Start $HUMANPROJECT"
408
liveparams=' maybe-ubiquity'
410
livelabel="^Try $HUMANPROJECT without installing"
413
cat >> boot$N/isolinux/txt.cfg <<EOF
415
menu label $livelabel
416
kernel $CASPER_KERNEL
417
append $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper$liveparams initrd=$CASPER_INITRD quiet splash ---
419
cat >> $CDDIR/boot/grub/grub.cfg <<EOF
420
menuentry "${livelabel#^}" {
422
linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper$liveparams quiet splash ---
423
initrd $CASPER_INITRD
426
cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
427
menuentry "${livelabel#^}" {
429
linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper$liveparams iso-scan/filename=\${iso_path} quiet splash ---
430
initrd $CASPER_INITRD
433
if [ "$PROJECT" != ubuntu-mid ] && [ "$PROJECT" != kubuntu ] && [ "$PROJECT" != kubuntu-plasma5 ]; then
434
cat >> boot$N/isolinux/txt.cfg <<EOF
436
menu label ^Install $HUMANPROJECT
437
kernel $CASPER_KERNEL
438
append $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper only-ubiquity initrd=$CASPER_INITRD quiet splash ---
440
cat >> $CDDIR/boot/grub/grub.cfg <<EOF
441
menuentry "Install $HUMANPROJECT" {
443
linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper only-ubiquity quiet splash ---
444
initrd $CASPER_INITRD
447
cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
448
menuentry "Install $HUMANPROJECT" {
449
linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---
450
initrd $CASPER_INITRD
454
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
455
label driverupdates=Use driver update disc
456
append driverupdates=debian-installer/driver-update=true
457
applies driverupdates=live live-install
460
if [ "$CDIMAGE_INSTALL" = 1 ]; then
461
if [ "$CDIMAGE_LIVE" != 1 ]; then
462
for kp in $KERNEL_PREFIXES; do
463
cat >> boot$N/isolinux/txt.cfg <<EOF
465
menu label ^Install $HUMANPROJECT${!kp:+ with the HWE kernel}
466
kernel /install/${!kp}vmlinuz
467
append $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} vga=788 initrd=/install/${!kp}initrd.gz quiet ---
469
cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
470
menuentry "Install $HUMANPROJECT" {
472
linux /install/${!kp}vmlinuz $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet ---
473
initrd /install/${!kp}initrd.gz
478
cat >> boot$N/isolinux/txt.cfg <<EOF
480
menu label ^Install $HUMANPROJECT in text mode
481
kernel /install/vmlinuz
482
append $KERNEL_PARAMS $DEFAULT_PRESEED vga=788 initrd=/install/initrd.gz quiet ---
484
cat >> $CDDIR/boot/grub/grub.cfg <<EOF
485
menuentry "Install $HUMANPROJECT in text mode" {
487
linux /install/vmlinuz $KERNEL_PARAMS $DEFAULT_PRESEED quiet ---
488
initrd /install/initrd.gz
492
cat >> boot$N/isolinux/adtxt.cfg <<EOF
495
kernel /install/vmlinuz
496
append $KERNEL_PARAMS $DEFAULT_PRESEED priority=low vga=788 initrd=/install/initrd.gz ---
498
if [ "$PROJECT" = edubuntu ]; then
499
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
500
label workstation=Install a workstation
501
replace workstation=file=/cdrom/preseed/workstation.seed
502
applies workstation=install
505
if [ "$CDIMAGE_DVD" = 1 ] && [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then
506
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
507
label server=Install a server
508
replace server=file=/cdrom/preseed/ubuntu-server.seed
509
applies server=install
513
# The GRUB versions of this only correspond to single isolinux labels,
514
# because we don't yet have the necessary technology in our GRUB menu stack
515
# to have a two-dimensional set of boot options, as is implemented for
516
# isolinux using the gfxboot "applies" keyword.
517
for kp in $KERNEL_PREFIXES; do
518
cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
519
label ${!kp}oem=OEM install (for manufacturers)
520
append ${!kp}oem=oem-config/enable=true
522
if [ "$CDIMAGE_LIVE" = 1 ]; then
523
cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
524
applies ${!kp}oem=live live-install install
526
cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
527
menuentry "OEM install (for manufacturers)" {
529
linux $CASPER_KERNEL $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} boot=casper only-ubiquity quiet splash oem-config/enable=true ---
530
initrd $CASPER_INITRD
534
cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
535
applies ${!kp}oem=${!kp}install
537
cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
538
menuentry "OEM install (for manufacturers)" {
540
linux /install/${!kp}vmlinuz $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet oem-config/enable=true ---
541
initrd /install/${!kp}initrd.gz
546
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
547
if [ "$PROJECT" != ubuntu-server ]; then
548
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
549
label cli=Install a command-line system
550
replace cli=file=/cdrom/preseed/cli.seed
554
for kp in $KERNEL_PREFIXES; do
555
cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
556
label ${!kp}minimal=Install a minimal system
557
replace ${!kp}minimal=file=/cdrom/preseed/${!kp}ubuntu-server-minimal.seed
558
applies ${!kp}minimal=${!kp}install
559
label ${!kp}minimalvm=Install a minimal virtual machine
560
replace ${!kp}minimalvm=file=/cdrom/preseed/${!kp}ubuntu-server-minimalvm.seed
561
applies ${!kp}minimalvm=${!kp}install
564
# This really ought to be in gfxboot.cfg instead, but we want to
565
# make it particularly prominent.
566
cat >> boot$N/isolinux/txt.cfg <<EOF
568
menu label ^Install MAAS Region Controller
569
kernel /install/vmlinuz
570
append $KERNEL_PARAMS $FRONTEND_BACKGROUND modules=maas-region-udeb vga=788 initrd=/install/initrd.gz quiet ---
573
menu label ^Install MAAS Rack Controller
574
kernel /install/vmlinuz
575
append $KERNEL_PARAMS $FRONTEND_BACKGROUND modules=maas-rack-udeb vga=788 initrd=/install/initrd.gz quiet ---
577
for kp in $KERNEL_PREFIXES; do
578
cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
579
menuentry "Install MAAS Region Controller" {
581
linux /install/${!kp}vmlinuz $KERNEL_PARAMS modules=maas-region-udeb vga=788 initrd=/install/${!kp}initrd.gz quiet ---
582
initrd /install/${!kp}initrd.gz
585
menuentry "Install MAAS Rack Controller" {
587
linux /install/${!kp}vmlinuz $KERNEL_PARAMS modules=maas-rack-udeb vga=788 initrd=/install/${!kp}initrd.gz quiet ---
588
initrd /install/${!kp}initrd.gz
594
if [ "$CDIMAGE_INSTALL" = 1 ] && ([ "$PROJECT" = ubuntu ] || [ "$PROJECT" = xubuntu ] || [ "$PROJECT" = edubuntu ] || [ "$PROJECT" = ubuntu-mate ]); then
595
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
596
label ltsp=Install an LTSP server
597
replace ltsp=file=/cdrom/preseed/ltsp.seed
601
if [ "$CDIMAGE_INSTALL" = 1 ] && [ "$PROJECT" = mythbuntu ]; then
602
cat >> boot$N/isolinux/gfxboot.cfg <<EOF
603
label ltsp=Install a Diskless Image Server
604
replace ltsp=file=/cdrom/preseed/ltsp.seed
608
if [ "$CDIMAGE_LIVE" = 1 ]; then
609
cat >> boot$N/isolinux/txt.cfg <<EOF
611
menu label ^Check disc for defects
612
kernel $CASPER_KERNEL
613
append $KERNEL_PARAMS boot=casper integrity-check initrd=$CASPER_INITRD quiet splash ---
615
cat >> $CDDIR/boot/grub/grub.cfg <<EOF
616
menuentry "Check disc for defects" {
618
linux $CASPER_KERNEL $KERNEL_PARAMS boot=casper integrity-check quiet splash ---
619
initrd $CASPER_INITRD
622
cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
623
menuentry "Check disc for defects" {
624
linux $CASPER_KERNEL $KERNEL_PARAMS boot=casper integrity-check iso-scan/filename=\${iso_path} quiet splash ---
625
initrd $CASPER_INITRD
628
elif [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
629
cat >> boot$N/isolinux/txt.cfg <<EOF
631
menu label ^Check disc for defects
632
kernel /install/vmlinuz
633
append $KERNEL_PARAMS $FRONTEND_BACKGROUND MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet ---
635
for kp in $KERNEL_PREFIXES; do
636
cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
637
menuentry "Check disc for defects" {
639
linux /install/${!kp}vmlinuz $KERNEL_PARAMS MENU=/bin/cdrom-checker-menu quiet ---
640
initrd /install/${!kp}initrd.gz
645
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
646
cat >> boot$N/isolinux/adtxt.cfg <<EOF
648
menu label ^Rescue a broken system
649
kernel /install/vmlinuz
650
append $KERNEL_PARAMS $FRONTEND_BACKGROUND rescue/enable=true vga=788 initrd=/install/initrd.gz ---
652
for kp in $KERNEL_PREFIXES; do
653
cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
654
menuentry "Rescue a broken system" {
656
linux /install/${!kp}vmlinuz $KERNEL_PARAMS rescue/enable=true ---
657
initrd /install/${!kp}initrd.gz
662
cat >> boot$N/isolinux/txt.cfg <<EOF
664
menu label Test ^memory
665
kernel /install/mt86plus
667
menu label ^Boot from first hard disk
670
cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
671
menuentry "Test memory" {
672
linux16 /install/mt86plus
677
if [ "$BACKPORT_KERNEL" ] && [ "$PROJECT" = ubuntu-server ]; then
678
cat >> $CDDIR/boot/grub/hwe-grub.cfg <<EOF
681
cat $CDDIR/boot/grub/hwe-grub.cfg >> $CDDIR/boot/grub/grub.cfg
682
cat boot$N/isolinux/hwe-gfxboot.cfg >> boot$N/isolinux/gfxboot.cfg
684
rm -f $CDDIR/boot/grub/hwe-grub.cfg boot$N/isolinux/hwe-gfxboot.cfg
686
# write final lines to mkisofs_opts
687
if [ "$NN" = "1" ]; then
688
echo -n "boot$N " >> $N.mkisofs_opts
690
if [ -n "$THISTYPE" ]; then
691
echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts
695
# Hack around the removal of support in gfxboot for reading from outside
696
# the bootlogo archive. This makes customisation harder and is not ideal.
697
tmpdir="$(mktemp -d)"
698
(cd "$tmpdir" && cpio -i) < boot$N/isolinux/bootlogo
699
cp -a boot$N/isolinux/*.fnt \
700
boot$N/isolinux/*.hlp \
701
boot$N/isolinux/*.jpg \
702
boot$N/isolinux/*.pcx \
703
boot$N/isolinux/*.tr \
704
boot$N/isolinux/*.cfg \
705
$(test -e boot$N/isolinux/lang && echo boot$N/isolinux/lang) \
706
boot$N/isolinux/langlist \
708
(cd "$tmpdir" && ls -1 | cpio --quiet -o) > boot$N/isolinux/bootlogo