On Mon, Jul 04, 2022 at 03:59:25PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > https://raw.githubusercontent.com/keszybz/mkosi-initrd-talk/main/mkosi-initrd.pdf
> 
> Hmm.  Nice ideas (reproducible initrds, yay!), but it feels more like
> being at proof-of-concept state.  mkosi going fetch stuff from the
> internet to generate the initrd is clearly a non-starter (maybe not that
> much of a problem when doing it in koji where the next fedora repo is
> only one network hop away).

A few experiments later.  Using 'mkosi --use-host-repositories' greatly
improves the situation.  mkosi picks up the local repo config then and
fetches stuff from my local mirror.

Going build unified kernel image (using 'man systemd-stub'
instructions):

# build unified kernel
echo "Unified Linux Kernel ${KVER}" > os-release
objcopy --add-section .osrel=os-release \
        --add-section .cmdline=/proc/cmdline \
        --add-section .linux=/boot/vmlinuz-${KVER} \
        --add-section .initrd=initrd_${KVER}.cpio.zstd \
        \
        --change-section-vma .osrel=0x20000 \
        --change-section-vma .cmdline=0x30000 \
        --change-section-vma .linux=0x2000000 \
        --change-section-vma .initrd=0x3000000 \
        \
        /usr/lib/systemd/boot/efi/linuxx64.efi.stub \
        /boot/efi/EFI/Linux/unified-${KVER}.efi

Booting that directly from the ovmf firmware menu works fine.
Progress!

grub2 doesn't find it.  Support not implemented?

Ok, lets try systemd-boot instead.  Install.
Chainload from grub for now:

root@fedora ~/mkosi-initrd (main)# cat /boot/grub2/custom.cfg 
if [ "$grub_platform" = "efi" ]; then
        menuentry 'systemd boot loader' {
                chainloader (hd0,gpt1)/efi/systemd/systemd-bootx64.efi
        }
fi

systemd-boot doesn't find it either.  Double-checking.  ESP mounted at
/boot/efi.  Directory looks fine to me:

root@fedora ~/mkosi-initrd (main)# ll /boot/efi/EFI/Linux
total 77832
-rwx------. 1 root root 79698816 Jul  6 15:36 unified-5.18.9-200.fc36.x86_64.efi

Any clues?

thanks,
  Gerd
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to