Merge lp:~xnox/debian-cd/revert-modaliases into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Iain Lane
Approved revision: 2050
Merged at revision: 2053
Proposed branch: lp:~xnox/debian-cd/revert-modaliases
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 101 lines (+14/-32)
1 file modified
tools/boot/focal/boot-amd64 (+14/-32)
To merge this branch: bzr merge lp:~xnox/debian-cd/revert-modaliases
Reviewer Review Type Date Requested Status
Iain Lane Approve
Ubuntu CD Image Team Pending
Review via email: mp+382296@code.launchpad.net

Commit message

Revert dmi_modalias detection, but keep casper dual-flavour support.

Description of the change

Revert dmi_modalias detection, but keep casper dual-flavour support.

To post a comment you must log in.
lp:~xnox/debian-cd/revert-modaliases updated
2050. By Dimitri John Ledkov

Revert dmi_modalias detection

Revision history for this message
Iain Lane (laney) wrote :

Yes, this is moving to the installer itself now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/boot/focal/boot-amd64'
2--- tools/boot/focal/boot-amd64 2020-04-15 09:08:10 +0000
3+++ tools/boot/focal/boot-amd64 2020-04-15 12:05:01 +0000
4@@ -310,24 +310,6 @@
5 rmdir boot$N/isolinux/grub
6 sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
7
8-
9-# FIXME: dmi_modalias.cfg should be shipped in grub, with autopkgtest
10-cp $BASEDIR/tools/boot/$DI_CODENAME/dmi_modalias.cfg $CDDIR/boot/grub
11-
12-# This dumps all oem meta packages in the cache, dumps their Modaliases fields,
13-# extracts all dmi: modaliases, joins them together using |, and then converts
14-# to a regular expressions by: anchoring it using ^(...)$, and converting *
15-# to .*.
16-# Then it uses grub's regexp module to match that one regex against the
17-# dmi_modalias variable that dmi_modalias.cfg generated for us.
18-cat >> $CDDIR/boot/grub/grub.cfg <<EOF
19-set casper_flavour=""
20-source \$prefix/dmi_modalias.cfg
21-if regexp '$($BASEDIR/tools/apt-selection cache show ^oem-.*-meta$ | grep-dctrl -v -XF Ubuntu-OEM-Kernel-Flavour default | grep-dctrl -P "" -nsModaliases | grep -o 'dmi:[^), ]*' | tr '\n' '|' | sed -E -e 's/(.*)/^(\1)$/' -e 's/\*/.*/g')' "\$dmi_modalias"; then
22- set casper_flavour="-oem"
23-fi
24-EOF
25-
26 if [ "$BACKPORT_KERNEL" ]; then
27 cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF
28 submenu 'Boot and Install with the HWE kernel' {
29@@ -478,16 +460,16 @@
30 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
31 menuentry "${livelabel#^}${suffix}" {
32 set gfxpayload=keep
33- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
34- initrd $CASPER_INITRD\$casper_flavour
35+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
36+ initrd $CASPER_INITRD
37 }
38 EOF
39 done
40 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
41 menuentry "${livelabel#^}" {
42 set gfxpayload=keep
43- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
44- initrd $CASPER_INITRD\$casper_flavour
45+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
46+ initrd $CASPER_INITRD
47 }
48 EOF
49 if [ "$NOTRYONLYDO" != "true" ]; then
50@@ -503,15 +485,15 @@
51 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
52 menuentry "Install $HUMANPROJECT${suffix}" {
53 set gfxpayload=keep
54- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---
55- initrd $CASPER_INITRD\$casper_flavour
56+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---
57+ initrd $CASPER_INITRD
58 }
59 EOF
60 done
61 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
62 menuentry "Install $HUMANPROJECT" {
63- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
64- initrd $CASPER_INITRD\$casper_flavour
65+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
66+ initrd $CASPER_INITRD
67 }
68 EOF
69 fi
70@@ -592,8 +574,8 @@
71 cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
72 menuentry "OEM install (for manufacturers)" {
73 set gfxpayload=keep
74- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}}$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---
75- initrd $CASPER_INITRD\$casper_flavour
76+ linux $CASPER_KERNEL $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}}$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---
77+ initrd $CASPER_INITRD
78 }
79 EOF
80 else
81@@ -654,14 +636,14 @@
82 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
83 menuentry "Check disc for defects" {
84 set gfxpayload=keep
85- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS$LAYERFS_PATH_OPT integrity-check quiet splash ---
86- initrd $CASPER_INITRD\$casper_flavour
87+ linux $CASPER_KERNEL $KERNEL_PARAMS$LAYERFS_PATH_OPT integrity-check quiet splash ---
88+ initrd $CASPER_INITRD
89 }
90 EOF
91 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
92 menuentry "Check disc for defects" {
93- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS$LAYERFS_PATH_OPT integrity-check iso-scan/filename=\${iso_path} quiet splash ---
94- initrd $CASPER_INITRD\$casper_flavour
95+ linux $CASPER_KERNEL $KERNEL_PARAMS$LAYERFS_PATH_OPT integrity-check iso-scan/filename=\${iso_path} quiet splash ---
96+ initrd $CASPER_INITRD
97 }
98 EOF
99 elif [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
100
101=== removed file 'tools/boot/focal/dmi_modalias.cfg'

Subscribers

People subscribed via source and target branches