Okay, got it installed. It's updating now.
I am working on what I believe may be a better version of the instructions.
In the meantime, I found an error.
Under step 6 this line appears:
- Code: Select all
cp /boot/grub2/x86_64-efi/core.efi /boot/EFI/EFI/boot/bootx64.efi
This doesn't work because it incorrectly references the files in question. The line should read:
- Code: Select all
cp /mnt/boot/grub2/x86_64-efi/core.efi /mng/boot/EFI/EFI/boot/bootx64.efi
Here is my attempt at revising these instructions. Warning; it was late when I did this. You'll want to proofread it closely before releasing it on the world. It may or may not be any better than yours. And thanks for all your help. I genuinely appreciate it.
=====================================
Boot up your Mageia install media in uefi.
Open a terminal.
Run the following commands as root.
1. Ensure your livecd is booted up in uefi with this command:
- Code: Select all
test -d /sys/firmware/efi && echo UEFI || echo BIOS
If the output of this command is not 'UEFI', reboot your livecd in uefi.
2. Verify the location of your installed Mageia OS partition by any using any one of these commands.
- Code: Select all
lsblk -f
parted -l
blkid
fdisk -l
The following examples will assume that 'sda5' is your Mageia installed partition, and your /boot/EFI is 'sda2'; change these 'sdax' variables to reflect the variables you found on your system.
3. Open a file manager and look into /boot. Copy the kernel and initrd files found there, for example vmlinuz-4.14.13-desktop-1.mga6 and initrd-4.14.13-desktop-1.mga6.img
4. Mount the partitions installed on your hard drive under the running operating system:
- Code: Select all
mount /dev/sda5 /mnt
mount /dev/sda2 /mnt/boot/EFI
5. Check /mnt/boot/EFI/etc/fstab for an entry mouting /boot/EFI:
- Code: Select all
UUID=xxxxxxxx /boot/EFI vfat umask=0077 0 1
If that line is not in /mnt/boot/EFI/etc/fstab, create it. You can find the UUID with the "blkid" command.
If your system is installed on an ssd, your syntax will be different. As long as it exists, leave it alone. Just understand that an fstab entry for /boot/EFI must exist in fstab.
6. Mount and grub-install
- Code: Select all
grub2-install --target=x86_64-efi --efi-directory=/mnt/boot/EFI --bootloader-id=mageia --boot-directory=/mnt/boot --recheck --debug
- Code: Select all
cp /mnt/boot/grub2/x86_64-efi/core.efi /mnt/boot/EFI/EFI/boot/bootx64.efi
7. Check that mageia is in uefi bootorder and mageia is at top of bootorder.
- Code: Select all
efibootmgr
8. Reboot.
If it boots to grub prompt, [[use the same as above post but use linuxefi and initrdefi instead of linux16 and initrd16.
Sigh... just use linux and initrd. It will work for both uefi or bios-legacy.]] <-- I'm not sure I understand what this is all about. When I rebooted everything was just fine.
Install and configure grub2:
- Code: Select all
grub2-install
grub2-mkconfig -o /boot/grub2/grub.cfg
Let's just reboot everything all the time.