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

Subscribers

People subscribed via source and target branches