Re: [systemd-devel] mkosi Unable to locate embedded .linux section: Load Error

2023-01-19 Thread Roberts, William C



> -Original Message-
> From: Roberts, William C
> Sent: Thursday, January 19, 2023 10:45 AM
> To: Lennart Poettering 
> Cc: systemd-devel@lists.freedesktop.org
> Subject: RE: [systemd-devel] mkosi Unable to locate embedded .linux section:
> Load Error
> 
> 
> 
> > -Original Message-
> > From: Lennart Poettering 
> > Sent: Thursday, January 19, 2023 3:30 AM
> > To: Roberts, William C 
> > Cc: systemd-devel@lists.freedesktop.org
> > Subject: Re: [systemd-devel] mkosi Unable to locate embedded .linux section:
> > Load Error
> >
> > On Di, 17.01.23 20:09, Roberts, William C (william.c.robe...@intel.com)
> wrote:
> >
> > > I am on current main branch:
> > > 0eb635ef4bc1 (HEAD -> main, origin/main, origin/HEAD) units: don't
> > > install pcrphase-related units without gnu-efi
> > >
> > > And I cannot get the mkosi qemu to work, mkosi boot does work. It
> > > looks like it's not finding the relevant section to boot from the image:
> > > Unable to locate embedded .linux section: Load Error Failed to
> > > execute Ubuntu 22.04 LTS (22.04 (Jammy Jellyfish))
> > > (\EFI\Linux\mkosi-ubuntu-5.15.0-58-generic.efi): Load Error
> >
> > (Note, older mkosi didn#t use the "ukify" infra to generate UKIs, and
> > there was a chance this would result in overlapping PE sections which
> > might be the issue here. but that's just a guess. please try current
> > mkosi git, and see if that works)
> >
> > (I guess most mkosi upstreams use fedora, not ubuntu, so this might be
> > less
> > tested)
> 
> On mkosi commit 6332528, it used bootctl --root which seems to not be
> available On my Ubuntu 20.04 system (bootctl --version yields system 245) .
> I'll set up a Fedora machine and test there.

Could anyone recommend a version of Fedora to test on, Ie should I pick 32, 34, 
37, etc?



Re: [systemd-devel] mkosi Unable to locate embedded .linux section: Load Error

2023-01-19 Thread Roberts, William C



> -Original Message-
> From: Lennart Poettering 
> Sent: Thursday, January 19, 2023 3:30 AM
> To: Roberts, William C 
> Cc: systemd-devel@lists.freedesktop.org
> Subject: Re: [systemd-devel] mkosi Unable to locate embedded .linux section:
> Load Error
> 
> On Di, 17.01.23 20:09, Roberts, William C (william.c.robe...@intel.com) wrote:
> 
> > I am on current main branch:
> > 0eb635ef4bc1 (HEAD -> main, origin/main, origin/HEAD) units: don't
> > install pcrphase-related units without gnu-efi
> >
> > And I cannot get the mkosi qemu to work, mkosi boot does work. It
> > looks like it's not finding the relevant section to boot from the image:
> > Unable to locate embedded .linux section: Load Error Failed to execute
> > Ubuntu 22.04 LTS (22.04 (Jammy Jellyfish))
> > (\EFI\Linux\mkosi-ubuntu-5.15.0-58-generic.efi): Load Error
> 
> (Note, older mkosi didn#t use the "ukify" infra to generate UKIs, and there 
> was a
> chance this would result in overlapping PE sections which might be the issue
> here. but that's just a guess. please try current mkosi git, and see if that 
> works)
> 
> (I guess most mkosi upstreams use fedora, not ubuntu, so this might be less
> tested)

On mkosi commit 6332528, it used bootctl --root which seems to not be available
On my Ubuntu 20.04 system (bootctl --version yields system 245) .
I'll set up a Fedora machine and test there.

> 
> Lennart
> 
> --
> Lennart Poettering, Berlin


[systemd-devel] mkosi Unable to locate embedded .linux section: Load Error

2023-01-17 Thread Roberts, William C
I am on current main branch:
0eb635ef4bc1 (HEAD -> main, origin/main, origin/HEAD) units: don't install 
pcrphase-related units without gnu-efi

And I cannot get the mkosi qemu to work, mkosi boot does work. It looks like 
it's not finding the relevant section to boot
from the image:
Unable to locate embedded .linux section: Load Error
Failed to execute Ubuntu 22.04 LTS (22.04 (Jammy Jellyfish)) 
(\EFI\Linux\mkosi-ubuntu-5.15.0-58-generic.efi): Load Error

Can anyone assist with this?

sudo -E $(which mkosi) qemu
‣ Warning: \
            mkosi didn't find 80-vm-vt.network. This is one of systemd's 
built-in
            systemd-networkd config files which configures vt-* interfaces.
            mkosi needs this file in order for --netdev to work properly for 
QEMU
            virtual machines. The file likely cannot be found because the 
systemd version
            on the host is too old (< 246) and it isn't included yet.

            As a workaround until the file is shipped by the systemd package of 
your distro,
            add a network file /etc/systemd/network/80-vm-vt.network with the 
following
            contents:

            [Match]
            Name=vt-*
            Driver=tun

            [Network]
            # Default to using a /28 prefix, giving up to 13 addresses per VM.
            Address=0.0.0.0/28
            LinkLocalAddressing=yes
            DHCPServer=yes
            IPMasquerade=yes
            LLDP=yes
            EmitLLDP=customer-bridge
            IPv6PrefixDelegation=yes

‣ Running command:
‣ qemu-system-x86_64 -machine type=q35,accel=kvm,smm=on -smp 1 -m 2G -object 
rng-random,filename=/dev/urandom,id=rng0 -device 
virtio-rng-pci,rng=rng0,id=rng-device0 -cpu max -nographic -nodefaults -serial 
mon:stdio -nic user,model=virtio-net-pci -drive 
if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.secboot.fd 
-global ICH9-LPC.disable_s3=1 -global 
driver=cfi.pflash01,property=secure,value=on -drive 
file=/var/tmp/.mkosi-ks0d1fax,if=pflash,format=raw -drive 
'if=none,id=hd,file=/home/wcrobert/workspace/systemd/mkosi.output/ubuntu~jammy/image.raw,format=raw'
 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd,bootindex=1 -chardev 
socket,id=chrtpm,path=/tmp/tmp6cxqwhqh/sock -tpmdev 
emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0

BdsDxe: loading Boot0001 "UEFI QEMU QEMU HARDDISK " from 
PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU HARDDISK " from 
PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x0,0x0)
systemd-boot@0x7D486000,0x7D4A6000
systemd-stub@0x71A49000,0x71A63000
Unable to locate embedded .linux section: Load Error
Failed to execute Ubuntu 22.04 LTS (22.04 (Jammy Jellyfish)) 
(\EFI\Linux\mkosi-ubuntu-5.15.0-58-generic.efi): Load Error
BdsDxe: failed to start Boot0001 "UEFI QEMU QEMU HARDDISK " from 
PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x0,0x0): Load Error
BdsDxe: loading Boot0002 "EFI Internal Shell" from 
Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
BdsDxe: starting Boot0002 "EFI Internal Shell" from 
Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)