Merge lp:~xnox/debian-cd/cd-boot-images-amd64 into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 2076
Proposed branch: lp:~xnox/debian-cd/cd-boot-images-amd64
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 840 lines (+105/-703)
2 files modified
tools/boot/groovy/boot-amd64 (+73/-703)
tools/boot/groovy/common.sh (+32/-0)
To merge this branch: bzr merge lp:~xnox/debian-cd/cd-boot-images-amd64
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Ubuntu CD Image Team Pending
VCS imports Pending
Review via email: mp+386094@code.launchpad.net

Commit message

groovy: switch boot-amd64 to cd-boot-images-amd64

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Tested CD-ROM & USB boot, under:
 * bare metal
 * BIOS KVM
 * UEFI KVM

Not Tested:
 * Recent Macbook booting

I currently do not provide HFS+ partition table, with a "blessed" bootloader. I do not know if that is still required on recent Macbooks. If it fails to boot, we can add those, but as far as I know this was fixed and is no longer needed on Macbooks.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Please review this

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

cd-boot-images-amd64 is now in the archive.

Revision history for this message
Steve Langasek (vorlon) :
review: Needs Information
Revision history for this message
Steve Langasek (vorlon) wrote :

Discussed elsewhere that these options are documented in the .info for xorissofs instead of in the manpage or the help output (sigh)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/boot/groovy/boot-amd64'
2--- tools/boot/groovy/boot-amd64 2020-05-21 21:59:34 +0000
3+++ tools/boot/groovy/boot-amd64 2020-06-19 13:49:32 +0000
4@@ -12,682 +12,87 @@
5
6 N=$1
7 CDDIR=$2
8-BOOTDIR=
9-if [ "$DI_WWW_HOME" = "default" ];then
10- DI_WWW_HOME="http://debian-amd64.alioth.debian.org/debian-installer/daily"
11-fi
12-if [ ! "$DI_DIST" ]; then
13- export DI_DIST="$DI_CODENAME"
14-fi
15-if [ -z "$DI_PATH" ]; then
16- DI_PATH="$($BASEDIR/tools/find-newest-installer)"
17-fi
18-
19-default_preseed
20-default_language
21-
22 cd $CDDIR/..
23
24-#
25-# This script is called with $1 (now $N) as the CD to
26-# make bootable. N may be in the form "n" or "n_NONUS"
27-# There may be more than 4 disks...support extras.
28-
29-# Strip NONUS part of disk number
30-# NN will be 1...N so it can be used as an index
31-#
32-NN=`echo $N | sed -e 's/_NONUS//'`
33-
34-if [ "$CDIMAGE_ADDON" ]; then
35- # second disk, at least in spirit
36- NN=2
37-fi
38-
39 > $N.mkisofs_opts
40
41-case "$MKISOFS" in
42- *xorriso*)
43- echo -n "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin " >> $N.mkisofs_opts
44- # uncomment to add a small FAT partition on the media
45- # /sbin/mkfs.msdos -n Bla -C test.fat 8192
46- # echo -n "-append_partition 2 0x01 test.fat " >> $N.mkisofs_opts
47+# pick default kernel
48+FLAVOUR=generic
49+if [ "$PROJECT" = "ubuntustudio" ]; then
50+ FLAVOUR=lowlatency
51+fi
52+
53+# rename kernel+initrd
54+mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR/casper/vmlinuz
55+mv $CDDIR/casper/filesystem.initrd-$FLAVOUR $CDDIR/casper/initrd
56+HWE=
57+if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then
58+ HWE="true"
59+ mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinuz
60+ mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd
61+fi
62+
63+# download, extract and include cd-boot-images
64+mkdir cd-boot-images
65+$BASEDIR/tools/apt-selection download cd-boot-images-amd64
66+dpkg --fsys-tarfile cd-boot-images-amd64*_all.deb | tar xf - -C cd-boot-images
67+echo -n "-J -joliet-long -l -b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr cd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/i386-pc/boot_hybrid.img --efi-boot boot/grub/efi.img -efi-boot-part --efi-boot-image -partition_offset 16 cd-boot-images/usr/share/cd-boot-images-amd64/tree" >> $N.mkisofs_opts
68+
69+default_kernel_params
70+
71+# generate grub.cfg
72+mkdir -p $CDDIR/boot/grub/
73+cat >> $CDDIR/boot/grub/grub.cfg <<EOF
74+set timeout=30
75+
76+loadfont unicode
77+
78+set menu_color_normal=white/black
79+set menu_color_highlight=black/light-gray
80+
81+menuentry "$HUMANPROJECT" {
82+ set gfxpayload=keep
83+ linux /casper/vmlinuz $KERNEL_PARAMS
84+ initrd /casper/initrd
85+}
86+EOF
87+
88+# All but server get safe-graphics mode
89+if [ "$PROJECT" != "ubuntu-server" ]; then
90+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
91+menuentry "$HUMANPROJECT (safe graphics)" {
92+ set gfxpayload=keep
93+ linux /casper/vmlinuz nomodeset $KERNEL_PARAMS
94+ initrd /casper/initrd
95+}
96+EOF
97+fi
98+
99+# ubiquity based projects get OEM mode
100+case $KERNEL_PARAMS in
101+ *maybe-ubiquity*)
102+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
103+menuentry "OEM install (for manufacturers)" {
104+ set gfxpayload=keep
105+ linux /casper/vmlinuz ${KERNEL_PARAMS/maybe-ubiquity/only-ubiquity oem-config/enable=true}
106+ initrd /casper/initrd
107+}
108+EOF
109 ;;
110 esac
111
112-# List of boot image for each CD
113-KTYPE[1]="" #isolinux multiboot in fact
114-KTYPE[2]=""
115-# XXX add net-image back when it's fixed
116-KTYPE[3]=""
117-KTYPE[4]=""
118-KTYPE[5]=""
119-KTYPE[6]=""
120-KTYPE[7]=""
121-KTYPE[8]=""
122-KTYPE[9]=""
123-KTYPE[10]=""
124-
125-THISTYPE=${KTYPE[$NN]}
126-
127-PREFIX_PRESEED="$(dirname "$DEFAULT_PRESEED")/"
128-PREFIX_GA=""
129-PREFIX_HWE=""
130-KERNEL_PREFIXES="PREFIX_GA"
131-if [ "$BACKPORT_KERNEL" ]; then
132- PREFIX_HWE="hwe-"
133- if [ "$PROJECT" = ubuntu-server ]; then
134- KERNEL_PREFIXES="$KERNEL_PREFIXES PREFIX_HWE"
135- fi
136-fi
137-
138-DISK_IMAGES=""
139-BOOT_IMAGES=""
140-TAR_IMAGES=""
141-for kp in $KERNEL_PREFIXES; do
142- BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/initrd.gz ${!kp}cdrom/vmlinuz ${!kp}cdrom/debian-cd_info.tar.gz"
143- TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz"
144-done
145-
146-case $PROJECT in
147- ubuntustudio)
148- if [ "$CDIMAGE_LIVE" ]; then
149- FLAVOUR=lowlatency
150- else
151- FLAVOUR=generic
152- fi
153- ;;
154- *)
155- FLAVOUR=generic
156- ;;
157-esac
158-
159-# Download boot images
160-for image in MANIFEST.udebs $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do
161- if [ ! -e "$image" ]; then
162- dir=$(dirname $image)
163- mkdir -p $dir
164- if [ ! "$DI_WWW_HOME" ];then
165- cp "$DI_PATH/current/legacy-images/$image" "$image"
166- else
167- wget "$DI_WWW_HOME/$image" -O "$image"
168- fi
169- fi
170-done
171-
172-if [ "$NN" = "1" ]; then
173- list_kernel_abis $BOOT_IMAGES | check_kernel_sync $FLAVOUR
174-
175- echo "Using ISOLINUX boot-disks image on CD$N"
176- mkdir -p $CDDIR/../syslinux boot$N/isolinux
177- SYSLINUXDEB="$($BASEDIR/tools/apt-selection cache show syslinux-common | \
178- grep ^Filename | awk '{print $2}')"
179- (dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \
180- tar xf - -C $CDDIR/../syslinux ./usr/lib)
181- ISOLINUXDEB="$($BASEDIR/tools/apt-selection cache show isolinux | \
182- grep ^Filename | awk '{print $2}')"
183- (dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \
184- tar xf - -C $CDDIR/../syslinux ./usr/lib)
185- cp -f $CDDIR/../syslinux/usr/lib/ISOLINUX/isolinux.bin boot$N/isolinux/
186- cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/vesamenu.c32 boot$N/isolinux/
187- cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/
188- cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/
189- cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/
190- cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/gfxboot.c32 boot$N/isolinux/
191- cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/chain.c32 boot$N/isolinux/
192-
193- GFXBOOT=
194- if THEMEDEB="$($BASEDIR/tools/apt-selection cache show gfxboot-theme-ubuntu)"; then
195- THEMEDEB="$(echo "$THEMEDEB" | grep ^Filename | awk '{print $2}')"
196- dpkg --fsys-tarfile "$MIRROR/$THEMEDEB" | tar xf - -C . ./usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz
197- tar zxf usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz -C boot$N/isolinux
198- GFXBOOT=1
199- fi
200-
201- rm -rf usr
202- if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
203- for kp in $KERNEL_PREFIXES; do
204- cp -lf "${!kp}cdrom/vmlinuz" "$CDDIR/install/${!kp}vmlinuz"
205- cp -lf "${!kp}cdrom/initrd.gz" "$CDDIR/install/${!kp}initrd.gz"
206- done
207- fi
208- if [ "$CDIMAGE_LIVE" = 1 ]; then
209- CASPER_KERNEL=/casper/vmlinuz
210- CASPER_INITRD=/casper/initrd
211- for kernel in $CDDIR/casper/filesystem.kernel-*; do
212- flavour=${kernel##*filesystem.kernel-}
213- flavour2="-${flavour}"
214- [ "$flavour" = "${FLAVOUR}" ] && flavour2=""
215- mv $CDDIR/casper/filesystem.kernel-$flavour $CDDIR$CASPER_KERNEL${flavour2}
216- mv $CDDIR/casper/filesystem.initrd-$flavour $CDDIR$CASPER_INITRD${flavour2}
217- done
218- fi
219- 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
220- case "$MKISOFS" in
221- *xorriso*)
222- echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus " >> $N.mkisofs_opts
223- ;;
224- *)
225- echo -n "-eltorito-alt-boot -efi-boot boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts
226- ;;
227- esac
228-else
229- if [ -n "$THISTYPE" ]; then
230- echo "Using $THISTYPE boot-disks image on CD$N"
231- mkdir -p boot$N/boot
232- cp $THISTYPE/boot.img boot$N/boot/
233- echo -n "-cache-inodes -J -l -b boot/boot.img " >> $N.mkisofs_opts
234- else
235- mkdir boot$N
236- echo -n "-cache-inodes -J -l " >> $N.mkisofs_opts
237- fi
238-fi
239-
240-case "$MKISOFS" in
241- *xorriso*)
242- ;;
243- *)
244- "$BASEDIR/tools/sorting_weights" "$N" boot$N/isolinux/isolinux.bin boot$N/isolinux/boot.cat
245- echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
246- ;;
247-esac
248-
249-# Only disk one gets the extra files installed
250-#
251-if [ "$NN" = "1" ]; then
252-
253-
254-HIDDEN_TIMEOUT=
255-if [ "$CDIMAGE_LIVE" = 1 ] && [ "$CDIMAGE_DVD" != 1 ]; then
256- case $PROJECT in
257- mythbuntu)
258- HIDDEN_TIMEOUT=1
259- ;;
260- lubuntu)
261- # Lubuntu appears to be an exception, being a live image but not
262- # using hidden timeout.
263- ;;
264- *)
265- HIDDEN_TIMEOUT=2
266- ;;
267- esac
268- if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-access.pcx" ]; then
269- ACCESSPCX="$PROJECT-access.pcx"
270- else
271- ACCESSPCX=access-new.pcx
272- fi
273- if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-blank.pcx" ]; then
274- BLANKPCX="$PROJECT-blank.pcx"
275- else
276- BLANKPCX=blank.pcx
277- fi
278-fi
279-
280-# populate the install directory as well
281-for disk in $DISK_IMAGES; do
282- dir=$(dirname $disk)
283- mkdir -p $CDDIR/install/$dir
284- cp -lf $disk $CDDIR/install/$dir
285-done
286-
287-if [ "$CDIMAGE_INSTALL" = 1 ]; then
288- for tar in $TAR_IMAGES; do
289- dir=$(dirname $tar)
290- mkdir -p $CDDIR/install/$dir
291- tar -C $CDDIR/install/$dir -xzpf $tar
292- done
293-fi
294-
295-# ISOLINUX setup
296-
297-if [ "$CDIMAGE_INSTALL" = 1 ]; then
298- # Include Smart Boot Manager image for people where isolinux fails
299- gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
300- # Keep the original file timestamp
301- touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin
302- cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/
303-fi
304-# Extract memtest86+ from the archive
305-MEMTEST86DEB="$($BASEDIR/tools/apt-selection cache show memtest86+ | \
306- grep ^Filename | awk '{print $2}')"
307-dpkg --fsys-tarfile "$MIRROR/$MEMTEST86DEB" | \
308- tar xf - -C $CDDIR/install/ ./boot/memtest86+.bin
309-mv $CDDIR/install/boot/memtest86+.bin $CDDIR/install/mt86plus
310-rm -rf $CDDIR/install/boot
311-# Isolinux help files come from d-i.
312-cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
313-# Override splash screen.
314-if [ "$SPLASHRLE" ] && [ -e "$SPLASHRLE" ]; then
315- cp -p "$SPLASHRLE" boot$N/isolinux/splash.rle
316-fi
317-if [ "$GFXSPLASH" ] && [ -e "$GFXSPLASH" ]; then
318- cp -p "$GFXSPLASH" boot$N/isolinux/splash.pcx
319-fi
320-if [ "$SPLASHPNG" ] && [ -e "$SPLASHPNG" ]; then
321- cp -p "$SPLASHPNG" boot$N/isolinux/splash.png
322-fi
323-if [ "$HIDDEN_TIMEOUT" ] && [ "$ACCESSPCX" ]; then
324- cp -p "$BASEDIR/data/$DI_CODENAME/$ACCESSPCX" boot$N/isolinux/access.pcx
325-fi
326-if [ "$HIDDEN_TIMEOUT" = 2 ]; then
327- cp -p "$BASEDIR/data/$DI_CODENAME/$BLANKPCX" boot$N/isolinux/blank.pcx
328-fi
329-if [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then
330- # No language menu.
331- echo en >boot$N/isolinux/lang
332-elif [ "$PROJECT" = ubuntukylin ]; then
333- echo zh_CN >boot$N/isolinux/lang
334-fi
335-# Remove elilo configuration; only for Macs.
336-rm -f boot$N/isolinux/elilo*
337-rm -f boot$N/isolinux/*.msg*
338-if [ "$CDIMAGE_INSTALL" = 1 ]; then
339- rm -f boot$N/isolinux/*.txt.live
340- rm -f boot$N/isolinux/*.hlp.live
341-else
342- for x in boot$N/isolinux/*.txt.live; do
343- [ -f "$x" ] || continue
344- mv "$x" "${x%.live}"
345- done
346- for x in boot$N/isolinux/*.hlp.live; do
347- [ -f "$x" ] || continue
348- mv "$x" "${x%.live}"
349- done
350-fi
351-# Nuke the GTK menu items for now.
352-rm -f boot$N/isolinux/*gtk.cfg
353-rm -f boot$N/isolinux/*.txt.withgtk
354-# We only support single-architecture images.
355-sed -i 's|%install%|install|' boot$N/isolinux/*.cfg
356-# Move GRUB files to the right place.
357-mkdir -p $CDDIR/EFI/BOOT
358-mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/BOOTx64.EFI $CDDIR/EFI/BOOT/BOOTx64.EFI
359-mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/grubx64.efi $CDDIR/EFI/BOOT/grubx64.efi
360-mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/mmx64.efi $CDDIR/EFI/BOOT/mmx64.efi
361-mkdir -p $CDDIR/boot/grub
362-mv boot$N/isolinux/grub/* $CDDIR/boot/grub/
363-rmdir boot$N/isolinux/grub
364-sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
365-
366-if [ "$BACKPORT_KERNEL" ]; then
367- cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF
368-submenu 'Boot and Install with the HWE kernel' {
369-EOF
370- : > boot$N/isolinux/hwe-gfxboot.cfg
371-fi
372-
373-# Menu timeout, in seconds.
374-# gfxboots will need it in deciseconds (it is converted as needed)
375-menu_timeout=30
376-
377-# When using hidden timeout; use a shorter timeout while the user
378-# only sees the accessibility logo at the bottom of the screen.
379-if [ "$HIDDEN_TIMEOUT" ]; then
380- menu_timeout=5
381-fi
382-
383-# Set timeout for the GRUB menu
384-cat >> $CDDIR/boot/grub/grub.cfg <<EOF
385-set timeout=$menu_timeout
386-EOF
387-
388-# Set gfxboot timeouts (for hidden-timeout or for the language picker)
389-sed -i "s/^timeout .*/timeout $(($menu_timeout * 10))/" \
390- boot$N/isolinux/isolinux.cfg boot$N/isolinux/prompt.cfg
391-
392-# Set up-to-date build dates. Kludgy because d-i sets its own version as
393-# the build date.
394-DI_VERSION="$(perl -lne 'if (/built on ([0-9a-z]*)/) { print $1 }' \
395- "boot$N/isolinux/f1.txt")"
396-if [ "$DI_VERSION" ]; then
397- : "${CDIMAGE_DATE:=$(date +%Y%m%d)}"
398- sed -i "s/$DI_VERSION/$CDIMAGE_DATE/g" \
399- "boot$N"/isolinux/*.txt "boot$N"/isolinux/*.hlp
400-fi
401-
402-# Isolinux config file.
403-if [ "$CDIMAGE_LIVE" = 1 ]; then
404- DEFAULT_LABEL=live
405-else
406- DEFAULT_LABEL=install
407-fi
408-cat > boot$N/isolinux/txt.cfg <<EOF
409-default $DEFAULT_LABEL
410-EOF
411-> boot$N/isolinux/adtxt.cfg
412-if [ "$GFXBOOT" ]; then
413- cat >> boot$N/isolinux/isolinux.cfg <<EOF
414-ui gfxboot bootlogo
415-EOF
416-fi
417-if [ "$PROJECT" = ubuntu ] || [ "$PROJECT" = ubuntu-server ] || \
418- [ "$PROJECT" = ubuntu-mid ] || [ "$PROJECT" = ubuntu-netbook ] || \
419- [ "$PROJECT" = mythbuntu ] || [ "$PROJECT" = ubuntukylin ] || \
420- [ "$PROJECT" = ubuntu-desktop-next ]; then
421- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
422-foreground=0xFFFFFF
423-background=0x958490
424-screen-colour=0x270A1E
425-EOF
426-fi
427-if [ "$PROJECT" = ubuntu-gnome ]; then
428- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
429-screen-colour=0x2D3335
430-EOF
431-fi
432-if [ "$PROJECT" = ubuntu-budgie ]; then
433- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
434-foreground=0xffffff
435-background=0xd3dae3
436-screen-colour=0x383c4a
437-EOF
438-fi
439-if [ "$PROJECT" = ubuntu-mate ]; then
440- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
441-foreground=0xffffff
442-background=0x87a556
443-screen-colour=0x3c3b37
444-EOF
445-fi
446-if [ "$HIDDEN_TIMEOUT" ]; then
447- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
448-hidden-timeout=$HIDDEN_TIMEOUT
449-EOF
450-fi
451-# access-options default: v1 v2 v3 brltty m1 m2
452-# d-i only supports v1 and brltty right now.
453-if [ "$CDIMAGE_LIVE" != 1 ]; then
454- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
455-access-options=v1 brltty
456-access-options-v1=access=v1 FRONTEND_BACKGROUND=dark
457-EOF
458-elif [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then
459- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
460-access-options=v1 v2 brltty m1
461-EOF
462-elif [ "$PROJECT" = xubuntu ]; then
463- # v1 and m1 don't have the necessary sed calls for Xubuntu yet.
464- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
465-access-options=v2 v3 brltty m2
466-EOF
467-fi
468-cat >> boot$N/isolinux/gfxboot.cfg <<EOF
469-label normal=Normal
470-append normal=
471-EOF
472-if [ "$CDIMAGE_LIVE" = 1 ]; then
473- QUIET=quiet
474- SPLASH=splash
475- case "$PROJECT" in
476- kubuntu|kubuntu-plasma5)
477- livelabel="^Start $HUMANPROJECT"
478- liveparams=' maybe-ubiquity'
479- NOTRYONLYDO=true
480- ;;
481- lubuntu)
482- livelabel="^Start $HUMANPROJECT"
483- liveparams=
484- NOTRYONLYDO=true
485- ;;
486- ubuntu-server)
487- livelabel="^Install $HUMANPROJECT"
488- liveparams=
489- SPLASH=
490- NOTRYONLYDO=true
491- ;;
492- ubuntu-mid)
493- livelabel="^Try $HUMANPROJECT without installing"
494- liveparams=
495- NOTRYONLYDO=true
496- ;;
497- ubuntu)
498- livelabel="^Try $HUMANPROJECT without installing"
499- liveparams=
500- livelabelgrub="^$HUMANPROJECT"
501- liveparamsgrub=' maybe-ubiquity'
502- NOTRYONLYDOINGRUB=true
503- ;;
504- *)
505- livelabel="^Try $HUMANPROJECT without installing"
506- liveparams=
507- esac
508-
509- if [ -z "$livelabelgrub" ]; then
510- livelabelgrub="$livelabel"
511- liveparamsgrub="$liveparams"
512- fi
513-
514-
515- LAYERFS_PATH_OPT=$(add_layerfs_path_opt)
516-
517-for variant in "" " (safe graphics)^ nomodeset"; do
518- suffix="${variant%^*}"
519- extra_kopt="${variant#*^}"
520- cat >> boot$N/isolinux/txt.cfg <<EOF
521-label live$(echo "${extra_kopt}"|tr ' ' '-')
522- menu label ${livelabel}${suffix}
523- kernel $CASPER_KERNEL
524- append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt ---
525-EOF
526+# Currently only server is built with HWE, hence no safe-graphics/OEM
527+if [ "$HWE" ]; then
528 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
529-menuentry "${livelabelgrub#^}${suffix}" {
530- set gfxpayload=keep
531- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
532- initrd $CASPER_INITRD
533-}
534-EOF
535-done
536- cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
537-menuentry "${livelabelgrub#^}" {
538- set gfxpayload=keep
539- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
540- initrd $CASPER_INITRD
541-}
542-EOF
543- if [ "$NOTRYONLYDO" != "true" ]; then
544- for variant in "" " (safe graphics)^ nomodeset"; do
545- suffix="${variant%^*}"
546- extra_kopt="${variant#*^}"
547- cat >> boot$N/isolinux/txt.cfg <<EOF
548-label live-install$(echo "${extra_kopt}"|tr ' ' '-')
549- menu label ^Install $HUMANPROJECT${suffix}
550- kernel $CASPER_KERNEL
551- append $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt ---
552-EOF
553- if [ "$NOTRYONLYDOINGRUB" != "true" ]; then
554- cat >> $CDDIR/boot/grub/grub.cfg <<EOF
555-menuentry "Install $HUMANPROJECT${suffix}" {
556- set gfxpayload=keep
557- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---
558- initrd $CASPER_INITRD
559-}
560-EOF
561- fi
562- done
563- if [ "$NOTRYONLYDOINGRUB" != "true" ]; then
564- cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
565-menuentry "Install $HUMANPROJECT" {
566- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
567- initrd $CASPER_INITRD
568-}
569-EOF
570- fi
571- fi
572- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
573-label driverupdates=Use driver update disc
574-append driverupdates=debian-installer/driver-update=true
575-applies driverupdates=live live-install live-nomodeset live-install-nomodeset
576-EOF
577-fi
578-if [ "$CDIMAGE_INSTALL" = 1 ]; then
579- if [ "$CDIMAGE_LIVE" != 1 ]; then
580- for kp in $KERNEL_PREFIXES; do
581- cat >> boot$N/isolinux/txt.cfg <<EOF
582-label ${!kp}install
583- menu label ^Install $HUMANPROJECT${!kp:+ with the HWE kernel}
584- kernel /install/${!kp}vmlinuz
585- append $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} vga=788 initrd=/install/${!kp}initrd.gz quiet ---
586-EOF
587- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
588-menuentry "Install $HUMANPROJECT" {
589- set gfxpayload=keep
590- linux /install/${!kp}vmlinuz $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet ---
591- initrd /install/${!kp}initrd.gz
592-}
593-EOF
594- done
595- else
596- cat >> boot$N/isolinux/txt.cfg <<EOF
597-label install
598- menu label ^Install $HUMANPROJECT in text mode
599- kernel /install/vmlinuz
600- append $KERNEL_PARAMS $DEFAULT_PRESEED vga=788 initrd=/install/initrd.gz quiet ---
601-EOF
602- cat >> $CDDIR/boot/grub/grub.cfg <<EOF
603-menuentry "Install $HUMANPROJECT in text mode" {
604- set gfxpayload=keep
605- linux /install/vmlinuz $KERNEL_PARAMS $DEFAULT_PRESEED quiet ---
606- initrd /install/initrd.gz
607-}
608-EOF
609- fi
610- cat >> boot$N/isolinux/adtxt.cfg <<EOF
611-label expert
612- menu hide
613- kernel /install/vmlinuz
614- append $KERNEL_PARAMS $DEFAULT_PRESEED priority=low vga=788 initrd=/install/initrd.gz ---
615-EOF
616- if [ "$PROJECT" = edubuntu ]; then
617- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
618-label workstation=Install a workstation
619-replace workstation=file=/cdrom/preseed/workstation.seed
620-applies workstation=install
621-EOF
622- fi
623- if [ "$CDIMAGE_DVD" = 1 ] && [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then
624- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
625-label server=Install a server
626-replace server=file=/cdrom/preseed/ubuntu-server.seed
627-applies server=install
628-EOF
629- fi
630-fi
631-# No OEM mode on ubuntu-server live
632-if ! ([ "$PROJECT" = ubuntu-server ] && [ "$CDIMAGE_LIVE" = 1 ]); then
633-# The GRUB versions of this only correspond to single isolinux labels,
634-# because we don't yet have the necessary technology in our GRUB menu stack
635-# to have a two-dimensional set of boot options, as is implemented for
636-# isolinux using the gfxboot "applies" keyword.
637-for kp in $KERNEL_PREFIXES; do
638-cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
639-label ${!kp}oem=OEM install (for manufacturers)
640-append ${!kp}oem=oem-config/enable=true
641-EOF
642-if [ "$CDIMAGE_LIVE" = 1 ]; then
643- cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
644-applies ${!kp}oem=live live-install install live-nomodeset live-install-nomodeset
645-EOF
646- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
647-menuentry "OEM install (for manufacturers)" {
648- set gfxpayload=keep
649- linux $CASPER_KERNEL $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}}$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---
650- initrd $CASPER_INITRD
651-}
652-EOF
653-else
654- cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
655-applies ${!kp}oem=${!kp}install
656-EOF
657- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
658-menuentry "OEM install (for manufacturers)" {
659- set gfxpayload=keep
660- linux /install/${!kp}vmlinuz $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet oem-config/enable=true ---
661- initrd /install/${!kp}initrd.gz
662-}
663-EOF
664-fi
665-done
666-fi # No OEM mode on ubuntu-server live
667-if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
668- if [ "$PROJECT" != ubuntu-server ]; then
669- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
670-label cli=Install a command-line system
671-replace cli=file=/cdrom/preseed/cli.seed
672-applies cli=install
673-EOF
674- else
675- for kp in $KERNEL_PREFIXES; do
676- cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
677-label ${!kp}minimal=Install a minimal system
678-replace ${!kp}minimal=file=/cdrom/preseed/${!kp}ubuntu-server-minimal.seed
679-applies ${!kp}minimal=${!kp}install
680-label ${!kp}minimalvm=Install a minimal virtual machine
681-replace ${!kp}minimalvm=file=/cdrom/preseed/${!kp}ubuntu-server-minimalvm.seed
682-applies ${!kp}minimalvm=${!kp}install
683-EOF
684- done
685- fi
686-fi
687-if [ "$CDIMAGE_INSTALL" = 1 ] && ([ "$PROJECT" = ubuntu ] || [ "$PROJECT" = xubuntu ] || [ "$PROJECT" = edubuntu ] || [ "$PROJECT" = ubuntu-mate ]); then
688- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
689-label ltsp=Install an LTSP server
690-replace ltsp=file=/cdrom/preseed/ltsp.seed
691-applies ltsp=install
692-EOF
693-fi
694-if [ "$CDIMAGE_INSTALL" = 1 ] && [ "$PROJECT" = mythbuntu ]; then
695- cat >> boot$N/isolinux/gfxboot.cfg <<EOF
696-label ltsp=Install a Diskless Image Server
697-replace ltsp=file=/cdrom/preseed/ltsp.seed
698-applies ltsp=install
699-EOF
700-fi
701-if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
702- cat >> boot$N/isolinux/txt.cfg <<EOF
703-label check
704- menu label ^Check disc for defects
705- kernel /install/vmlinuz
706- append $KERNEL_PARAMS $FRONTEND_BACKGROUND MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet ---
707-EOF
708- for kp in $KERNEL_PREFIXES; do
709- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
710-menuentry "Check disc for defects" {
711- set gfxpayload=keep
712- linux /install/${!kp}vmlinuz $KERNEL_PARAMS MENU=/bin/cdrom-checker-menu quiet ---
713- initrd /install/${!kp}initrd.gz
714-}
715-EOF
716- done
717-fi
718-if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
719- cat >> boot$N/isolinux/adtxt.cfg <<EOF
720-label rescue
721- menu label ^Rescue a broken system
722- kernel /install/vmlinuz
723- append $KERNEL_PARAMS $FRONTEND_BACKGROUND rescue/enable=true vga=788 initrd=/install/initrd.gz ---
724-EOF
725- for kp in $KERNEL_PREFIXES; do
726- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
727-menuentry "Rescue a broken system" {
728- set gfxpayload=keep
729- linux /install/${!kp}vmlinuz $KERNEL_PARAMS rescue/enable=true ---
730- initrd /install/${!kp}initrd.gz
731-}
732-EOF
733- done
734-fi
735-cat >> boot$N/isolinux/txt.cfg <<EOF
736-label memtest
737- menu label Test ^memory
738- kernel /install/mt86plus
739-label hd
740- menu label ^Boot from first hard disk
741- localboot 0x80
742-EOF
743-cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
744-menuentry "Test memory" {
745- linux16 /install/mt86plus
746-}
747-EOF
748+menuentry "$HUMANPROJECT with the HWE kernel" {
749+ set gfxpayload=keep
750+ linux /casper/hwe-vmlinuz $KERNEL_PARAMS
751+ initrd /casper/hwe-initrd
752+}
753+EOF
754+fi
755+
756+# UEFI Entries
757 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
758 grub_platform
759 if [ "\$grub_platform" = "efi" ]; then
760@@ -699,40 +104,5 @@
761 }
762 fi
763 EOF
764-fi
765-
766-if [ "$BACKPORT_KERNEL" ] && [ "$PROJECT" = ubuntu-server ]; then
767- cat >> $CDDIR/boot/grub/hwe-grub.cfg <<EOF
768-}
769-EOF
770- cat $CDDIR/boot/grub/hwe-grub.cfg >> $CDDIR/boot/grub/grub.cfg
771- cat boot$N/isolinux/hwe-gfxboot.cfg >> boot$N/isolinux/gfxboot.cfg
772-fi
773-rm -f $CDDIR/boot/grub/hwe-grub.cfg boot$N/isolinux/hwe-gfxboot.cfg
774-
775-# write final lines to mkisofs_opts
776-if [ "$NN" = "1" ]; then
777- echo -n "boot$N " >> $N.mkisofs_opts
778-else
779- if [ -n "$THISTYPE" ]; then
780- echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts
781- fi
782-fi
783-
784-# Hack around the removal of support in gfxboot for reading from outside
785-# the bootlogo archive. This makes customisation harder and is not ideal.
786-tmpdir="$(mktemp -d)"
787-(cd "$tmpdir" && cpio -i) < boot$N/isolinux/bootlogo
788-cp -a boot$N/isolinux/*.fnt \
789- boot$N/isolinux/*.hlp \
790- boot$N/isolinux/*.jpg \
791- boot$N/isolinux/*.pcx \
792- boot$N/isolinux/*.tr \
793- boot$N/isolinux/*.cfg \
794- $(test -e boot$N/isolinux/lang && echo boot$N/isolinux/lang) \
795- boot$N/isolinux/langlist \
796- "$tmpdir/"
797-(cd "$tmpdir" && ls -1 | cpio --quiet -o) > boot$N/isolinux/bootlogo
798-rm -rf "$tmpdir"
799
800 # th,th, thats all
801
802=== modified file 'tools/boot/groovy/common.sh'
803--- tools/boot/groovy/common.sh 2020-05-21 21:59:34 +0000
804+++ tools/boot/groovy/common.sh 2020-06-19 13:49:32 +0000
805@@ -1,3 +1,35 @@
806+# encode the right CD kernel parameteres, for every project
807+default_kernel_params() {
808+ case $PROJECT in
809+ ubuntu)
810+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash --- "
811+ ;;
812+ ubuntukylin)
813+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu.seed locale=zh_CN keyboard-configuration/layoutcode?=cn maybe-ubiquity quiet splash --- "
814+ ;;
815+ kubuntu)
816+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/kubuntu.seed maybe-ubiquity quiet splash --- "
817+ ;;
818+ lubuntu)
819+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/lubuntu.seed quiet splash --- "
820+ ;;
821+ xubuntu)
822+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/xubuntu.seed maybe-ubiquity quiet splash --- "
823+ ;;
824+ ubuntustudio)
825+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntustudio.seed maybe-ubiquity quiet splash --- "
826+ ;;
827+ ubuntu-mate)
828+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu-mate.seed maybe-ubiquity quiet splash --- "
829+ ;;
830+ ubuntu-budgie)
831+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu-budgie.seed maybe-ubiquity quiet splash --- "
832+ ;;
833+ ubuntu-server)
834+ KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }quiet ---"
835+ ;;
836+ esac
837+}
838
839 # This file provides some common code that is intented to be called
840 # by the various boot-<arch> scripts.

Subscribers

People subscribed via source and target branches