Bug 16029

Summary: The classical installer doesn't detect the ESP
Product: Mageia Reporter: André DESMOTTES <lebarhon>
Component: InstallerAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: release_blocker CC: mageia, thierry.vignaud
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:
Attachments: report.bug.xz compressed
set pt_type according to fs_type before flag cases

Description André DESMOTTES 2015-05-23 19:33:21 CEST
Description of problem:
Home made PC with UEFI. Pre-existing OSes are Windows and Mageia 5, both working fine.  
Boot on an USB key with Mageia 5 Classical x86_64 dumped with Isodumper, UEFI box not checked.
Installation correct until the partitioning step, I chose "Custom disk partitioning" and I can see the ESP is mounted on /mnt/win.
I did Alt+CTRL+Home and go on again in the Partitioning step, the ESP is this
 time correctly mounted on /boot/EFI.
I finished the installation but after the first reboot, there is no more Grub and no more Mageia, only Windows starting directly.
In the "BIOS set up", I still have two entries in the boot override, Windows that is working (Windows starts) and Mageia that is looping (come back into the BIOS).
 
/report.bug.xz is coming, I need to create a Live USB.
 



Reproducible: 

Steps to Reproduce:
Comment 1 André DESMOTTES 2015-05-23 19:45:24 CEST
The USB stick created with Mageia 5 LiveCD-KDE4-en-i586 and Isodumper (UEFI box not checked) isn't seen by the BIOS.
I re-created the USB stick with the UEFI box checked. The BIOS can see it, but it isn't bootable, looping like the Mageia entry.
So I can't give you the report.
Comment 2 Thierry Vignaud 2015-05-24 09:34:41 CEST
You can start the classical installer without actually performing the install.
Just got to tty2, mount your / partition and copy your /root/drakx/report.bug.xz on a USB key

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 3 André DESMOTTES 2015-05-24 10:41:26 CEST
Created attachment 6628 [details]
report.bug.xz compressed
Comment 4 Martin Whitaker 2015-05-24 12:05:23 CEST
The same bug is present in the live installer and in diskdrake on a fully updated Cauldron installation. It can be fixed by reverting drakx commit 1e4b61c23a... (display cosmetics when reading back GPT) - in particular the line

  $_->{pt_type} = 0x0b if $_->{fs_type} eq 'vfat';

CC: (none) => mageia

Comment 5 Thierry Vignaud 2015-05-24 12:08:50 CEST
I see no trace of /dev/sda2 being mounted on /mnt/win.

Also we don't use /mnt/win mount point in drakx... (eg your §dev/sda4 is mounted on /media/win_d)
I guess you saw /media/win_c instead of /mnt/win?
Comment 6 Thierry Vignaud 2015-05-24 12:10:10 CEST
(In reply to Martin Whitaker from comment #4)
> It can be fixed by reverting drakx commit
> 1e4b61c23a... (display cosmetics when reading back GPT) - in particular the
> line
> 
>   $_->{pt_type} = 0x0b if $_->{fs_type} eq 'vfat';

Ah that's interesting.
Can you test the attached patch?
Comment 7 Thierry Vignaud 2015-05-24 12:11:47 CEST
Created attachment 6631 [details]
set pt_type according to fs_type before flag cases
Comment 8 Martin Whitaker 2015-05-24 12:54:10 CEST
(In reply to Thierry Vignaud from comment #6)
> Ah that's interesting.
> Can you test the attached patch?

That fixes it in diskdrake and the live installer. It will take me a bit longer to test the classic installer (can't easily replace mdkinst.sqfs now we dd the iso rather than copy it to a FAT partition).
Comment 9 Thierry Vignaud 2015-05-24 13:37:19 CEST
You can put a patch.pl on a USB key & pass "patch" option when booting the CD

See
https://wiki.mageia.org/en/Drakx-installer_tips_and_tricks#Using_OEM_patch_in_the_tree_.26_drakx-in-chroot

eg sg like:

use partition::gpt;
package partition::gpt;

undef *read_one;
*read_one = sub {
  # INSERT HERE THE FULL BODY OF THE PATCHED read_one()
};

1;
Comment 10 Mageia Robot 2015-05-24 13:38:25 CEST
commit fd0c659539609be48af980e6201c262bfcd9aa57
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Sun May 24 12:11:27 2015 +0200

     set pt_type according to fs_type before flag cases (mga#16029)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=fd0c659539609be48af980e6201c262bfcd9aa57
Comment 11 André DESMOTTES 2015-05-24 18:46:49 CEST
(In reply to Thierry Vignaud from comment #5)
> I see no trace of /dev/sda2 being mounted on /mnt/win.
> 
> Also we don't use /mnt/win mount point in drakx... (eg your §dev/sda4 is
> mounted on /media/win_d)
> I guess you saw /media/win_c instead of /mnt/win?

Yes, you are right it is /media/win_c
Comment 12 Martin Whitaker 2015-05-24 21:09:36 CEST
For completeness I tested the patch in the classic installer and can confirm it fixes the bug there too.
Samuel Verschelde 2015-05-26 09:51:31 CEST

Keywords: NEEDINFO => PATCH
Priority: Normal => release_blocker
Assignee: bugsquad => thierry.vignaud

Comment 13 Thierry Vignaud 2015-05-26 10:31:29 CEST
Closed

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