Hello hello, I'm trying to port the netinstall. Now I'm blocked right after the partitioning page, it tries to install grub2-efi(x86_64) on aarch64. The issue is here: https://gitweb.mageia.org/software/drakx/tree/perl-install/install/any.pm#n776 if not i*86, it defaults to x86_64, the case for aarch64. I already tried the customization without success: https://wiki.mageia.org/en/Drakx-installer_tips_and_tricks#Customisation_of_the_install_by_patching_it because the path does not match and the tools unsquashfs is not present on the netinstaller, and my system refuses to mount rw the netinstall generated iso. In order to help, I'm suggesting a patch: https://gitweb.mageia.org/software/drakx/diff/?h=user/jibz/grub2-efi-aarch64 Please review the patch, test it if you can (I can't, I even don't have the storage space for a local altered mirror).
1) Switch is obsolete, we should use "given/when" instead or a simple hash. It also mean we would need to include obsolete Switch in stage2 (which is not done in your patch) See https://metacpan.org/dist/perl/view/pod/perlsyn.pod#Switch-Statements for the "new" way. 2) why do you change the indentation in the else branch? That will get in the way of "git blame" for no reason 3) anyway the logic already exists in bootloader : https://gitweb.mageia.org/software/drakx/tree/perl-install/bootloader.pm#n2651 So no need to reinvent the wheel. We just to split that logic in some function in eg: any.pm.
CC: (none) => thierry.vignaud
Created attachment 14241 [details] (get_grub2_pkg) split it out
Created attachment 14242 [details] Fix grub2 pkg name on aarch64 (mga#32686)
Also, the installer is basically frozen for stable release, so let's make this bug happen to Cauldron. We can always backport it if there's ever a mga9.1 release (like we had mga7.1)
Version: 9 => Cauldron
Keywords: (none) => PATCH
Source RPM: drakx => drakx-installer-stage2
Wow. Ok. Why to you work on bugzilla with patches instead of git branches ?
(In reply to Jybz from comment #0) > I already tried the customization without success: > https://wiki.mageia.org/en/Drakx- > installer_tips_and_tricks#Customisation_of_the_install_by_patching_it > because the path does not match and the tools unsquashfs is not present on > the netinstaller, and my system refuses to mount rw the netinstall generated > iso. unsquashfs is part of the squashfs-tools pkg. This part is meant for customizing a mirror as the stage2 sqfs image is in install/stage2/ on the mirror. Eg: https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/install/stage2/ If you want to do live customization, you need a patch file and thus need to follow https://wiki.mageia.org/en/Drakx-installer_tips_and_tricks#Customisation_of_the_install_by_patching_it You just need to do a "patch" file and adding it on eg a USB key plugged and add the patch option in the booloader phase to the installer (eg <esc>, then typing "linux patch" <enter> for a ISO boot on ia32) patch doing sg as the above patches: <<<< use bootloader; bootlooader::get_grub2_pkg = sub { (…) }; > use install::any undef *default_bootloader; *default_bootloader = sub { (…) }; >>> See http://gitweb.mageia.org/software/drakx/tree/perl-install/patch?h=distro/mdv2008.0 for examples
Well Thierry, thank you for jumping on this so quickly & thoroughly. Please excuse assignment to yourself...
Assignee: bugsquad => thierry.vignaudCC: thierry.vignaud => (none)
Why create a temp branch for just 2 small patches ? Anyway it's fixed in git after a quick test
Created attachment 14243 [details] [DEBUG] simulate UEFI on a !UEFI box (replace 'x64' by 'aa64' for faking aarch64) For the record, I used the attached patch in order to test just this function with my 2 patches, using : perl -I. -I/usr/lib/libDrakX -Minstall::any -e 'my $p = install::any::default_bootloader(); warn $p->[0], "\n"' You can use such tricks in order to test changes if you don't have a local mirror. I'd a quirk to develop/debug drakx w/o a full local mirror but I don't remember if I described it somewhere. It was probably using ../tools/drakx-in-chroot --repository=http://… : https://gitweb.mageia.org/software/drakx/tree/tools/drakx-in-chroot#n22
Fixed in git
Status: NEW => RESOLVEDResolution: (none) => FIXED
Thank you very much. I need the new version on the mirrors. Should I reopen the ticket? Or should I create a new one?
it will be available on the mirors when a new drakx will be pushed on the BS.
CC: (none) => mageia
It works and it does not work. The error message is now : can not find grub2-efi(aarch64) So the package name is now well defined, but despite being present on the mirror: > [root@raspberry ~]# urpmq --provides grub2-efi > grub2-efi: bootloader > grub2-efi: config(grub2-efi)[== 2.06-28.mga9] > grub2-efi: grub2-efi[== 2.06-28.mga9] > grub2-efi: grub2-efi(aarch-64)[== 2.06-28.mga9] > grub2-efi: grub2bootloader[== 2.06-28.mga9] it does not find it. Maybe for arm, we should just install grub2-efi (without "(aarch64)" ) ? I don't know how to debug.
CC: (none) => pterjan
For a trial, https://gitweb.mageia.org/software/drakx/tree/perl-install/install/any.pm#n591 at this line, I replace: > install::pkgs::select_by_package_names_or_die($urpm, default_bootloader(), 1) if !$o->{isUpgrade} && !$o->{match_all_hardware}; with > install::pkgs::select_by_package_names_or_die($urpm, ['grub2-efi'], 1) if !$o->{isUpgrade} && !$o->{match_all_hardware}; (so without (aarch-64)) and it worked for aarch64. Is the (x86_64) from the "provides" of the package of is it a way forcing the architecture? I will try another day.
Resolution: FIXED => (none)Status: RESOLVED => REOPENED