SOLVED: Mageia 6 UEFI Doesn't Boot

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

SOLVED: Mageia 6 UEFI Doesn't Boot

Postby johnms » Sep 2nd, '17, 11:23

I followed the guide from the Wiki, https://wiki.mageia.org/en/Installing_on_systems_with_UEFI_firmware, to install Mageia 6 on my new computer. The installation went fine, but when I rebooted it only starts Windows, the GRUB 2 loader isn't ran. When I boot into the recovery mode using the DVD, and mount the drives; I see that both Windows and mageia directories are located under the /boot/UEFI. At this point I'm stuck. Here is my hardware:
    Intel Core i7 Kaby Lake
    MSI Z270 Gaming M3 (MS-7A62)
    DDR 4 64 GB Ram
    Nvidia GeForce GTX 1070
Last edited by johnms on Sep 11th, '17, 21:13, edited 1 time in total.
johnms
 
Posts: 10
Joined: Dec 19th, '14, 12:55

Re: Mageia 6 UEFI Doesn't Boot

Postby gohlip » Sep 2nd, '17, 12:05

I see that both Windows and mageia directories are located under the /boot/UEFI

Do you mean /boot/EFI/EFI? Meaning directory is /boot/EFI/EFI/mageia and /boot/EFI/EFI/Microsoft?
If you mean /boot/UEFI/mageia, then you have mounted the $esp wrongly.

As per the link, quoting...
you have also to mount the ESP partition to /boot/EFI.


More information for you.
https://wiki.mageia.org/en/Grub2-efi_and_Mageia
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: Mageia 6 UEFI Doesn't Boot

Postby johnms » Sep 2nd, '17, 12:28

gohlip wrote:Do you mean /boot/EFI/EFI? Meaning directory is /boot/EFI/EFI/mageia and /boot/EFI/EFI/Microsoft?


Yes, that is what I mean. I booted into the rescue again and mounted everything. The paths are: /boot/EFI/EFI/{Boot,Microsoft,mageia}. So, from what I understand they are mounted correctly.
johnms
 
Posts: 10
Joined: Dec 19th, '14, 12:55

Re: Mageia 6 UEFI Doesn't Boot

Postby johnms » Sep 2nd, '17, 13:06

Do you mean /boot/EFI/EFI? Meaning directory is /boot/EFI/EFI/mageia and /boot/EFI/EFI/Microsoft?

Yes, that is what I mean. I confirmed it using the recovery tool on the installation DVD.
johnms
 
Posts: 10
Joined: Dec 19th, '14, 12:55

Re: Mageia 6 UEFI Doesn't Boot

Postby gohlip » Sep 2nd, '17, 14:01

Okay then, another thing which is not clear.
If you can boot up to Mageia (this I am not clear)
then at terminal. first verify that /boot/EFI is mounted.
Code: Select all
findmnt /boot/EFI


