Bug 28409

Summary: Mageia-8-i586.iso has label MGALIVE-ESP for second partition, with first partition hidden.
Product: Mageia Reporter: Dave Hodgins <davidwhodgins>
Component: InstallerAssignee: ISO building group <isobuild>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: release_blocker CC: mageia, westel
Version: 8   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Dave Hodgins 2021-02-23 06:58:30 CET
Device notifier shows the label MGALIVE-ESP for the i586 classical iso when
copied to a usb drive.

[dave@x3 Mageia-8-i586]$ time dd if=Mageia-8-i586.iso of=/dev/sde bs=1M
4194+1 records in
4194+1 records out
4398635008 bytes (4.4 GB, 4.1 GiB) copied, 211.007 s, 20.8 MB/s

real    3m31.012s
user    0m0.015s
sys     0m6.106s
[dave@x3 Mageia-8-i586]$ /sbin/blkid /dev/sde*
/dev/sde: UUID="2021-02-21-22-32-07-00" LABEL="Mageia-8-i586" TYPE="iso9660" PTTYPE="dos"
/dev/sde2: SEC_TYPE="msdos" LABEL_FATBOOT="MGALIVE-ESP" LABEL="MGALIVE-ESP" UUID="F66A-5ADC" TYPE="vfat"
[dave@x3 Mageia-8-i586]$ /sbin/sfdisk -luS /dev/sde
Disk /dev/sde: 114.6 GiB, 123060879360 bytes, 240353280 sectors
Disk model: Ultra USB 3.0   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sde1  *          1 8582291 8582291  4.1G 17 Hidden HPFS/NTFS
/dev/sde2       8582292 8590483    8192    4M ef EFI (FAT-12/16/32)

The label for partition 2 should not be MGALIVE-ESP (not sure what it should be), and the first partition should not be a hidden file system.
Dave Hodgins 2021-02-23 06:58:49 CET

Priority: Normal => release_blocker

Comment 1 Dave Hodgins 2021-02-23 07:12:26 CET
Contrast that with the x86_64 iso which shows correctly in the device notifier
[dave@x3 Mageia-8-x86_64]$ time dd if=Mageia-8-x86_64.iso of=/dev/sde bs=1M
4290+1 records in
4290+1 records out
4499220480 bytes (4.5 GB, 4.2 GiB) copied, 220.349 s, 20.4 MB/s

real    3m40.350s
user    0m0.020s
sys     0m6.032s
[dave@x3 Mageia-8-x86_64]$ /sbin/blkid /dev/sde*
/dev/sde: UUID="2021-02-21-22-37-23-00" LABEL="Mageia-8-x86_64" TYPE="iso9660" PTTYPE="dos"
/dev/sde1: UUID="2021-02-21-22-37-23-00" LABEL="Mageia-8-x86_64" TYPE="iso9660" PTTYPE="dos"
/dev/sde2: SEC_TYPE="msdos" LABEL_FATBOOT="MGALIVE-ESP" LABEL="MGALIVE-ESP" UUID="0A33-2981" TYPE="vfat"
[dave@x3 Mageia-8-x86_64]$ /sbin/sfdisk -luS /dev/sde
Disk /dev/sde: 114.6 GiB, 123060879360 bytes, 240353280 sectors
Disk model: Ultra USB 3.0   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sde1  *          0 8778747 8778748  4.2G  0 Empty
/dev/sde2       8778748 8786939    8192    4M ef EFI (FAT-12/16/32)

So it looks like it's only a problem because of the partition type on the
i586 classical iso image.
Comment 2 Dave Hodgins 2021-02-23 07:15:13 CET
I should add, an install test using the i586 iso worked ok on my legacy
bios system, it's just how it looks in the device notifier.

That iso will not boot on my x86_64 uefi system. Not sure if that's expected
or just due to the hidden partition type.
Comment 3 Ben McMonagle 2021-02-23 07:47:30 CET
some info:

[root@localhost ~]# /sbin/sfdisk -luS /dev/sdb
Disk /dev/sdb: 14.4 GiB, 15502147584 bytes, 30277632 sectors
Disk model: USB Flash Memory
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *          0 8778747 8778748  4.2G  0 Empty
/dev/sdb2       8778748 8786939    8192    4M ef EFI (FAT-12/16/32)


[root@localhost ~]# /sbin/sfdisk -luS /dev/sdc
Disk /dev/sdc: 14.4 GiB, 15502147584 bytes, 30277632 sectors
Disk model: USB Flash Memory
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdc1  *          1 8582291 8582291  4.1G 17 Hidden HPFS/NTFS
/dev/sdc2       8582292 8590483    8192    4M ef EFI (FAT-12/16/32)

