Bug 16046

Summary: Reboot fails despite a fine installation (b/c of duplicated UUIDs) [Classical DVD on UEFI system]
Product: Mageia Reporter: André DESMOTTES <lebarhon>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: mageia, marja11, thierry.vignaud, tmb
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: MGA5TOO
Source RPM: dracut? kernel? CVE:
Status comment:
Attachments: report.bug.xz
report quoted in previous comment

Description André DESMOTTES 2015-05-27 21:39:38 CEST
Description of problem:
Classical DVD x86-64 LXDE on an UEFI system. 
The installation is fine, no issues, but at the first reboot, just before the connection screen: Welcome to the emergency mode! ...

Report.bug.xz is here (too heavy):
http://filebin.net/qi97bycx8b.



Reproducible: 

Steps to Reproduce:
Comment 1 André DESMOTTES 2015-05-27 21:41:53 CEST
The final dot is too much
http://filebin.net/qi97bycx8b
Comment 2 Thierry Vignaud 2015-05-27 22:33:44 CEST
A cople remarks:
1) You don't have to put a .xz file in a .zip one.
  it's already compressed, you won't gain anything
2) a 155kb file is not too big for our bugzilla

That's said, this test was done with an old ISO (Drakx v16.91 whereas we're currently at 16.101).
Please test a pre release ISO instead.

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud
Source RPM: (none) => drakx-installer-stage2-16.91

Comment 3 André DESMOTTES 2015-05-27 23:23:31 CEST
Created attachment 6654 [details]
report.bug.xz

Sorry I mixed up several files.
Here is the right one. I redid the installation to be sure and rebooted several times. That showed me that the emergency mode didn't showed up each time, it may happen that the boot is correct.
Comment 4 Thierry Vignaud 2015-05-28 06:29:07 CEST
So closing as OLD?

Severity: critical => normal

Comment 5 André DESMOTTES 2015-05-28 09:19:01 CEST
I don't follow you, the last release (2015/05/27) starts half the time here.
Comment 6 Samuel Verschelde 2015-05-28 09:28:02 CEST
Thierry reacted to "it may happen that the boot is correct" which can have several meanings. He thought you said the bug is maybe fixed, but you meant sometimes boot is fine, but at other times you get emergency mode.
Samuel Verschelde 2015-05-28 09:28:13 CEST

Keywords: NEEDINFO => (none)

Comment 7 Thierry Vignaud 2015-05-28 10:20:22 CEST
You didn't reinstalled the system between the different reboot tries?

So if the same system, once installed, reboots OK only half the times, the issue is likely with dracut.
We needs you to attach a photo of the screen when you're asked about emergency mode?

Keywords: (none) => NEEDINFO
CC: (none) => mageia, tmb
Component: Installer => RPM Packages
Source RPM: drakx-installer-stage2-16.91 => dracut? kernel?

Comment 8 André DESMOTTES 2015-05-28 11:08:55 CEST
(In reply to Thierry Vignaud from comment #7)
> You didn't reinstalled the system between the different reboot tries?
> 
No

> So if the same system, once installed, reboots OK only half the times, the
> issue is likely with dracut.
> We needs you to attach a photo of the screen when you're asked about
> emergency mode?

As a problem with LiveDVD was solved disabling Windows fastboot, I though fastboot could be the problem also here. So after disabling fastboot I re-did the installation, it doesn't solve the problem, it always boots half the time but the behaviour is different, the error message is :
dracut warning: /sysroot has no proper rootfs layout, ignoring anr remmoving offending mount hook.
Dracut Warning: can't mountroot filesystem

Generating "/run/initramfs/rdsosreport.txt"
You might want to save "/run/initramfs/rdsosreport.txt" to a .....
...
Dropping to debug shell
dracut:#
Comment 9 André DESMOTTES 2015-05-28 11:10:07 CEST
Created attachment 6655 [details]
report quoted in previous comment

here is rdsosreport
Comment 10 Thierry Vignaud 2015-05-28 11:21:28 CEST
We really need the photo of the whole messages!
Comment 11 Thierry Vignaud 2015-05-28 11:34:08 CEST
Sorry, your attachment looks complete.
@André: can you attach your /root/drakx/report.bug.xz file?

@Colin, any idea?
The UUID is the /dev/sda5 (an ext4fs partition -- probably GPT)
The symlink /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8 -> ../../sda5
looks good.
Fsck succeeded but mount failed????


EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
dracut: Checking ext4: /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8
dracut: issuing e2fsck -a  /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8
 sdb: sdb1
sd 5:0:0:0: [sdb] Attached SCSI removable disk
dracut: /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8: clean, 15/624624 files, 77461/2493952 blocks
dracut: Mounting /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8 with -o ro
EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
dracut Warning: /sysroot has no proper rootfs layout, ignoring and removing offending mount hook
dracut Warning: Can't mount root filesystem
Comment 12 Thierry Vignaud 2015-05-28 11:37:36 CEST
argh report.bug.xz is already attached (too much wake-up-due-to-baby last night...)

Keywords: NEEDINFO => (none)

Comment 13 Colin Guthrie 2015-05-28 11:52:28 CEST
(In reply to Thierry Vignaud from comment #11)
> Sorry, your attachment looks complete.
> @André: can you attach your /root/drakx/report.bug.xz file?
> 
> @Colin, any idea?
> The UUID is the /dev/sda5 (an ext4fs partition -- probably GPT)
> The symlink /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8 ->
> ../../sda5
> looks good.
> Fsck succeeded but mount failed????

> dracut: Mounting /dev/disk/by-uuid/b3f4c56f-4738-47e8-86f8-83d27ce9b2e8 with
> -o ro
> EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
> dracut Warning: /sysroot has no proper rootfs layout, ignoring and removing
> offending mount hook
> dracut Warning: Can't mount root filesystem

There are duplicate UUIDs on the system:

/dev/sda5: UUID="b3f4c56f-4738-47e8-86f8-83d27ce9b2e8" TYPE="ext4" PARTUUID="0b1a36c6-f47a-45cc-88c9-df0e7887cd62"
/dev/sda7: UUID="b3f4c56f-4738-47e8-86f8-83d27ce9b2e8" TYPE="ext4" PARTUUID="d1eda0ac-acf1-41e5-a0c4-b8fbbdb06529"

Looks like udev got the wrong one and changed link to sda7 or something and it doesn't look like a root FS.

If we know sda5 is the right one, try booting with root=/dev/sda5, then fixing the UUID on /dev/sda7 to be different. Alternatively if sda7 is the right one, then try root=/dev/sda7 and fix the sda5 UUID.

(likely caused by dd'ing sda5 to sda7 as a backup or something).

Anyway, I'd fix the duplicated UUIDs first then see if there are remaining problems after that.
Comment 14 Colin Guthrie 2015-05-28 11:53:28 CEST
NB, you can also use root=PARTUUID=0b1a36c6-f47a-45cc-88c9-df0e7887cd62 or root=PARTUUID=d1eda0ac-acf1-41e5-a0c4-b8fbbdb06529 but the ones I gave in the previous message are likely easier to type in ;)
Comment 15 Thierry Vignaud 2015-05-28 12:35:30 CEST
OK then it's not a Mageia bug...

Summary: Classical DVD on UEFI system. Reboot fails despite a fine installation => Reboot fails despite a fine installation (b/c of duplicated UUIDs) [Classical DVD on UEFI system]

Comment 16 Rémi Verschelde 2015-05-28 12:41:21 CEST
Just to make it clear, are we sure the duplicate UUIDs are not a consequence of using Mageia's tools?
Comment 17 André DESMOTTES 2015-05-28 13:03:54 CEST
May be a consequence of having used Alt+Ctrl+home during a previous test?
I could format sda5 and sda7 and make new install on both partitions.
Comment 18 Colin Guthrie 2015-05-28 15:25:46 CEST
(In reply to André DESMOTTES from comment #17)
> May be a consequence of having used Alt+Ctrl+home during a previous test?
> I could format sda5 and sda7 and make new install on both partitions.

This shouldn't cause duplicate UUIDs.

The only way a duplicate UUID at a filesystem level can realistically occur is if it was mirrored at some point (e.g. "dd if=/dev/sda5 of=/dev/sda7" or even just "cat /dev/sda5 >/dev/sda7" or similar)

But once the UUIDs are duplicated, our tools will try their best to maintain the UUID across formats. e.g. if you format a partition in the installer, it will take note of the current UUID, format it, then restore the UUID after.

We should probably add some safeguards that refuse to preserve UUIDs in the event of duplicates. Thierry, does that seem sensible?
Comment 19 Thierry Vignaud 2015-05-28 16:02:35 CEST
Well, would that be the correct way.
Maybe it would be the other partition that should got a new UUID and we would just break the user setup.
There's no good solution here
Comment 20 Colin Guthrie 2015-05-28 17:06:12 CEST
(In reply to Thierry Vignaud from comment #19)
> Well, would that be the correct way.
> Maybe it would be the other partition that should got a new UUID and we
> would just break the user setup.

I would say if a user is actively formatting a partition, it should be the one we change when duplicates are detected. If they are not formatting a partition, we shouldn't fiddle with the UUID even if there are conflicts - or at least we should pop up a separate dialog warning of that situation - not take unilateral action!

> There's no good solution here

Indeed.
Samuel Verschelde 2015-06-06 16:56:59 CEST

Whiteboard: (none) => MGA5TOO

Comment 21 Marja Van Waes 2016-10-20 16:32:59 CEST
(In reply to Colin Guthrie from comment #20)
> (In reply to Thierry Vignaud from comment #19)
> > Well, would that be the correct way.
> > Maybe it would be the other partition that should got a new UUID and we
> > would just break the user setup.
> 
> I would say if a user is actively formatting a partition, it should be the
> one we change when duplicates are detected. If they are not formatting a
> partition, we shouldn't fiddle with the UUID even if there are conflicts -
> or at least we should pop up a separate dialog warning of that situation -
> not take unilateral action!

Assigning to mageiatools maintainers, for them to decide to go for Colin's suggestion, or not.

> 
> > There's no good solution here
> 
> Indeed.

CC: (none) => marja11
Assignee: bugsquad => mageiatools

Comment 22 André DESMOTTES 2019-02-19 14:49:42 CET
Solved

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