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

BootLoader Spec Support #83

Open
hanetzer opened this issue Feb 25, 2021 · 3 comments
Open

BootLoader Spec Support #83

hanetzer opened this issue Feb 25, 2021 · 3 comments

Comments

@hanetzer
Copy link

https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/

Just an idea. Basically this, and you can have multiple files.

# /boot/loader/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
title      Fedora 19 (Rawhide)
version    3.8.0-2.fc19.x86_64
machine-id 6a9857a393724b7a981ebb5b8495b9ea
options    root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
linux      /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
initrd     /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd
@klauskiwi
Copy link

Looks like it's very very close to our 'native' configuration in Petitboot:

name Fedora 19 (Rawhide)
image /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
args root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
initrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd

We don't have machine-id or version - but apparently we're not required to do anything special about them as well, so we might as well ignore them for a first version of this feature.

So looks like we could simply duplicate the native parser and call it 'freedesktop' or something similar, changing name for title and args for options and making sure we can ignore machine-id and version for now.

Do you want to take a stab at providing patches for this?

@hanetzer
Copy link
Author

Well, its not just one file, more of a drop in dir. You can have, for example:

/boot/efi/loader/entries/aeeef620aa484bb490a0638814a92548-0-rescue.conf
/boot/efi/loader/entries/aeeef620aa484bb490a0638814a92548-5.10.14-200.fc33.x86_64.conf
/boot/efi/loader/entries/aeeef620aa484bb490a0638814a92548-5.10.15-200.fc33.x86_64.conf
/boot/efi/loader/entries/aeeef620aa484bb490a0638814a92548-5.10.16-200.fc33.x86_64.conf

All on one machine. I could give it a go, sure. I'm not familiar with bison/etc but it can't be that
hard.

@sammj
Copy link
Contributor

sammj commented Feb 26, 2021

There is already some initial support for BootloaderSpec files in https://github.com/open-power/petitboot/blob/master/discover/grub2/blscfg.c, although the intent is mainly being referenced by GRUB. That could be a good start to make the support more generic.

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

3 participants