Bug 15689 - M5RC, life installer does not always present /boot/EFI as an option in UEFI mode when using "custom disk partitioning"
Summary: M5RC, life installer does not always present /boot/EFI as an option in UEFI m...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-04-13 00:05 CEST by Ben McMonagle
Modified: 2015-05-25 17:26 CEST (History)
8 users (show)

See Also:
Source RPM: drakxtools
CVE:
Status comment:


Attachments
as requested fdisk -l (2.17 KB, text/plain)
2015-04-13 11:44 CEST, Ben McMonagle
Details
output of [root@localhost live]# journalctl -a > /home/live/bensjournal.txt (283.01 KB, text/plain)
2015-04-30 08:32 CEST, Ben McMonagle
Details
proposed fix (737 bytes, text/plain)
2015-05-20 07:51 CEST, Martin Whitaker
Details

Description Ben McMonagle 2015-04-13 00:05:05 CEST
Description of problem:
disk set up is existing GPT disk with pre-existing partitions, including a 300MB FAT32.
when in UEFI mode, from the live system, installer correctly presented all partition labels as expected when using "custom disk partitioning".
from the same disk, in UEFI install, the option " /boot/EFI" was not presented.
manually label /boot/EFI partition and install proceeds as normal 

Version-Release number of selected component (if applicable):
Mageia-5-RC-KDE4-LiveDVD-x86_64 

How reproducible: I restarted the installation several times to be sure of the issue.


Steps to Reproduce: 
1.start dvd in UEFI mode
2.choose option 2 " uefi install mageia  "
3.choose " custom disk partitioning " 
4.check drop-down menu for available partition labels.


Reproducible: 

Steps to Reproduce:
Comment 1 Barry Jackson 2015-04-13 00:47:21 CEST
Was your existing FAT32 partition an "EFI System partition"?
To check run:
gdisk /dev/sda   (or whatever _device_ you are using)
i
1 (partition number of proposed ESP)

Example:
gdisk /dev/sdf
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): i
Partition number (1-8): 1
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System)
Partition unique GUID: 58C33984-8D3E-4C0D-95F2-EAA0BEF69935
First sector: 2048 (at 1024.0 KiB)
Last sector: 614399 (at 300.0 MiB)
Partition size: 612352 sectors (299.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'EFI System'

The installer will not recognize it as an ESP unless it has the GUID code for 'EFI System' as above.

CC: (none) => zen25000

Comment 2 Ben McMonagle 2015-04-13 01:29:52 CEST
will check tonight and advise.
however, system had just previously successfully installed from live in UEFI mode,
so I will use the " assumed to be correct " phrase.
claire robinson 2015-04-13 09:24:02 CEST

Priority: Normal => release_blocker
CC: (none) => eeeemail, lewyssmith, thierry.vignaud, tmb

Comment 3 Thierry Vignaud 2015-04-13 09:28:59 CEST
And as usual, please attach your /root/drakx/report.bug.xz
Thierry Vignaud 2015-04-13 09:29:06 CEST

Keywords: (none) => NEEDINFO

Comment 4 Thierry Vignaud 2015-04-13 09:32:38 CEST
(In reply to Barry Jackson from comment #1)
> To check run:
> gdisk /dev/sda   (or whatever _device_ you are using)

Just attach the output of "fdisk -l" instead of running gdisk (simpler and fdisk is always installed).
And your /root/drakx/report.bug.xz of course.
Comment 5 Ben McMonagle 2015-04-13 09:53:36 CEST
info as requested

 gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): i
Partition number (1-8): 8
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System)
Partition unique GUID: A43E1D9D-E265-4D36-8A39-8DDDFF99A6E4
First sector: 311818240 (at 148.7 GiB)
Last sector: 312578047 (at 149.0 GiB)
Partition size: 759808 sectors (371.0 MiB)
Attribute flags: 0000000000000000
Partition name: ''
Comment 6 Ben McMonagle 2015-04-13 10:02:52 CEST
(In reply to Thierry Vignaud from comment #4)

> And your /root/drakx/report.bug.xz of course.

unfortunately I have since tested a non-uefi install.
will re-burn iso to disk and then attach /root/drakx/report.bug.xz
Comment 7 Ben McMonagle 2015-04-13 11:44:31 CEST
Created attachment 6254 [details]
as requested fdisk -l

I have reinstalled Mageia-5-RC-LiveDVD-KDE4-x86_64-DVD, again, /boot/EFI not presented in custom disk partitioning drop-down list
Comment 8 Ben McMonagle 2015-04-13 11:56:18 CEST
how do I create /report.bug.vx from the install?(In reply to Thierry Vignaud from comment #3)
> And as usual, please attach your /root/drakx/report.bug.xz

how do I create /report.bug.vx from the install?
sorry for asking.
Barry Jackson 2015-04-13 12:01:25 CEST

Attachment 6254 mime type: application/octet-stream => text/plain

Comment 9 Barry Jackson 2015-04-13 12:36:50 CEST
It's already there, /root/drakx/report.bug.xz

The way I do it is:

su
cp /root/drakx/report.bug.xz /home/$USER/report.bug.xz
chown $USER:$USER /home/$USER/report.bug.xz
exit

Then attach it here from your home folder.
Comment 10 claire robinson 2015-04-13 15:08:13 CEST
The Live's don't create one Ben, unless something changed recently, attach the journal instead.

# journalctl -a > /home/ben/bensjournal.txt
# chown ben:ben /home/ben/bensjournal.txt
Comment 11 claire robinson 2015-04-13 15:18:16 CEST
You may have to do that from the live system which shows the error, not sure whether the live journal is transferred to the installed system.
Rémi Verschelde 2015-04-13 16:56:08 CEST

CC: (none) => rverschelde

Thierry Vignaud 2015-04-15 22:25:00 CEST

Summary: M5RC, when in UEFI mode, installer does not always present /boot/EFI as an option when using " custom disk partitioning " => M5RC, life installer does not always present /boot/EFI as an option in UEFI mode when using "custom disk partitioning"

Comment 12 Anne Nicolas 2015-04-28 21:48:28 CEST
any news on that bug ?

CC: (none) => ennael1

Comment 13 Ben McMonagle 2015-04-29 11:39:14 CEST
(In reply to Barry Jackson from comment #9)
> It's already there, /root/drakx/report.bug.xz
> 
in the installed and rebooted system this file does not exist.


(In reply to claire robinson from comment #11)
> You may have to do that from the live system which shows the error, not sure
> whether the live journal is transferred to the installed system.

in the installed and rebooted system this journal is unable to be found

[root@localhost ben]# journalctl -a /home/ben/benjournal.txt
Couldn't stat file: No such file or directory
Failed to add filters: No such file or directory
[root@localhost ben]# journalctl -a /home/ben/bensjournal.txt
Couldn't stat file: No such file or directory

I will attempt to find both in from the Live
Comment 14 Thierry Vignaud 2015-04-29 12:26:30 CEST
(In reply to ben mcmonagle from comment #13)
> > It's already there, /root/drakx/report.bug.xz
> > 
> in the installed and rebooted system this file does not exist.

You must be root in order to access it...
 
> in the installed and rebooted system this journal is unable to be found
> 
> [root@localhost ben]# journalctl -a /home/ben/benjournal.txt
> Couldn't stat file: No such file or directory
> Failed to add filters: No such file or directory
> [root@localhost ben]# journalctl -a /home/ben/bensjournal.txt
> Couldn't stat file: No such file or directory

Please copy the commands given to you instead of retyping them with typos...
Comment 15 claire robinson 2015-04-29 12:53:09 CEST
The '>' is important Ben, it redirects the output of the journalctl command into the file mentioned. On a live system, the live user is called 'live' (so /home/live/filename.txt) and root has no password, once installed it is whatever you have set it to.
Comment 16 Lewis Smith 2015-04-29 19:46:54 CEST
(In reply to Anne Nicolas from comment #12)
> any news on that bug ?
It is a minor but persistant fault in the Live ISOs on EFI hardware, custom disc partitioning. When selecting the ESP -> Moint Point, the drop-down list of suggested mount points includes /boot, but *not* /boot/EFI - which *is* offered on the Classic ISO.
One can (must) easily specify the /boot/EFI manually.
Comment 17 Ben McMonagle 2015-04-30 08:32:15 CEST
Created attachment 6401 [details]
output of [root@localhost live]# journalctl -a > /home/live/bensjournal.txt

(In reply to claire robinson from comment #10)
> The Live's don't create one 

this is output from comment #9:

[live@localhost ~]$ su
[root@localhost live]# cp /root/drakx/report.bug.xz /home/live/report.bug.xz
cp: cannot stat â/root/drakx/report.bug.xzâ: No such file or directory
[root@localhost live]# cp /root/drakx/report.bug.xz /home/$USER/report.bug.xz
cp: cannot stat â/root/drakx/report.bug.xzâ: No such file or directory
[root@localhost live]# 

so you are correct Claire.

[root@localhost live]# journalctl -a > /home/live/bensjournal.txt- success
[root@localhost live]# chown live:live /home/live/bensjournal.txt.

I manually created entry /boot/EFI
claire robinson 2015-04-30 09:27:53 CEST

Keywords: NEEDINFO => (none)

Comment 18 Anne Nicolas 2015-05-11 22:54:21 CEST
tmb: "a missing line from drop-down list, but can be entered manually... so worst case an errata thing... If I have time I'll poke the drakx code"
Comment 19 Rémi Verschelde 2015-05-19 16:46:05 CEST
Martin, would you have a look? According to tmb, the logic seems to be in place to add this entry, but it's not working as expected. (I'll see if I can locate the lines that need looked at).

CC: (none) => mageia

Comment 20 Rémi Verschelde 2015-05-19 16:58:25 CEST
I found a reference to /boot/EFI here:
http://gitweb.mageia.org/software/drakx/tree/perl-install/fsedit.pm#n44

It looks like diskdrake also uses this procedure to some extent, so I wonder if the issue might not be:

    # only suggests /boot/EFI if there's not already one:
    return if !is_uefi() || grep { isESP($_) } @$fstab;

If the current disks already have an ESP, the creation of /boot/EFI won't be suggested to the automatic partitioning options, which is good, but maybe it also makes that the /boot/EFI mountpoint won't be proposed in the custom partitioner?
Comment 21 Martin Whitaker 2015-05-19 20:12:44 CEST
(In reply to Rémi Verschelde from comment #19)
> Martin, would you have a look? According to tmb, the logic seems to be in
> place to add this entry, but it's not working as expected. (I'll see if I
> can locate the lines that need looked at).

I'll take a look.
Comment 22 Martin Whitaker 2015-05-19 23:37:40 CEST
(In reply to Rémi Verschelde from comment #20)
> If the current disks already have an ESP, the creation of /boot/EFI won't be
> suggested to the automatic partitioning options, which is good, but maybe it
> also makes that the /boot/EFI mountpoint won't be proposed in the custom
> partitioner?

Yes, that's exactly what's happening, and as you suggest, I think it's required to make sure the automatic partitioning options don't create another ESP.

I suggest the best thing to do here is to automatically set the mount point for an existing ESP when the custom partitioning option is selected. But is there any good reason why the default mount points for Windows partitions shouldn't also be set (as is done by the classic installer)?
Comment 23 Martin Whitaker 2015-05-20 07:51:08 CEST
Created attachment 6588 [details]
proposed fix

If the answer to my last question is no, the attached patch fixes the problem for me.

Note that I have made it only apply to the live installer. If the classic installer is run in local install or testing mode, it will still not propose these mount points. I assume this was intentional.
Comment 24 Lewis Smith 2015-05-20 08:55:28 CEST
First, thanks for the fix which answers the bug title.

Re Comment 22
> I suggest the best thing to do here is to automatically set the mount point
> for an existing ESP when the custom partitioning option is selected.
Agree entirely. We used to have to nominate Swap partitions which nowadays get done automatically; why not the same for an existing ESP?

As for Windows partitions, if mount points are proposed for them these need to be completely generic - without guessed drive letters. EFI boxes with Win8.1 have several related partitions whose usage is obscure.
Comment 25 Rémi Verschelde 2015-05-20 09:34:37 CEST
Thierry, can you review Martin's patch and push it if it's good?

Keywords: (none) => PATCH
Assignee: bugsquad => thierry.vignaud
Source RPM: Mageia-5-RC-KDE4-LiveDVD-x86_64 => drakxtools

Comment 26 Martin Whitaker 2015-05-20 09:41:36 CEST
I'll note (before Thierry does ;-) ) that the method of detecting we're running in the Live installer is a bit ugly - but I wanted to change as little as possible this close to release.
Comment 27 Thierry Vignaud 2015-05-25 11:37:37 CEST
Applied to my git tree.
We'll need to look at classic/live differences after mga5 is out (git blame will be needed)
Comment 28 Mageia Robot 2015-05-25 17:09:04 CEST
commit 4525579cc2f70223c3b6ffe2c977621e081f4e08
Author: Martin Whitaker <mageia@...>
Date:   Mon May 25 05:35:19 2015 -0400

    fix not always suggesting /boot/ESP mount point
    
    thus fixing mga#15689 for live installs
    
    The check for whether an ESP needs to be created or not seems to prevent
    us to suggest a mount point for the existing one in some cases
    
    to be reviewed for mga6...
    
    diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
    index f3b9973..b222c07 100644
    --- a/perl-install/fs/partitioning_wizard.pm
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=4525579cc2f70223c3b6ffe2c977621e081f4e08
Comment 29 Thierry Vignaud 2015-05-25 17:26:57 CEST
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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