Skip to content

Conversation

@tonynguien
Copy link
Contributor

@tonynguien tonynguien commented Feb 5, 2025

Background

Adding the systemd-boot and EFI related packages necessary for creating an EFI boot image.

PR delphix/appliance-build#792 is the follow on change which will generate EFI boot image.

Testing Done

Making sure current BIOS image build is still functional and EFI build would also work.

delphix-platform build - https://ops-jenkins.eng-tools-prd.aws.delphixcloud.com/job/linux-pkg/job/os-upgrade/job/build-package/job/delphix-platform/job/pre-push/
combine-packages - https://ops-jenkins.eng-tools-prd.aws.delphixcloud.com/job/linux-pkg/job/os-upgrade/job/combine-packages/job/pre-push/143/

Then appliance builds with current BIOS and EFI changes to build artifacts. Below are outputs from BIOS and EFI engines.

BIOS boot image

delphix@localhost:~$ cat /proc/cmdline
BOOT_IMAGE=/ROOT/delphix.s8YRBh1/root@/boot/vmlinuz-6.8.0-58-dx2025042816-617709f35-generic root=ZFS=rpool/ROOT/delphix.s8YRBh1/root ro console=tty0 console=ttyS0,38400n8 mitigations=off ipv6.disable=1 elevator=noop crashkernel=256M,high crashkernel=256M,low init_on_alloc=0 usbcore.nousb=1 nvme_core.io_timeout=4294967295 earlyprintk=ttyS0,38400n8 rootdelay=300
delphix@localhost:~$ sudo less /var/log/kern.log
delphix@localhost:~$ sudo grep EFI /var/log/kern.log
2025-05-01T15:00:28.963241+00:00 localhost kernel: PEFILE: Unsigned PE binary
delphix@localhost:~$ dpkg --get-selections | grep grub
grub-common					install
grub-efi-amd64-bin				install
grub-gfxpayload-lists				install
grub-pc						install
grub-pc-bin					install
grub2-common					install
delphix@localhost:~$

EFI boot image

delphix@localhost:~$ cat /proc/cmdline
initrd=\initrd.img root=ZFS=rpool/ROOT/delphix.t6BDw8J/root ro ipv6.disable=1 console=tty0 console=ttyS0,38400n8 earlyprintk=ttyS0,38400n8
delphix@localhost:~$ dpkg --get-selections | grep grub
grub-common					install
grub-efi-amd64-bin				install
grub-gfxpayload-lists				install
grub-pc						install
grub-pc-bin					install
grub2-common					install
delphix@localhost:~$

@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch from 96adff8 to 59d98db Compare February 5, 2025 00:08
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch 3 times, most recently from c64a6b3 to 8b6f581 Compare February 21, 2025 21:29
@tonynguien tonynguien changed the title Add systemd-boot and efitools packages Add systemd-boot, efitools, efibootmgr, and dosfstools packages Feb 21, 2025
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch from 8b6f581 to 10c1be4 Compare February 22, 2025 23:09
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch from 10c1be4 to b9a66e7 Compare March 4, 2025 17:48
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch 2 times, most recently from a958a52 to 6888bca Compare March 27, 2025 15:17
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch 3 times, most recently from 7867c71 to e36ce7d Compare April 21, 2025 19:29
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch 2 times, most recently from 8ec60ef to 69d31e1 Compare April 30, 2025 16:52
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch from 69d31e1 to a875c0f Compare May 1, 2025 18:09
@tonynguien tonynguien changed the title Add systemd-boot, efitools, efibootmgr, and dosfstools packages Additional EFI and systemd-boot packages May 1, 2025
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch from a875c0f to 1ab2c26 Compare May 1, 2025 20:15
@tonynguien tonynguien changed the title Additional EFI and systemd-boot packages DLPX-94112 Additional EFI and systemd-boot packages May 1, 2025
@tonynguien tonynguien marked this pull request as ready for review May 1, 2025 20:27
@tonynguien tonynguien force-pushed the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch from 1ab2c26 to a44ab34 Compare May 1, 2025 20:29
@sebroy
Copy link
Contributor

sebroy commented May 1, 2025

@tonynguien which of these packages are required to build the relevant packages, and which ones are required to be installed at runtime? The build dependencies should not be present on Delphix Engines (on variants that ship to customers), but only on the build environments where we do builds with linux-pkg and/or appliance-build.

@tonynguien
Copy link
Contributor Author

@tonynguien which of these packages are required to build the relevant packages, and which ones are required to be installed at runtime? The build dependencies should not be present on Delphix Engines (on variants that ship to customers), but only on the build environments where we do builds with linux-pkg and/or appliance-build.

OK. I'm not clear on the distinctions for builds and runtime requirements.

grub-efi-amd64-bin, systemd-boot, and efibootmgr should be installed at runtime. efitools is used to work with EFI and Secure Boot variables so it should be needed at runtime.

dosfstools provides the mkfs.fat which we need at image creation though probably not strictly at runtime since I believe we can mount fat fs without dosfstools

Copy link

@jfagetti-delphix jfagetti-delphix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tonynguien tonynguien merged commit d38e1d5 into os-upgrade May 2, 2025
17 checks passed
@tonynguien tonynguien deleted the dlpx/pr/tonynguien/8146e236-73af-4100-995f-e70429858c62 branch May 2, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants