core-initrd: fix create-initrd default option in post installation sc… - #299
Merged
Meulengracht merged 1 commit intoAug 3, 2026
Conversation
…ript 6a19b57: "core-initrd: adding "azure-fde" option to post installation script" moved the create-initrd call into only amd64 arches, which broke arm64 and armhf use cases Signed-off-by: John Cabaj <john.cabaj@canonical.com>
Meulengracht
reviewed
Jul 9, 2026
| fi | ||
|
|
||
| # Note focal's systemd & objcopy fail on arm64 | ||
| # Do not enable arm64, regressed twice now |
Author
There was a problem hiding this comment.
I don’t know that’s it’s explicitly wrong, as the only thing that previously guarded was a call to create-efi. Previous to my past commit, create-initrd was called regardless. That’s what this is trying to re-implement.
Member
There was a problem hiding this comment.
Right, can you verify this runs fine on arm64?
Author
There was a problem hiding this comment.
Seems to have worked:
azure@john-cabaj-uci-test-kcp:~$ sudo apt install ./ubuntu-core-initramfs_51.20_arm64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'ubuntu-core-initramfs' instead of './ubuntu-core-initramfs_51.20_arm64.deb'
The following NEW packages will be installed:
ubuntu-core-initramfs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 70.7 MB of additional disk space will be used.
Get:1 /home/azure/ubuntu-core-initramfs_51.20_arm64.deb ubuntu-core-initramfs arm64 51.20 [18.9 MB]
Selecting previously unselected package ubuntu-core-initramfs.
(Reading database ... 89662 files and directories currently installed.)
Preparing to unpack .../ubuntu-core-initramfs_51.20_arm64.deb ...
Unpacking ubuntu-core-initramfs (51.20) ...
Setting up ubuntu-core-initramfs (51.20) ...
W: Repository is broken: ubuntu-core-initramfs:arm64 (= 51.20) has no Size information
azure@john-cabaj-uci-test-kcp:~$ /etc/kernel/postinst.d/ubuntu-core-initramfs
usage: ubuntu-core-initramfs create-initrd [-h] [--root ROOT] [--skeleton SKELETON] [--feature FEATURES [FEATURES ...]] [--kerneldir KERNELDIR] [--kernelver KERNELVER]
[--firmwaredir FIRMWAREDIR] [--output OUTPUT]
ubuntu-core-initramfs create-initrd: error: argument --kernelver: expected one argument
azure@john-cabaj-uci-test-kcp:~$ /etc/kernel/postinst.d/ubuntu-core-initramfs 5.4.0-1151-azure
Traceback (most recent call last):
File "/usr/bin/ubuntu-core-initramfs", line 248, in <module>
main()
File "/usr/bin/ubuntu-core-initramfs", line 244, in main
globals()[args.subcmd.replace("-", "_")](parser, args)
File "/usr/bin/ubuntu-core-initramfs", line 77, in create_initrd
with open(args.output, "wb") as output:
PermissionError: [Errno 13] Permission denied: '/boot/ubuntu-core-initramfs.img-5.4.0-1151-azure'
azure@john-cabaj-uci-test-kcp:~$ sudo /etc/kernel/postinst.d/ubuntu-core-initramfs 5.4.0-1151-azure
azure@john-cabaj-uci-test-kcp:~$
Author
There was a problem hiding this comment.
initrd generated:
azure@john-cabaj-uci-test-kcp:~$ ls -lt /boot/
total 135225
-rw-r--r-- 1 root root 19927668 Jul 17 16:23 ubuntu-core-initramfs.img-5.4.0-1151-azure
-rw-r--r-- 1 root root 29943639 Jul 17 16:02 initrd.img-5.4.0-1166-azure
drwxr-xr-x 4 root root 4096 Jul 17 16:02 grub
-rw-r--r-- 1 root root 19927743 Jul 17 16:02 ubuntu-core-initramfs.img-5.4.0-1166-azure
lrwxrwxrwx 1 root root 27 Jul 17 16:01 initrd.img -> initrd.img-5.4.0-1166-azure
lrwxrwxrwx 1 root root 24 Jul 17 16:01 vmlinuz -> vmlinuz-5.4.0-1166-azure
lrwxrwxrwx 1 root root 27 Jul 17 15:56 initrd.img.old -> initrd.img-5.4.0-1151-azure
lrwxrwxrwx 1 root root 24 Jul 17 15:56 vmlinuz.old -> vmlinuz-5.4.0-1151-azure
-rw-r--r-- 1 root root 29943381 Jul 17 15:54 initrd.img-5.4.0-1151-azure
-rw------- 1 root root 13141358 Jun 24 18:45 vmlinuz-5.4.0-1166-azure
-rw------- 1 root root 6026324 Jun 24 18:44 System.map-5.4.0-1166-azure
-rw-r--r-- 1 root root 180868 Jun 24 18:44 config-5.4.0-1166-azure
-rw------- 1 root root 13137028 Apr 24 2025 vmlinuz-5.4.0-1151-azure
-rw------- 1 root root 6025670 Apr 24 2025 System.map-5.4.0-1151-azure
-rw-r--r-- 1 root root 180868 Apr 24 2025 config-5.4.0-1151-azure
drwx------ 3 root root 512 Jan 1 1970 efi
Meulengracht
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ript
6a19b57: "core-initrd: adding "azure-fde" option to post installation script" moved the create-initrd call into only amd64 arches, which broke arm64 and armhf use cases