Re: mkosi Unable to locate embedded .linux section: Load Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 23, 2023 at 11:25 AM William Roberts
<bill.c.roberts@xxxxxxxxx> wrote:
>
> On Fri, Jan 20, 2023 at 4:53 PM Barry <barry@xxxxxxxxxxxxxxxx> wrote:
> >
> >
> >
> > > On 20 Jan 2023, at 20:40, William Roberts <bill.c.roberts@xxxxxxxxx> wrote:
> > >
> > > On Thu, Jan 19, 2023 at 1:41 PM Barry <barry@xxxxxxxxxxxxxxxx> wrote:
> > >>
> > >>
> > >>
> > >>>> On 19 Jan 2023, at 19:19, Roberts, William C <william.c.roberts@xxxxxxxxx> wrote:
> > >>>
> > >>> 
> > >>>
> > >>>> -----Original Message-----
> > >>>> From: Roberts, William C
> > >>>> Sent: Thursday, January 19, 2023 10:45 AM
> > >>>> To: Lennart Poettering <mzerqung@xxxxxxxxxxx>
> > >>>> Cc: systemd-devel@xxxxxxxxxxxxxxxxxxxxx
> > >>>> Subject: RE:  mkosi Unable to locate embedded .linux section:
> > >>>> Load Error
> > >>>>
> > >>>>
> > >>>>
> > >>>>> -----Original Message-----
> > >>>>> From: Lennart Poettering <mzerqung@xxxxxxxxxxx>
> > >>>>> Sent: Thursday, January 19, 2023 3:30 AM
> > >>>>> To: Roberts, William C <william.c.roberts@xxxxxxxxx>
> > >>>>> Cc: systemd-devel@xxxxxxxxxxxxxxxxxxxxx
> > >>>>> Subject: Re:  mkosi Unable to locate embedded .linux section:
> > >>>>> Load Error
> > >>>>>
> > >>>>> On Di, 17.01.23 20:09, Roberts, William C (william.c.roberts@xxxxxxxxx)
> > >>>> 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?
> > >>
> > >> Use 37 its current and you can get  support.
> > >> Note fedora release only have support for a year, so 32 and 34 have been EOL for a while.
> > >>
> > >> Barry
> > >
> > > Ok so I installed F37, built systemd and ran mkosi, but it failed as well.
> > > mkosi version 14 from package manager:
> > >   - dnf issues
> > >  - https://gist.github.com/williamcroberts/492f29132582aa363710878e85f7db13
> > > built from source (commit 6332528b0)
> > >  - dnf issues
> > >  - https://gist.github.com/williamcroberts/8923ac33413a448c737b6534f2a7c4c7
> >
> > I guess you have to create an empty database to get things going?
> >
> > > mkosi-13 from package manager:
> > >  - failed to find meson (meson is installed and sudo env can see it)
> > >  - https://gist.github.com/williamcroberts/f2ace4cb3ab053b2d6ff547309b7b563
> >
> > Check the PATH at the point in code it tries to run meson.
>
> Ok I got the mkosi build working again. It seemed it did not like
> building out of an
> sshfs mount. But I bumped into the same error:
>
> 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@0x7D146000,0x7D165000
> systemd-stub@0x70187000,0x701A1000
> Unable to locate embedded .linux section: Load Error
> Failed to execute Fedora Linux 37 (Thirty Seven) (37 (Thirty Seven))
> (\EFI\Linux\mkosi-fedora-6.1.7-200.fc37.x86_64.efi): Load Error
> BdsDxe: failed to start Boot0001 "UEFI QEMU QEMU HARDDISK " from
> PciRoot(0x0)/Pci(0x3,0x0)/Scsi(0x0,0x0): Load Error
> systemd-boot@0x7CEC9000,0x7CEE8000
> systemd-stub@0x70187000,0x701A1000
> Unable to locate embedded .linux section: Load Error
>
>

So I updated to the current main branch, and it's now working (commit
782418a166).
So I rebased my changes on top of main and it noots now.

So it appears that it broke and came back to life. I could try and bisect it,
but it would take forever on my machine.

I get this warning, for whatever that's worth:
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@0x7d14a000,0x7d16b000
systemd-stub@0x70189000,0x701a4000
Overlapping PE sections detected. Boot may fail due to image memory corruption!
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9

Thanks for the help and suggestions along the way,
Bill




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux