Bug 15498 - Drakboot --boot fails on uefi disk
Summary: Drakboot --boot fails on uefi disk
Status: RESOLVED WONTFIX
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-15 17:08 CET by w unruh
Modified: 2015-04-02 10:58 CEST (History)
4 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
journalctl -f of running "drakboot --boot" from MCC (317.74 KB, text/plain)
2015-03-15 20:12 CET, Marja Van Waes
Details

Description w unruh 2015-03-15 17:08:05 CET
Description of problem:


I have a UEFI machine (Dell xps13) which came with Windows which I want to keep. 
I installed Mageia. which installed a menu item for Windows (but had problems booting into Windows because the EFI partition had a subdirectory of EFI before the Windows stuff-- but that is another issue.) 

I then also installed Fedora on the same machine, which of course made itself the primary boot, but had options for booting Mageia and Windows as well, all of which worked. But I hate the Fedora menu.

I then ran drakboot from MCC under Mageia to try to put Mageia's boot screen back on top and to include fedora in Mageia's menu. drakboot sat there waiting for about 10 min, and then came back that it had timed out. 
Ie, it was unable to handle something about the boot structure. 

I find both grub2 and efi booting very confusing. I also need to change stuff in 
the kernel boot lines, but of course /boot/grub2/grub.cfg on Mageia, and /boot/efi/fedora/grub.cfg are created, and should not be changed by hand. but again this is another issue, except it may be indicative of the confusion of a naive user. But again this is a side issue. The main concern is that drakboot failed, with no clue as to why it failed. 

  

Reproducible: 

Steps to Reproduce:
Comment 1 w unruh 2015-03-15 17:44:11 CET
I just tried it again and remembered that the first error message when opening the MCC boot manager icon was that it said "No bootloader found creating a new configuration. It was that which then timed out. It seems that this is not able to use a grub2 bootloader?
I tried to open the log, but just got "while opening var/log/explanations log file: no such file or directory." which is not very helpful (to me at least)
Comment 2 Marja Van Waes 2015-03-15 20:12:32 CET
Created attachment 6069 [details]
journalctl -f of running "drakboot --boot" from MCC

(In reply to w unruh from comment #1)
> I just tried it again and remembered that the first error message when
> opening the MCC boot manager icon was that it said "No bootloader found
> creating a new configuration. It was that which then timed out. It seems
> that this is not able to use a grub2 bootloader?
> I tried to open the log, but just got "while opening var/log/explanations
> log file: no such file or directory." which is not very helpful (to me at
> least)

To be honest, I've been struggling with this myself, too.

I do also get that "No bootloader found creating a new configuration" message in "Set up boot system", even now, when there is an existing and working configuration.

If I then continue to install grub2, but check afterwards (as root) with 
efibootmgr
to see whether Mageia is in the BootOrder list, then I'll see that it isn't.

If Mageia is listed in the efibootmgr output (which is the case now, maybe because I started from a working configuration), then I need to add Mageia to the boot order by first deleting the order with
efibootmgr -O
and then adding the numbers of the desired entries, e.g.:
efibootmgr -o 0012,000B,0008,0011

