Bug 14759 - failed boot after swap partition change in multi-boot system, wrong UUID assigned in dev/disk
Summary: failed boot after swap partition change in multi-boot system, wrong UUID assi...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard: MGA4TOO
Keywords:
: 14861 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-09 15:52 CET by Zayd Depaor
Modified: 2015-06-06 01:49 CEST (History)
5 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Zayd Depaor 2014-12-09 15:52:18 CET
Description of problem: Mageia 4.1 fails to boot when swap UUID is changed. Another Linux Distribution may reformt the swap UUID. Usually in another Linux Distribution this is solved by running $ blkid, to obtain the corrected UUID for the swap partition, then changing the UUID in etc/fstab, then updating the grub bootloader from the distro that controls grub bootloader/grub menu. However, on Mageia 4...the boot still fails with the former swap UUID being called (even after changes made in fstab). I do have two HDDs with a swap partition on each. Mageia etc/fstab lists both of these partitions. The UUIDs in fstab are correct due to my correcting the one altered by another distro. (I expect that having two HDDs and two swap partitions is not relevant to the problem).


Version-Release number of selected component (if applicable):4.1


How reproducible: I have seen other people with this problem online, but complicated soltutions and lengthy discussions for what would be a normal and regular occurrence with multi-boot systems.


Steps to Reproduce:
1. Install Mageia 4.1 with a root partition & swap partition 
2. Install another Linux distribution allocating the same swap partition as Mageia installation has used.
3. run $ blkid from terminal of any distro to find the correct UUID for swap partition, then alter /etc/fstab with correct UUID, $ sudo update-grub from the distro that controls grub
4. reboot Mageia 4.1 from grub2 menu...


Reproducible: 

Steps to Reproduce:
Zayd Depaor 2014-12-09 15:55:42 CET

CC: (none) => zayd_depaor

Comment 1 Barry Jackson 2014-12-09 22:41:58 CET
There are two solutions:
1. Re-build initrd by running dracut -f in the affected installation. (You may need to chroot into it if you can't boot it)

2. Change the UUID of your swap partition back to what it should be. (The distribution that changed it is to blame not Mageia) Mageia does not change existing swap UUIDs on install.

You can change the swap UUID with:
mkswap -U $swapuuid /dev/sdXY

CC: (none) => zen25000

Comment 2 Zayd Depaor 2014-12-11 01:32:07 CET
(In reply to Barry Jackson from comment #1)
> There are two solutions:
> 1. Re-build initrd by running dracut -f in the affected installation. (You
> may need to chroot into it if you can't boot it)
> 
> 2. Change the UUID of your swap partition back to what it should be. (The
> distribution that changed it is to blame not Mageia) Mageia does not change
> existing swap UUIDs on install.
> 
> You can change the swap UUID with:
> mkswap -U $swapuuid /dev/sdXY

Yes thanks Barry, I did this mkswap -U method of changing the UUID back to the previous and now is booting fine again after sorting fstab and running grub, I firt had to learn that tune2fs command only works on ext files though! ...but I think Mageia developers need to sort this out so people don't have jump through these hoops.

It is resolved for me, but I say the bug still remains until you don't have to go through this process.
Comment 3 Barry Jackson 2014-12-11 13:11:47 CET
(In reply to Zayd Depaor from comment #2)

> It is resolved for me, but I say the bug still remains until you don't have
> to go through this process.

Good - glad it's working again.

The other distro is mainly to blame as it should not change the UUID of an existing swap, however it's not ideal as you say for this to break the boot of Mageia.

Re-assigning to Colin (at his suggestion ;)

Assignee: bugsquad => mageia

Barry Jackson 2014-12-11 13:13:21 CET

Whiteboard: (none) => MGA5TOO
Severity: major => normal

Comment 4 Pierre Jarillon 2015-01-09 02:16:00 CET
I have a similar problem.
On sdb mag4 is installed with its / , swap, home and a 2nd swap on sda5.

I replace sda with a new disk and mga5 alpha.
I remove the 2nd swap in /mga4/etc/fstab

I could boot on mga5 or mga4 with grub installed on sda by mga5, everything was fine until I discover that grub2 had replaced grub. Then it was impossible to boot on mga4. The system is claiming for a swap UUID=6240e-....
I have searched in /etc/* and /boot/* and mga4/etc/* and mga4/boot/*... The only file where I have found UUID=6240e-... is /mga4/etc/fstab.old

Is there another file where this uuid is hidden? 

The 3 last lines of the log file are:

[    4.050994] hid-generic 0003:045E:0040.0001: input,hidraw0: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:1d.2-1/input0
[   33.725488] dracut Warning: Could not boot.
[   33.739785] dracut Warning: /dev/disk/by-uuid/6240e08f-87f0-4cd2-8eb2-3d0f83461545 does not exist
+ '[' -f /run/initramfs/init.log ']'
With the option rd.debug, I can see dracut looping to search this non existing swap file.

I have removed all the swap files from /mga4/etc/fstab: Same result.

CC: (none) => jarillon

Comment 5 Pierre Jarillon 2015-01-09 02:35:19 CET
I have already reported this in
https://bugs.mageia.org/show_bug.cgi?id=14035#c2
Comment 6 Pierre Jarillon 2015-01-11 02:17:29 CET
I have reported how it is installed in
https://bugs.mageia.org/show_bug.cgi?id=14759#c4

I have found 2 symbolic links broken in /mga4/boot

lrwxrwxrwx 1 root root      29 févr. 10  2014 config -> config-3.10.28-desktop-1.mga3
lrwxrwxrwx 1 root root      33 févr. 10  2014 System.map -> System.map-3.10.28-desktop-1.mga3

This mga4 is an update of mga3 and these 2 links have not been updated!

I have vmlinuz, config, System-map... with these releases:
config-3.12.13-desktop-2.mga4
config-3.12.18-desktop-1.mga4
config-3.12.20-desktop-1.mga4
config-3.12.21-desktop-2.mga4
config-3.12.25-desktop-3.mga4
config-3.14.18-desktop-3.mga4
config-3.14.23-desktop-1.mga4

I have recreated the 2 links with -3.14.23 releases:
Always the same problem...
Nothing seems wrong in /boot/grub2/grub.cfg
Samuel Verschelde 2015-05-02 19:42:35 CEST

Version: 4 => Cauldron
Whiteboard: MGA5TOO => MGA4TOO

Rémi Verschelde 2015-05-02 20:01:17 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=12305

Comment 7 Manuel Hiebel 2015-05-14 16:09:32 CEST
*** Bug 14861 has been marked as a duplicate of this bug. ***

CC: (none) => fri

Comment 8 claire robinson 2015-05-14 16:13:16 CEST
possibly dup of bug 12305

CC: (none) => eeeemail

Comment 9 Samuel Verschelde 2015-06-06 01:49:36 CEST
I think it's fixed now (see bug 12305). Please reopen if it's not.

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


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