sdc is i586, sdb is x86_64.

note the start sector.
I suspect that may be a contributing factor.
this is the reason for i586 CI not easily able to be used as local repo medium.


regarding the i586 not booting on your x86_64, likely as the hardware (CPU) is not supported by the kernel, so no boot.
the i586 Xfce Live is unlikely to UEFI boot on x86_64 hardware also, so I have found.

CC: (none) => westel

Comment 4 Ben McMonagle 2021-02-23 07:52:12 CET
and some more

[root@localhost ~]#  /sbin/blkid /dev/sdb*
/dev/sdb: UUID="2021-02-21-22-37-23-00" LABEL="Mageia-8-x86_64" TYPE="iso9660" PTTYPE="dos"
/dev/sdb1: UUID="2021-02-21-22-37-23-00" LABEL="Mageia-8-x86_64" TYPE="iso9660" PTTYPE="dos"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="MGALIVE-ESP" LABEL="MGALIVE-ESP" UUID="0A33-2981" TYPE="vfat"


[root@localhost ~]#  /sbin/blkid /dev/sdc*
/dev/sdc: UUID="2021-02-21-22-32-07-00" LABEL="Mageia-8-i586" TYPE="iso9660" PTTYPE="dos"
/dev/sdc2: SEC_TYPE="msdos" LABEL_FATBOOT="MGALIVE-ESP" LABEL="MGALIVE-ESP" UUID="F66A-5ADC" TYPE="vfat"
Comment 5 Ben McMonagle 2021-02-23 07:53:06 CET
meant to add:

isodump'd
Comment 6 Thomas Backlund 2021-02-23 08:03:18 CET
startsector 1 and hidden partition are both part of coping with broken bioses out there, so that wont change 

as for naming the ESP, well that is same on i586 and x86_64 as shown in comment 4

and I wonder if that was not already the case on Mga7 isos...

CC: (none) => mageia

Comment 7 Ben McMonagle 2021-02-23 08:13:35 CET
opos, not the kernel, efi firmware.

the x86_64 efi is likely not recognizing/unsupported? the i586 efi system as found on the i586 CI(and Live)

the other way seems to work ok tho'. 64efi on 32bit efi firmware - Martin does good work.
Comment 8 Dave Hodgins 2021-02-23 08:49:45 CET
Just checked. It is the same on the Mageia 7.1 i586 iso. Difference now is that
I have a uefi laptop to test with, whereas for Mageia 7.1 both of my test
systems were legacy bios desktops.

I remember the need for the start sector 1 as per bug 5036

I don't remember the file system needing to be hidden.

I'm going to experiment with altering the partition type using a hex editor,
and either modify this bug report or close it.
Comment 9 Dave Hodgins 2021-02-23 09:08:56 CET
Changed just the partition type as follows ...
[dave@x3 ~]$ /sbin/blkid /dev/sde*
/dev/sde: UUID="2021-02-21-22-32-07-00" LABEL="Mageia-8-i586" TYPE="iso9660" PTTYPE="dos"
/dev/sde2: SEC_TYPE="msdos" LABEL_FATBOOT="MGALIVE-ESP" LABEL="MGALIVE-ESP" UUID="F66A-5ADC" TYPE="vfat"
[dave@x3 ~]$ sfdisk -luS /dev/sde
bash: sfdisk: command not found
[dave@x3 ~]$ /sbin/sfdisk -luS /dev/sde
Disk /dev/sde: 114.6 GiB, 123060879360 bytes, 240353280 sectors
Disk model: Ultra USB 3.0   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sde1  *          1 8582291 8582291  4.1G  0 Empty
/dev/sde2       8582292 8590483    8192    4M ef EFI (FAT-12/16/32)

That also will not boot on my uefi laptop, so having the partition hidden is
not the cause of that failing.

As this has not changed since before Mageia 7, closing this bug as invalid.

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

Comment 10 Martin Whitaker 2021-02-23 10:11:38 CET
For the record, the 32-bit Linux kernel does not support booting from a 64-bit UEFI BIOS, which is why the 32-bit ISOs don't include a 64-bit EFI bootloader.

I thought I'd fixed the ESP label some while ago, but it seems that only got fixed in my head, not in git. Done now.

I don't know why the 0x17 partition type was chosen for the protective partition on 32-bit ISOs instead of 0x00 - that was inherited from the old Mandriva tools - but I hesitate to change it. Too much risk of encountering a problem with some old buggy BIOS.