If Mageia is not even listed (that happened here twice or thrice after I had used a different EFI partition to boot from, on sdb), then I need to first run
efibootmgr -c -d /dev/sda -p 2 -w -L mageia -l \EFI\mageia\grubx64.efi
first (note that my EFI partition is sda2, therefore it is "-p 2", the "p" stands for "partition"
before running the other efibootmgr commands above.

CC: (none) => marja11

Comment 3 Marja Van Waes 2015-03-15 20:20:58 CET
@ unruh

btw, there is nothing in var/log/messages nowadays.
I got my log by starting (as root) 
journalctl -f 2>&1 | tee journalctl-f 
when I started "Set up boot system" and letting it run until I finished.

@ barjac

I know there was a better way than using drakboot --boot to (re)generate an efi bootloader, but forgot how to do it.

What was it?

CC: (none) => thierry.vignaud, tmb, zen25000
Summary: Drakboot fails on uefi disk => Drakboot --boot fails on uefi disk

Comment 4 Barry Jackson 2015-03-15 20:58:46 CET
(In reply to Marja van Waes from comment #3)

> @ barjac
> 
> I know there was a better way than using drakboot --boot to (re)generate an
> efi bootloader, but forgot how to do it.
> 
> What was it?

I guess you mean:
grub2-install /dev/sdX

New bootloader will be installed to sdX (usually sda in UEFI) and will boot into current system.
Comment 5 Marja Van Waes 2015-03-15 21:15:19 CET
(In reply to Barry Jackson from comment #4)
> (In reply to Marja van Waes from comment #3)
> 
> > @ barjac
> > 
> > I know there was a better way than using drakboot --boot to (re)generate an
> > efi bootloader, but forgot how to do it.
> > 
> > What was it?
> 
> I guess you mean:
> grub2-install /dev/sdX
> 
> New bootloader will be installed to sdX (usually sda in UEFI) and will boot
> into current system.

Yeah, you're right, thx!

However:

[xxx]# grub2-install /dev/sda
Installing for x86_64-efi platform.
efibootmgr: Could not add entry to BootOrder: File exists
Installation finished. No error reported.
[xxx]#

And again Mageia disappeared from the BootOrder :-(

That reminds me of bug 14779 (which didn't occur on the last grub2-efi update, so seemed fixed) 

And, of course, of bug 14140

@ unruh

Sorry, now I see that I've misread your description. It is very well possible that you hit another bug.

Can you please start "journalctl -f 2>&1 | tee journalctl-f.txt" as root, then do exactly the same as before until you get the message about the time out, then stop journalctl with ctrl+C and attach journalctl-f.txt to this report?
Comment 6 Barry Jackson 2015-03-15 21:20:42 CET
@marja
I hit this in a VM but thought on reflection it was not a problem.
What happens if you:
efibootmgr -O
grub2-install /dev/sda
Comment 7 w unruh 2015-03-15 21:39:51 CET
Note you can install rsyslog ( the replacement for syslog) and again get things like /var/log/messages in /var/log

I tried to redo it using your suggestions about capturing the logs with journalctl, and this time there was no problem. It brought up the following pages without any trouble. So, if it is a bug it is a sporadic one.
Comment 8 Marja Van Waes 2015-03-15 21:51:44 CET
(In reply to Barry Jackson from comment #6)
> @marja
> I hit this in a VM but thought on reflection it was not a problem.
> What happens if you:
> efibootmgr -O
> grub2-install /dev/sda

That's better: then Mageia is in the BootOrder list
However, everything else is then missing from the BootOrder, which might not exactly be what we want :-/
Comment 9 Marja Van Waes 2015-03-16 00:01:47 CET
(In reply to w unruh from comment #7)
> Note you can install rsyslog ( the replacement for syslog) and again get
> things like /var/log/messages in /var/log

True :-)
> 
> I tried to redo it using your suggestions about capturing the logs with
> journalctl, and this time there was no problem. It brought up the following
> pages without any trouble. So, if it is a bug it is a sporadic one.


The other issue will be dealt with elsewhere (bug 15442 or bug 14140)

Please change the status of this bug back from UNCONFIRMED to NEW and add the requested log if you reproduce the issue.

Status: NEW => UNCONFIRMED
Ever confirmed: 1 => 0

Comment 10 Barry Jackson 2015-04-02 10:58:56 CEST
(In reply to Barry Jackson from comment #4)
> (In reply to Marja van Waes from comment #3)
> 
> > @ barjac
> > 
> > I know there was a better way than using drakboot --boot to (re)generate an
> > efi bootloader, but forgot how to do it.
> > 
> > What was it?
> 
> I guess you mean:
> grub2-install /dev/sdX
> 
> New bootloader will be installed to sdX (usually sda in UEFI) and will boot
> into current system.

Correction to above: In UEFI the argument is not required or used.
Just grub2-install does the job.

Status: UNCONFIRMED => RESOLVED
Resolution: (none) => WONTFIX


Note You need to log in before you can comment on or make changes to this bug.