This should say /dev/sdxy (oh, I also don't have your parted -l details (small 'L' sigh)) with other parameters.
Continue (as root) with [if findmnt /boot/EFI returns nothing, do not proceed]
Code: Select all
grub2-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=mageia --recheck --debug
cp /boot/grub2/x86_64-efi/core.efi /boot/EFI/EFI/boot/bootx64.efi
grub2-mkconfig -o /boot/grub2/grub.cfg


If you cannot boot into Mageia, get ready to boot up livecd (in UEFI) and provide beforehand the following (some commands as root)
Code: Select all
parted -l
blkid
cat /etc/fstab


or you can reinstall.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: Mageia 6 UEFI Doesn't Boot

Postby johnms » Sep 10th, '17, 09:31

Sorry for the delay in my reply, I took ill for a week. I am unable to boot into Mageia at all. I've been using the install DVD thus far. I've run the parted, blkid, cat commands as suggested and placed the information below. Note that since I was using a live boot DVD to do this I mounted the hard drive root under /mnt/MageiaRoot.

Code: Select all
[root@localhost ~]# parted -l
Model: ATA OCZ-VERTEX4 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  473MB   472MB   ntfs            Basic data partition          hidden, diag
 2      473MB   578MB   105MB   fat32           EFI system partition          boot, esp
 3      578MB   595MB   16,8MB                  Microsoft reserved partition  msftres
 4      595MB   74,0GB  73,4GB  ntfs                                          msftdata
 5      74,0GB  124GB   49,7GB  ext4
 6      124GB   128GB   4286MB  linux-swap(v1)


Model: ATA ST1000DM003-9YN1 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB


Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sdc: 2000GB                                                                                                                                                                                                                                                                                                       
Sector size (logical/physical): 512B/4096B                                                                                                                                                                                                                                                                                   
Partition Table: msdos                                                                                                                                                                                                                                                                                                       
Disk Flags:                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                             
Number  Start   End     Size    Type     File system  Flags                                                                                                                                                                                                                                                                 
 1      1049kB  2000GB  2000GB  primary  ntfs                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                             
Model: ATA ST1000DM003-9YN1 (scsi)                                                                                                                                                                                                                                                                                           
Disk /dev/sdd: 1000GB                                                                                                                                                                                                                                                                                                       
Sector size (logical/physical): 512B/4096B                                                                                                                                                                                                                                                                                   
Partition Table: gpt                                                                                                                                                                                                                                                                                                         
Disk Flags:                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                             
Number  Start   End     Size    File system  Name  Flags                                                                                                                                                                                                                                                                     
 1      1049kB  1000GB  1000GB                                                                                                                                                                                                                                                                                               


[root@localhost ~]# blkid
/dev/sda1: LABEL="Recovery" UUID="627E43577E4322E1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="266c2369-a913-4087-babc-ba71076c2bfe"
/dev/sda2: UUID="7C45-8188" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="7758731a-5512-4832-8b00-cd0f1bb305c1"
/dev/sda4: LABEL="Windows" UUID="884A58A84A5894B2" TYPE="ntfs" PARTUUID="4c155780-93de-4ca0-a716-92dd492c200a"
/dev/sda5: LABEL="Mageia Root" UUID="e82e358a-356a-4571-8b43-23eb11be8e29" TYPE="ext4" PARTUUID="fe7f6baf-4c08-48ac-811f-707af0c7036c"
/dev/sda6: LABEL="Swap" UUID="49853646-bb40-4bcc-a560-37958d244bbd" TYPE="swap" PARTUUID="cf894c66-5321-4712-a680-34bf2c9a7d08"
/dev/sdb1: UUID="8b966842-5ce7-4387-9991-374be1c0cfd3" TYPE="crypto_LUKS" PARTUUID="fd696155-7581-4144-af52-ed515072680c"
/dev/sdc1: LABEL="Windows Data" UUID="249E30BD9E308976" TYPE="ntfs" PARTUUID="7c47dd01-01"
/dev/sdd1: UUID="8b966842-5ce7-4387-9991-374be1c0cfd3" TYPE="crypto_LUKS" PARTUUID="fd696155-7581-4144-af52-ed515072680c"
/dev/loop0: TYPE="squashfs"
/dev/sr0: UUID="2017-07-11-20-04-49-00" LABEL="Mageia-6-Plasma-LiveDVD" TYPE="iso9660" PTUUID="2bc829b9" PTTYPE="dos"
/dev/mapper/isw_dhdebjjbdb_Homep1: UUID="8b966842-5ce7-4387-9991-374be1c0cfd3" TYPE="crypto_LUKS" PARTUUID="fd696155-7581-4144-af52-ed515072680c"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="e0a5367b-1c73-4b75-99e4-4ef57a16f8dc"
/dev/mapper/isw_dhdebjjbdb_Home: PTUUID="387cd4c8-9d55-41e3-ae9c-027ecee5dc42" PTTYPE="gpt"


[root@localhost ~]# cat /mnt/MageiaRoot/etc/fstab
# Entry for /dev/sda5 :
UUID=e82e358a-356a-4571-8b43-23eb11be8e29 / ext4 noatime,acl 1 1
# Entry for /dev/sda2 :
UUID=7C45-8188 /boot/EFI vfat umask=0,iocharset=utf8 0 0
/dev/mapper/crypt_mapper_isw_dhdebjjbdb_Home1 /home ext4 noatime,acl 0 0
# Entry for /dev/sda4 :
UUID=884A58A84A5894B2 /media/win_c ntfs-3g defaults,nofail 0 0
# Entry for /dev/sdc1 :
UUID=249E30BD9E308976 /media/win_c2 ntfs-3g defaults,nofail 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=49853646-bb40-4bcc-a560-37958d244bbd swap swap defaults 0 0
johnms
 
Posts: 10
Joined: Dec 19th, '14, 12:55

Re: Mageia 6 UEFI Doesn't Boot

Postby gohlip » Sep 10th, '17, 16:18

Hope you're better now.
Boot into mageia livecd (in UEFI mode)

Install in livecd the packages [1]
grub2, grub2-common and grub2-efi

Code: Select all
# urpmi grub2 grub2-common grub2-efi


Verify the Mageia partition is partition /dev/sda5 and /boot/EFI is /dev/sda2 {use the correct ones in commands below} using any of 'lsblk -f', 'parted -l', 'blkid', 'fdisk -l'

Code: Select all
# mount /dev/sda5 /mnt/MageiaRoot
# mount /dev/sda2  /mnt/MageiaRoot/boot/EFI
# grub2-install --target=x86_64-efi --efi-directory=/mnt/MageiaRoot/boot/EFI --bootloader-id=mageia  --boot-directory=/mnt/MageiaRoot/boot  --recheck --debug


Reboot without livecd. It should show Mageia grub2 menu. [2]
When booted up in Mageia
Code: Select all
# grub2-mkconfig -o /boot/grub2/grub.cfg
to include your windows installation.

Good luck


[1] in a recent post, the grub2 packages are not included in the mageia live OS.
[2] if reboot and only shows a grub prompt (grub>) {hopefully not - installation should generate grub.cfg even if grub is not installed properly}
then at grub prompt,

Code: Select all
grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-desktop root=UUID=$abc ro
grub> initrd /boot/initrd-desktop.img
grub> boot


And do a grub2-install as well when rebooted up to Mageia OS
Code: Select all
# grub2-install
# grub2-mkconfig -o /boot/grub2/grub.cfg
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: Mageia 6 UEFI Doesn't Boot

Postby johnms » Sep 10th, '17, 18:03

I tried it twice and from the output it says everything succeeded, but alas GRUB still does not appear. Just to be sure I even updated the live DVD prior to running anything. Attached is the debug output from the grub-install command. Below are the commands that I used:
Code: Select all
[live@localhost ~]$ su -
[root@localhost ~]# mkdir /mnt/MageiaRoot
[root@localhost ~]# mount /dev/sda5 /mnt/MageiaRoot
[root@localhost ~]# mount /dev/sda2  /mnt/MageiaRoot/boot/EFI
[root@localhost ~]# ls /mnt/MageiaRoot/
bin@  boot/  dev/  etc/  home/  initrd/  lib@  lib64@  lost+found/  media/  mnt/  opt/  proc/  root/  run/  sbin@  srv/  sys/  tmp/  usr/  var/
[root@localhost ~]# ls /mnt/MageiaRoot/boot/EFI/
EFI/  Temp/
[root@localhost ~]# urpmi grub2 grub2-common grub2-efi                                                                                                     
Package grub2-common-2.02-0.git10463.8.mga6.x86_64 is already installed                                                                                     
A requested package cannot be installed:                                                                                                                   
grub2-efi-2.02-0.git10463.8.mga6.x86_64 (due to conflicts with grub2-2.02-0.git10463.8.mga6.x86_64, due to conflicts with grub2-2.02-0.git10463.8.mga6.x86_64)                                                                                                                                                         
Continue installation anyway? (Y/n) n         
root@localhost ~]# urpmi grub2-efi
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch   
(medium "Live Core")
  efibootmgr                     0.12         4.mga6        x86_64 
  grub2-efi                      2.02         0.git10463.8> x86_64 
  lib64efivar0                   31           1.mga6        x86_64 
