Merge ~tsimonq2/debian-cd/+git/ubuntu:main into ~ubuntu-cdimage/debian-cd/+git/ubuntu:main

Proposed by Simon Quigley
Status: Merged
Merged at revision: 8d57721d13e3d999a790998784771e7fa98ba6c0
Proposed branch: ~tsimonq2/debian-cd/+git/ubuntu:main
Merge into: ~ubuntu-cdimage/debian-cd/+git/ubuntu:main
Diff against target: 45 lines (+14/-4)
2 files modified
tools/boot/noble/boot-amd64 (+13/-0)
tools/boot/noble/common.sh (+1/-4)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Brian Murray Needs Information
Utkarsh Gupta (community) Approve
Review via email: mp+464875@code.launchpad.net

Description of the change

Ensure Lubuntu and Kubuntu both get OEM boot entries

To post a comment you must log in.
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

OK, I suppose this is tested with other bits. +1.

review: Approve
Revision history for this message
Brian Murray (brian-murray) wrote :

How has this been tested?

review: Needs Information
Revision history for this message
Simon Quigley (tsimonq2) wrote :

The actual kernel parameters were tested as follows:
 1. Boot a Lubuntu or Kubuntu Noble daily.
 2. Instead of pressing Enter on "Try or Install {L,K}ubuntu", press "e" to edit the boot entry.
 3. Edit the vmlinuz line in the boot entries differently for Kubuntu and Lubuntu:
   a. For Lubuntu, remove "file=/cdrom/preseed/lubuntu.seed" and add "maybe-calamares oem-config/enable=true" in its place.
   b. For Kubuntu, add "maybe-calamares oem-config/enable=true" before "quiet".
 4. Press Ctrl + X and wait for the system to boot up. It should show the installer prompt as normal.
 5. Switch to a TTY, download and install:
   a. lubuntu-installer-prompt 24.04.6 on Lubuntu.
   b. kubuntu-installer-prompt 24.04.10 on Kubuntu.
 6. Run `sudo systemctl restart sddm` and observe the OEM installation prompt.

This code specifically is based on the stanza above it:
+# Calamares-based projects get OEM mode
+case $KERNEL_PARAMS in
+ *maybe-calamares*)
+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
+menuentry "OEM install (for manufacturers)" {
+ set gfxpayload=keep
+ linux /casper/vmlinuz $KERNEL_PARAMS oem-config/enable=true
+ initrd /casper/initrd
+}
+EOF
+ ;;
+esac

The diff between the stanza above it and the new stanza is as follows:
-# ubiquity based projects get OEM mode
+# Calamares-based projects get OEM mode
 case $KERNEL_PARAMS in
- *maybe-ubiquity*)
+ *maybe-calamares*)
         cat >> $CDDIR/boot/grub/grub.cfg <<EOF
 menuentry "OEM install (for manufacturers)" {
     set gfxpayload=keep
- linux /casper/vmlinuz ${KERNEL_PARAMS/maybe-ubiquity/only-ubiquity oem-config/enable=true}
+ linux /casper/vmlinuz $KERNEL_PARAMS oem-config/enable=true
     initrd /casper/initrd
 }
 EOF

I find it reasonable to conclude that adding maybe-calamares to the kernel parameters would allow this new stanza to be ran, which would be nearly identical in functionality to the maybe-ubiquity stanza above it, adding this boot entry with the tested kernel parameters.

Please let me know if you have any further questions.

Revision history for this message
Ɓukasz Zemczak (sil2100) wrote :

Looks sane in general and running the shell from boot-amd64 seems to work. I'm a bit surprised why a separate one-case case switch has been added instead of adding this to the maybe-ubiquity one (or replacing it), but that's not critical. This works at least.

Revision history for this message
Steve Langasek (vorlon) :
review: Needs Information
Revision history for this message
Simon Quigley (tsimonq2) :
Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/boot/noble/boot-amd64 b/tools/boot/noble/boot-amd64
2index 416215f..84a50c8 100755
3--- a/tools/boot/noble/boot-amd64
4+++ b/tools/boot/noble/boot-amd64
5@@ -155,6 +155,19 @@ EOF
6 ;;
7 esac
8
9+# Calamares-based projects get OEM mode
10+case $PROJECT in
11+ lubuntu|kubuntu)
12+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
13+menuentry "OEM install (for manufacturers)" {
14+ set gfxpayload=keep
15+ linux /casper/vmlinuz $KERNEL_PARAMS oem-config/enable=true
16+ initrd /casper/initrd
17+}
18+EOF
19+ ;;
20+esac
21+
22 # Currently only server is built with HWE, hence no safe-graphics/OEM
23 if [ "$HWE" ]; then
24 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
25diff --git a/tools/boot/noble/common.sh b/tools/boot/noble/common.sh
26index 1fed0d3..c3c18e5 100644
27--- a/tools/boot/noble/common.sh
28+++ b/tools/boot/noble/common.sh
29@@ -1,15 +1,12 @@
30 # encode the right CD kernel parameteres, for every project
31 default_kernel_params() {
32 case $PROJECT in
33- ubuntu|edubuntu|ubuntustudio|ubuntu-budgie|kubuntu|ubuntu-unity|ubuntucinnamon|xubuntu|ubuntu-mate)
34+ ubuntu|edubuntu|ubuntustudio|ubuntu-budgie|kubuntu|lubuntu|ubuntu-unity|ubuntucinnamon|xubuntu|ubuntu-mate)
35 KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS } --- quiet splash"
36 ;;
37 ubuntukylin)
38 KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu.seed locale=zh_CN keyboard-configuration/layoutcode?=cn quiet splash --- "
39 ;;
40- lubuntu)
41- KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/lubuntu.seed quiet splash --- "
42- ;;
43 ubuntu-server)
44 KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS } ---"
45 ;;

Subscribers

People subscribed via source and target branches