Bug 8634 - Cannot boot when root device is a logical volume
Summary: Cannot boot when root device is a logical volume
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: i586 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO, PATCH
Depends on:
Blocks:
 
Reported: 2013-01-08 16:28 CET by Gilles Allard
Modified: 2013-11-23 16:16 CET (History)
5 users (show)

See Also:
Source RPM: mkinitrd
CVE:
Status comment:


Attachments
diff between mkinitrd~ (old) & mkinitrd (new; pb. fixed) (551 bytes, patch)
2013-01-08 16:28 CET, Gilles Allard
Details | Diff

Description Gilles Allard 2013-01-08 16:28:41 CET
Created attachment 3340 [details]
diff between mkinitrd~ (old) & mkinitrd (new; pb. fixed)

Package involved : mkinitrd-6.0.93-28.mga2.src.rpm ( and maybe beyond )

Assuming that more than 1 volume group exist ( say 3 ) and the root device is a logical volume belonging to any v.g. but the first, the "initrd" file created by mkinitrd cannot boot the computer.

The "initrd" file was created by

     mkinitrd -f --verbose --fstab=/mnt/etc/fstab --rootdev=/dev/vg99/lv00 /boot/initrd-3.1.5-desktop586-1lvm.img 3.1.5-desktop586

Here, lv99 is the 4rth volume group & lv00 the first volume on this group

My analysis : when creating the "initrd" file, current (major, minor) of /dev/vg99/lv00 is used to create /dev/root in the "initrd" image ( say : major 256 & minor 58 ) the minor number depending on the number of active logical volumes.
When booting, only one volume group will be activated ( here "vg99" through "vgchange -ay vg99" ) and, at that moment, /dev/vg99/lv00 will have major 256 & minor 0; minor 58 doesn't exist ( so /dev/root ) and no boot is possible.

My proposal for a patch ( see attachment ) : if root device is a logical volume, make /dev/root created in "initrd" image a symbolic link to "/dev/vg99/lv00"; this way, /dev/root will always have the correct minor number.
Manuel Hiebel 2013-01-26 00:00:33 CET

Attachment 3340 is patch: 0 => 1
Attachment 3340 mime type: application/octet-stream => text/plain

Comment 1 Manuel Hiebel 2013-01-26 00:04:22 CET
(as default we use dracut iirc)

CC: (none) => tmb
Source RPM: (none) => mkinitrd

Comment 2 Samuel Verschelde 2013-09-05 12:45:04 CEST
Hi, thanks for reporting this bug and providing a patch.

We don't use mkinitrd anymore in Mageia 3 and later, so this bug is only in Mageia 2. Would fixing it via an update to mkinitrd be useful, or is it too late once the system has been installed (and we can't fix the installer once a version of the distribution has been released)?

By the way, there is no assigned maintainer for mkinitrd, so I added packagers who worked on it in the past in CC so that they could review your patch and maybe apply it.

Keywords: (none) => NEEDINFO, PATCH
CC: (none) => anssi.hannula, arnaud.patard, fundawang, stormi

Comment 3 Manuel Hiebel 2013-10-22 12:21:17 CEST
This message is a reminder that Mageia 2 is nearing its end of life.
Approximately one month from now Mageia will stop maintaining and issuing updates for Mageia 2. At that time this bug will be closed as WONTFIX (EOL) if it remains open with a Mageia 'version' of '2'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Mageia version prior to Mageia 2's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Mageia 2 is end of life.  If you would still like to see this bug fixed and are able to reproduce it against a later version of Mageia, you are encouraged to click on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Mageia release includes newer upstream software that fixes bugs or makes them obsolete.

-- 
The Mageia Bugsquad
Comment 4 Manuel Hiebel 2013-11-23 16:16:44 CET
Mageia 2 changed to end-of-life (EOL) status on ''22 November''. Mageia 2 is no
longer maintained, which means that it will not receive any further security or
bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Mageia
please feel free to click on "Version" change it against that version of Mageia
and reopen this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--
The Mageia Bugsquad

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


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