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

Script generated boot menu for all arches #1613

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

lkocman
Copy link
Contributor

@lkocman lkocman commented Sep 16, 2024

Fixes Issue #1609

  • Newly added x86_64 and aarch64 write stock copies from kiwi generated grub.cfg

  • Intel uefi boot fix from "Boot from disk item" (gh#Boot local option in Agama doesn't work on UEFI #1609)

  • Keep -x on purpose for future trubleshooting (advice from Marcus)

  • Use $kiwi_iname instead of static agama-live reference in all of config-cdroom/* with exception of s390x, where for some reason we use SUSE Linux... string instead

  • copy .profile to $dst so we can source it from fixboot scripts. Somehow xorriso looses access to ENV from parent which has access to kiwi_iname and other kwiwi variables

image

- Newly added x86_64 and aarch64 write stock copies from kiwi
  generated grub.cfg

- Intel uefi boot fix from "Boot from disk item" (gh#agama-project#1609)

- Keep -x on purpose for future trubleshooting (advice from Marcus)

- Use $kiwi_iname instead of static agama-live reference in all of
  config-cdroom/* with exception of s390x, where for some reason
  we use SUSE Linux... string instead
@lkocman lkocman changed the title * Script generated boot menu for all arches Script generated boot menu for all arches Sep 16, 2024
Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jreidinger is our expert on the bootloader, so I would appreciate his review. From my POV the changes make sense.

Thanks a lot!

live/README.md Outdated Show resolved Hide resolved
Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>

dst=${1#iso:}

# KIWI config
Copy link
Contributor Author

@lkocman lkocman Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's important to do this after setting $dst. I was not able to get acccess to $kiwi_* variables (set in /.profile) fix_bootconfig.$arch . So I simply copied the .profile into the $dst from where the xorriso -> fix_bootconfig.$arch was executed.

This was working (vars inherited, without copying the file) if the fix_bootconfig was called outside xorriso.

echo 'Loading kernel...'
linux /boot/ppc64le/linux
echo 'Loading initrd...'
initrd /boot/ppc64le/initrd
}

menuentry 'Check Installation Media -- Agama Live' --class os --unrestricted {
menuentry "Check Installation Media -- $kiwi_iname" --class os --unrestricted {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt that it would be nice to cosistently use $kiwi_iname across all arches. I did not dare to touch s390x.

}
menuentry "Boot from Hard Disk" --class opensuse --class gnu-linux --class gnu --class os {
if search --no-floppy --file /efi/boot/fallback.efi --set ; then
for os in opensuse sles leap; do
Copy link
Contributor Author

@lkocman lkocman Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like somebody exchanged opensuse for leap in the past ... so now Agama:Devel/agama-installer has leap too :-)

Screenshot from 2024-09-17 09-00-00

source .profile
cp .profile "$dst"
fi

arch=`uname -m`

# removing live root setting from command line - it's in /etc/cmdline.d instead
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this block is needed since we have now static grub.cfg

initrd (\$root)/boot/aarch64/loader/initrd
}
menuentry "Boot from Hard Disk" --class opensuse --class gnu-linux --class gnu --class os {
exit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you test if that exit works properly on arm? does it move to the next entry in boot menu?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Josef, this was a copypaste from the Arm agama-installer without any modifications.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but nope we currently only test on intel in openQA and I have no arm device at hand.

live/src/fix_bootconfig Outdated Show resolved Hide resolved
@lkocman
Copy link
Contributor Author

lkocman commented Sep 17, 2024

the USB based legacy boot (with usb being the first boot device) still has struggle but that was also before this PR.
https://openqa.opensuse.org/tests/4485755#step/grub_test/5

live/src/fix_bootconfig Outdated Show resolved Hide resolved
@jreidinger jreidinger merged commit fcdc7ed into agama-project:master Sep 17, 2024
@imobachgs imobachgs mentioned this pull request Sep 20, 2024
imobachgs added a commit that referenced this pull request Sep 20, 2024
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

Successfully merging this pull request may close these issues.

3 participants