Bug 14035 - An USB disk with Mageia5 beta1 cannot boot on other computer (b/c fstab refers the internal hd swap)
Summary: An USB disk with Mageia5 beta1 cannot boot on other computer (b/c fstab refer...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard: MGA5TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-02 15:38 CEST by christian fischer
Modified: 2022-08-13 18:58 CEST (History)
8 users (show)

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


Attachments

Description christian fischer 2014-09-02 15:38:15 CEST
Description of problem:

I instal Mageia5 alpha2 ( from DVD Live KDE) on an USB disk , with / , swap, and /home .
The computer is AMD based, and has already insyde Mageia 4 and 5 , with 1 swap. 
Mageia5 from usb disk work...

Problem:
Starting also the USB disk on other computer, Intel based:

grub2 said:

"
Could not boot
ln: failed to create symbolic link 'dev/resume':File exists
Dracut Warning: /dev/disk/byuuid/d4ff1ed9-c9c6-4793-8431-bb863aea374b does not exists
generating "/run/initram/rdsosreport.txt"
You might want to save "/run/initram/rdsosreport.txt" to a USB stick or /boot after mounting them
and attach it to a bug report

Dropping to a debug shell
dracut:/#

I cannot... : reset
initrd need the swap of the computer-AMD !

copy of fstab from USB-disk:
# Entry for /dev/sdd1 :
UUID=646a6843-d460-4e66-8a8b-00981dd62161 / ext4 defaults 1 1
# Entry for /dev/sdd6 :
UUID=6833632e-a739-4cdc-973e-a583963673dd /home ext4 defaults 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda7 :
UUID=d4ff1ed9-c9c6-4793-8431-bb863aea374b swap swap defaults 0 0
# Entry for /dev/sdd5 :
UUID=b02e3535-348b-4964-b3cd-7a1b879a4c20 swap swap defaults 0 0

The installer do not have to took the swap from the computer installer for an usb disk ?

My fixing : 
- boot Usb Disk on the original computer :
- erase the bad swap 
( # Entry for /dev/sda7 :
UUID=d4ff1ed9-c9c6-4793-8431-bb863aea374b swap swap defaults 0 0 )
- # dracut --force 
that make an initrd using new fstab.

Boot on the Intel Computer : Succes.

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


How reproducible:
make an usb disk from Mageia5 Live

Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Dick Gevers 2014-12-01 14:32:38 CET

Summary: An USB disk with Mageia5 beta2 cannot boot on other computer => An USB disk with Mageia5 beta1 cannot boot on other computer
Whiteboard: (none) => 5beta1

Comment 1 papoteur 2014-12-21 07:58:22 CET
I add another report from http://www.mageialinux-online.org/forum/topic-19428+installation-netinstall-dracut.php

Using a net-install from a USB key.
If the USB key stays after the stage 2 loading in memory, Mageia uses the SWAP partition from the USB key instead of the one from the HD. After the installation, if one boots without the key, an dracut error happens.
If the key is outed after the loading, and the reading of the partitioning is forced at the step of partitioning, then the problem doesn't occurs.

CC: (none) => yves.brungard_mageia

Comment 2 Pierre Jarillon 2015-01-02 10:02:36 CET
I have also a very similar problem with this bug report.

On sdb1, Mga4 is installed.
On sda1, I installed Mga5 alpha1 

The boot was managed by Grub (from sda) and worked fine, allowing to boot on Mga4 or Mga5 until an update switches from Grub to Grub2.
Then, it was not possible to boot on Mga4.
On both systems fstab is correct.

df output:
/dev/sda1           27G    7,3G   18G  30% /
/dev/sda6          886G    194G  693G  22% /home2
/dev/sdb1           22G    7,7G   14G  37% /mga4
/dev/sdb6          570G    437G  134G  77% /home1

blkid output:
/dev/sda1: UUID="61f2fa31-b08d-4eaa-9e10-14d08a51c2a8" UUID_SUB="3e326004-2a04-438a-9d04-86e9ed296d03" TYPE="btrfs"
/dev/sda5: UUID="2443439e-c9c8-4b4e-8ba6-32fa19765441" TYPE="swap"
/dev/sda6: UUID="bf8ce92e-1355-4319-88fd-440b15defc5d" TYPE="ext4"
/dev/sdb1: UUID="31668834-8288-43be-800c-f8fcce7a4570" TYPE="ext4"
/dev/sdb5: UUID="4e46296b-9d2c-44dd-bd7c-1a2f33ae1a5d" TYPE="swap"
/dev/sdb6: UUID="ca1bcff4-d30e-4b1d-91ca-fbc6a455621f" TYPE="reiserfs"

The missing uuid can only be found in 
/mga4/etc/fstab.old:UUID=6240e08f-87f0-4cd2-8eb2-3d0f83461545 swap swap defaults 0 0
This uuid is not in /boot/grub2/* files or in /mga4/boot/ !!!

What can I do?

CC: (none) => jarillon

Comment 3 Barry Jackson 2015-01-09 14:07:31 CET
(In reply to Pierre Jarillon from comment #2)
> I have also a very similar problem with this bug report.
> 
> On sdb1, Mga4 is installed.
> On sda1, I installed Mga5 alpha1 
> 
> The boot was managed by Grub (from sda) and worked fine, allowing to boot on
> Mga4 or Mga5 until an update switches from Grub to Grub2.

How, when and to which OS was grub2 installed?
It is never installed as an update to grub legacy.
Do you have other OSs that use grub2 installed anywhere on the machine?

I think you will find reference to the old swap uuid in the mga4 initrd:

lsinitrd /boot/initrd.img | grep by-uuid

Maybe need to rebuild the initrd for Mga4 as mentioned here https://bugs.mageia.org/show_bug.cgi?id=14759#c1

CC: (none) => zen25000

Comment 4 Thomas Spuhler 2015-04-28 00:13:47 CEST
I went through a "similar" problem. I need to convert my Reiserfs partitions to something else (I chose btrfs) since the Reiserfiles shows more issue with every new kernel.
I had a /, a /usr, a swap and a /home partition.

I had enough room to shrink the /usr partition and insert a new /usrnewfs partition.
I mounted /usr as /usroldfs and /usrnewfs
I used rsync -H /usroldfs/ /usrnewfs/ to copy everything to the new partition. (using live DVD)
I then booted a live Gparted CD and reformatted /usr to btrfs (which changed the UUID as expected (our mga5 Live-DVD unfortunately doesn't have Gparted) 
I then booted again our Live DVD and mounted /usr as /usroldfs  and /usrnewfs and copied everything back.
I edited the the /etc/fstab accordingly and Grub (097) as well. I then rebooted and it stopped booting with the dracut# line and the warning: 
Dracut Warning: /dev/disk/byuuid/"old UUID of /usr does not exists
generating "/run/initram/rdsosreport.txt"
You might want to save "/run/initram/rdsosreport.txt" to a USB stick or /boot after mounting them

I know I need to create a new initrd with dracut -f, but that's not straight forward if I cannot boot into the system.

Well, it was finally resolved by upgrading the system to mga5 (RC)

CC: (none) => thomas

Thierry Vignaud 2015-05-11 09:41:31 CEST

Summary: An USB disk with Mageia5 beta1 cannot boot on other computer => An USB disk with Mageia5 beta1 cannot boot on other computer (b/c fstab refers the internal hd swap)
CC: (none) => thierry.vignaud

Samuel Verschelde 2015-06-06 01:48:14 CEST

CC: (none) => mageia
Source RPM: (none) => dracut?

Comment 5 Barry Jackson 2015-06-06 15:27:58 CEST
(In reply to Thomas Spuhler from comment #4)

> I then booted a live Gparted CD and reformatted /usr to btrfs (which changed
> the UUID as expected (our mga5 Live-DVD unfortunately doesn't have Gparted) 

... you can install gparted (or anything else) in the live session.
Samuel Verschelde 2015-06-06 17:09:51 CEST

Whiteboard: 5beta1 => MGA5TOO

Comment 6 Marja Van Waes 2016-10-23 21:42:10 CEST
@ pterjan

I don't think it is possible in the Custom partitioning step, to:
* deselect a swap partition in such a way that no fstab entry will be created for it.
* or select the (only) swap partition that you want to get an fstab entry

Would it be possible at all to add such a feature?

Source RPM: dracut? => drakxtools, dracut
CC: (none) => marja11, pterjan
Assignee: bugsquad => mageiatools

Comment 7 sturmvogel 2022-08-13 18:58:36 CEST
Mageia 5 is EOL since Dec 31st 2017.
There will not have any further bugfix for this release.

You are encouraged to upgrade to Mageia 8 as soon as possible.

@reporter, if this bug still apply with Mageia 8, please let us know it.

@packager, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead.

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


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