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

Custom Image doesn't boot after install #2249

Open
max06 opened this issue Dec 28, 2024 · 4 comments
Open

Custom Image doesn't boot after install #2249

max06 opened this issue Dec 28, 2024 · 4 comments
Assignees
Labels
kind/question Further information is requested release/orange

Comments

@max06
Copy link

max06 commented Dec 28, 2024

Good morning... again 😅

I'm currently building an elemental distribution based on ubuntu 24.04 - on your orange flavor. It took some time to get used to this toolkit, as well as some fixes in the orange dockerfile to make things work.

So far I have a working build pipeline throwing out container and iso oci images, and an accompanying channel image.
Said images, prepared by rancher, boot perfectly fine in my virtual machines.
Installation works and finishes without errors.

After reboot I get greeted by grub containing 2 items in its menu. And then it falls apart:
image
Booting the recovery works though.

I know you're not supporting foreign distributions, and I wouldn't even be (seriously) mad if you close this issue. Maybe just a little bit... for a while... 😄

If you are interested: Awesome!

Here's the channel manifest:

apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSVersionChannel
metadata:
  name: elemental-ubuntu-bare-metal
  namespace: fleet-default
spec:
  deleteNoLongerInSyncVersions: false
  options:
    image: ghcr.io/max06/elemental-ubuntu-channel:bare-metal
  syncInterval: 10m
  type: custom

The repo can be found here. It's mostly a mix of the orange Dockerfile and your elemental-repository for the config files. The pipeline uses the Makefile.

The whole thing is work in progress, some parts are missing. I just wanted to solve this issue before moving on. I just don't really have a clue at this moment.

Thank you very much!

@max06
Copy link
Author

max06 commented Dec 29, 2024

After some debugging:

Grub on suse and grub on debian behave differently.

Grub on suse is able to read the bootargs.cfg file without specifying a subvolume via cat (hd0,gpt4)/etc/elemental/bootargs.cfg
Grub on debian doesn't like that. (hd0,gpt4) is empty, (hd0,gpt4)/@/ shows a state.yaml and (hd0,gpt4)/@/.snapshots/1/snapshot/etc/elemental/bootargs.cfg leads to the golden lands....

Edit: Before I start building the suse grub2 with its 244 patches to make it work... can you add the current snapshot iteration to a variable similar to passive_snaps? Grubs scripting abilities are too limited to find that value on its own.

@kkaempf kkaempf added kind/bug Something isn't working release/orange labels Jan 2, 2025
@kkaempf kkaempf added this to Elemental Jan 2, 2025
@kkaempf kkaempf moved this to 💡 Backlog in Elemental Jan 2, 2025
@max06
Copy link
Author

max06 commented Jan 3, 2025

Good morning, and happy new year!

I'm really not looking for any kind of priority or nagging or something like that - but a rough estimation would be awesome for me to plan ahead.

The hardware for my small test cluster will arrive next week, the big proof-of-concept setup is due for end of the month. It's fine if this issue stays longer, I just need to know so I can move on patching the ubuntu grub - I don't know enough go to fix the bug by myself.


Different topic: I'm not sure how your labels work - it looks like you categorized this issue as a bug with the orange release. I'd say this is a bug with the elemental toolkit, requiring the suse-built grub as a hard dependency -> affects all flavors except suse-related ones. Please correct me if I misunderstood.

@frelon
Copy link
Contributor

frelon commented Jan 8, 2025

Happy new year @max06!

I was debugging this issue and I think what is happening is that your elemental-toolkit version is missing this code which sets the active_snap grub variable from this PR: #2207

Also, your bootargs.cfg will need the new syntax with root_subpath:

set kernel=/${root_subpath}boot/vmlinuz
set initramfs=/${root_subpath}boot/initrd

We will release a new version soon, until then you will have to build your own toolkit container, sorry for the inconvenience!

@frelon frelon self-assigned this Jan 8, 2025
@frelon frelon added kind/question Further information is requested and removed kind/bug Something isn't working labels Jan 8, 2025
@max06
Copy link
Author

max06 commented Jan 8, 2025

Good morning @frelon, and thank you for looking into this!

I was already wondering about the existence of active_snap in the source-code and thought it might be a relatively easy fix to add this to the bootenv - I'm kinda glad now I didn't try it 🙈

No worries - I'll give it a shot and report back 🙇🏼‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested release/orange
Projects
Status: 💡 Backlog
Development

No branches or pull requests

3 participants