[bootloader] Simply bootloader logic to ensure we can use /cdrom elsewhere

Instead of utilizing a contextualprocess to only bind-mount /cdrom to
/media/cdrom when it's a specific type of system, simply add it to the mounts
for all flavors, and move the specific copy of the vmlinuz file to a dedicated
shellprocess module. This will be re-factored next cycle, ideally being worked
directly into a dedicated C++ module instead of several, miscellaneous shell
scripts wrapped in YAML.
This commit is contained in:
Simon Quigley 2025-04-15 22:19:35 -05:00
parent 52472914bb
commit 6b2555c998
7 changed files with 26 additions and 22 deletions

View File

@ -1,10 +0,0 @@
---
dontChroot: true
timeout: 10
firmwareType:
efi:
- -cp /cdrom/casper/vmlinuz ${ROOT}/boot/vmlinuz-$(uname -r)
- -mkdir -pv ${ROOT}/media/cdrom
- -mount --bind /cdrom ${ROOT}/media/cdrom
bios:
- -cp /cdrom/casper/vmlinuz ${ROOT}/boot/vmlinuz-$(uname -r)

View File

@ -0,0 +1,5 @@
---
dontChroot: true
timeout: 60
script:
- command: "cp /cdrom/casper/vmlinuz ${ROOT}/boot/vmlinuz-$(uname -r)"

View File

@ -21,6 +21,9 @@ extraMounts:
- device: /run/systemd/resolve
mountPoint: /run/systemd/resolve
options: [ bind ]
- device: /cdrom
mountPoint: /media/cdrom
options: [ bind ]
mountOptions:
- filesystem: default

6
debian/changelog vendored
View File

@ -1,5 +1,11 @@
calamares-settings-ubuntu (1:25.04.26) UNRELEASED; urgency=medium
* [bootloader] Instead of utilizing a contextualprocess to only bind-mount
/cdrom to /media/cdrom when it's a specific type of system, simply add it
to the mounts for all flavors, and move the specific copy of the vmlinuz
file to a dedicated shellprocess module. This will be re-factored next
cycle, ideally being worked directly into a dedicated C++ module instead
of several, miscellaneous shell scripts wrapped in YAML.
-- Simon Quigley <tsimonq2@ubuntu.com> Tue, 15 Apr 2025 22:15:17 -0500

View File

@ -2,12 +2,12 @@
modules-search: [ local ]
instances:
- id: before_bootloader_mkdirs
module: contextualprocess
config: before_bootloader_mkdirs_context.conf
- id: before_bootloader
module: contextualprocess
config: before_bootloader_context.conf
- id: copy_vmlinuz_shellprocess
module: shellprocess
config: copy_vmlinuz_shellprocess.conf
- id: logs
module: shellprocess
config: shellprocess_logs.conf
@ -53,7 +53,7 @@ sequence:
- displaymanager
- networkcfg
- hwclock
- contextualprocess@before_bootloader_mkdirs
- shellprocess@copy_vmlinuz_shellprocess
- shellprocess@bug-LP#1829805
- shellprocess@fixconkeys_part1
- shellprocess@fixconkeys_part2

View File

@ -2,12 +2,12 @@
modules-search: [ local ]
instances:
- id: before_bootloader_mkdirs
module: contextualprocess
config: before_bootloader_mkdirs_context.conf
- id: before_bootloader
module: contextualprocess
config: before_bootloader_context.conf
- id: copy_vmlinuz_shellprocess
module: shellprocess
config: copy_vmlinuz_shellprocess.conf
- id: logs
module: shellprocess
config: shellprocess_logs.conf
@ -57,7 +57,7 @@ sequence:
- pkgselectprocess
- dracutlukscfg
- dracut
- contextualprocess@before_bootloader_mkdirs
- shellprocess@copy_vmlinuz_shellprocess
- shellprocess@bug-LP#1829805
- shellprocess@fixconkeys_part1
- shellprocess@fixconkeys_part2

View File

@ -2,12 +2,12 @@
modules-search: [ local ]
instances:
- id: before_bootloader_mkdirs
module: contextualprocess
config: before_bootloader_mkdirs_context.conf
- id: before_bootloader
module: contextualprocess
config: before_bootloader_context.conf
- id: copy_vmlinuz_shellprocess
module: shellprocess
config: copy_vmlinuz_shellprocess.conf
- id: logs
module: shellprocess
config: shellprocess_logs.conf
@ -53,7 +53,7 @@ sequence:
- displaymanager
- networkcfg
- hwclock
- contextualprocess@before_bootloader_mkdirs
- shellprocess@copy_vmlinuz_shellprocess
- shellprocess@bug-LP#1829805
- shellprocess@fixconkeys_part1
- shellprocess@fixconkeys_part2