5.5MB of additional disk space will be used.
1MB of packages will be retrieved.
Proceed with the installation of the 3 packages? (Y/n) y


installing efibootmgr-0.12-4.mga6.x86_64.rpm grub2-efi-2.02-0.git10463.8.mga6.x86_64.rpm lib64efivar0-31-1.mga6.x86_64.rpm from /var/local/mga_rpms/core
Preparing...                     #########################################################################################################################
      1/3: lib64efivar0          #########################################################################################################################
      2/3: efibootmgr            #########################################################################################################################
      3/3: grub2-efi             #########################################################################################################################
[root@localhost ~]# grub2-install --target=x86_64-efi --efi-directory=/mnt/MageiaRoot/boot/EFI --bootloader-id=mageia --boot-directory=/mnt/MageiaRoot/boot --recheck --debug > /home/live/grubInstall.txt 2>&1
Attachments
grubInstall.txt
GRUB Install Debug Output
(708.38 KiB) Downloaded 218 times
johnms
 
Posts: 10
Joined: Dec 19th, '14, 12:55

Re: Mageia 6 UEFI Doesn't Boot

Postby gohlip » Sep 10th, '17, 18:32

grub2-install --target=x86_64-efi --efi-directory=/mnt/MageiaRoot/boot/EFI --bootloader-id=mageia --boot-directory=/mnt/MageiaRoot/boot --recheck --debug > /home/live/grubInstall.txt 2>&1


Why > /home/live/grubInstall.txt 2>&1 ?
Do the command, not output it to standout.

[edit] - since you're in livecd, check what's in /mnt/MageiaRoot/boot/
Is there vmlinuz-desktop and initrd-desktop.img? If not, copy the actual kernel and initrd files like vmlinuz-4.9.43-desktop-1.mga6 and initrd-4.9.43-desktop-1.mga6.img
And use these instead if sym-links are not found.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: Mageia 6 UEFI Doesn't Boot

Postby hovel » Sep 11th, '17, 19:15

Can you check in windows if "Fast startup" is switched off!
I had the same problem after installing Mageia 6. I do not know however whether it was the installation of Mageia-6 or a previous update of Windows-10 that switched the "Fast startup" back on.
suc6
hovel
 
Posts: 4
Joined: Sep 11th, '17, 19:10

Re: Mageia 6 UEFI Doesn't Boot

Postby johnms » Sep 11th, '17, 21:12

gohlip wrote:Why > /home/live/grubInstall.txt 2>&1 ?
Do the command, not output it to standout.

I used that to capture the output. I did run the command, and it did appear to work, thank-you very much. The second issue with GRUB not appearing I tracked down to being an issue with my motherboard. In the BIOS settings there is a section named "Settings\Boot\UEFI hard Disk Drive BBS Priorities". From there is a listing of "Boot Option #". With the first entry being "Windows" and the second one being "mageia". I changed the order so that "mageia" was the first entry. And now GRUB appears and begins booting.
johnms
 
Posts: 10
Joined: Dec 19th, '14, 12:55

Re: SOLVED: Mageia 6 UEFI Doesn't Boot

Postby gohlip » Sep 12th, '17, 16:15

Good to hear.
Cheers.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest