Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-boot support #2

Open
lovesegfault opened this issue Sep 23, 2019 · 12 comments
Open

systemd-boot support #2

lovesegfault opened this issue Sep 23, 2019 · 12 comments

Comments

@lovesegfault
Copy link

It'd be nice if systemd-boot, former gummiboot, was supported.

@mgorny
Copy link
Member

mgorny commented May 22, 2020

Good news, everyone. I've started reviving the project, and this is next on my TODO list. So maybe tomorrow.

mgorny added a commit that referenced this issue May 23, 2020
Bug: #2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
@prometheanfire
Copy link

tomorrow, eh?

@mgorny
Copy link
Member

mgorny commented Mar 4, 2021

tomorrow, eh?

Don't you see the commit, though?

@prometheanfire
Copy link

I do, it looks like it's not finding my kernel because it was installed as linux and not vmlinuz as it expects.

@prometheanfire
Copy link

or being placed in a subdir of /boot/<machine_id> like /boot/<machine_id>/<KERNEL_VER>

@prometheanfire
Copy link

clean-kernel -n 5 -p --debug

DEBUG:root:Layout: <ecleankernel.layout.blspec.BlSpecLayout object at 0x7f501b934df0>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.lilo.LILO'>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.grub2.GRUB2'>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.grub.GRUB'>
DEBUG:root:Bootloader failed: <class 'ecleankernel.bootloader.yaboot.Yaboot'>
DEBUG:root:Bootloader: <ecleankernel.bootloader.symlinks.Symlinks object at 0x7f501b934eb0>
DEBUG:root:Sorter: <ecleankernel.sort.VersionSort object at 0x7f501b934e20>
DEBUG:root:in get_removal_list()
Preserving currently running kernel (5.11.2)
Legend:
[-] file being removed
[+] file being kept (used by other kernels

These are the kernels which would be removed:
- 5.10.18: vmlinuz does not exist
 [-] /boot/dbca93ecd27d4e08aa36d39eedea459f/5.10.18/initrd
 [-] /boot/dbca93ecd27d4e08aa36d39eedea459f/5.10.18/linux
 [-] /boot/dbca93ecd27d4e08aa36d39eedea459f/5.10.18
 [-] /lib/modules/5.10.18/../../../usr/src/linux-5.10.18
 [-] /lib/modules/5.10.18
- 5.10.19: vmlinuz does not exist
 [-] /boot/dbca93ecd27d4e08aa36d39eedea459f/5.10.19/initrd
 [-] /boot/dbca93ecd27d4e08aa36d39eedea459f/5.10.19/linux
 [-] /boot/dbca93ecd27d4e08aa36d39eedea459f/5.10.19
 [-] /lib/modules/5.10.19/../../../usr/src/linux-5.10.19
 [-] /lib/modules/5.10.19
- 5.6.13-gentoo: vmlinuz does not exist
 [-] /usr/src/linux-5.6.13-gentoo
 [-] /lib/modules/5.6.13-gentoo
- 5.9.3-gentoo: vmlinuz does not exist
 [-] /usr/src/linux-5.9.3-gentoo
 [-] /lib/modules/5.9.3-gentoo

@prometheanfire
Copy link

magic number returned is ynam and not HdrS. However, my kernel version is also at 61440 bytes into the file and not 14848 bytes in.

@mgorny
Copy link
Member

mgorny commented Mar 5, 2021

I guess you need to teach it how to find the (compressed?) kernel image.

@prometheanfire
Copy link

Ya, how to read the efi binary to find the kernel image and then from that read the kernel version (as I mentioned on irc last night).

@Jannik2099
Copy link
Contributor

If you need inspiration for parsing the PE file headers, I threw this together in a hurry - though I did this for self-practice and I don't mean to steal the show from prometheanfire. https://github.com/Jannik2099/eclean-kernel/blob/efistub/ecleankernel/file.py#L169

Flowdalic added a commit to Flowdalic/eclean-kernel that referenced this issue Apr 3, 2021
According to https://systemd.io/BOOT_LOADER_SPECIFICATION/ the
placeholder file system $BOOT should be mounted on /boot or
/efi. Additional locations like /boot/efi might also be supported.

This is also what systemd's /usr/bin/kernel-install bash script
currently supports.

Bug: projg2#2
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
mgorny pushed a commit that referenced this issue Apr 7, 2021
According to https://systemd.io/BOOT_LOADER_SPECIFICATION/ the
placeholder file system $BOOT should be mounted on /boot or
/efi. Additional locations like /boot/efi might also be supported.

This is also what systemd's /usr/bin/kernel-install bash script
currently supports.

Bug: #2
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Closes: #14
Signed-off-by: Michał Górny <mgorny@gentoo.org>
@prometheanfire
Copy link

I can confirm that the the edit seems to work. Jannik2099@32b1a2d

@Jannik2099
Copy link
Contributor

Oh, I'm positively surprised that this is in working condition, heh - I can't predict when I'll find time to work on this, so anyone may feel free to pick up from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants