Bug 16163

Summary: dracut unable to build a bootable initramfs with LVM
Product: Mageia Reporter: igor ivanov <algaraad>
Component: InstallerAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: mageia, tmb
Version: 4   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: dracut-034-12.3.mga4 CVE:
Status comment:

Description igor ivanov 2015-06-21 19:15:38 CEST
Description of problem:my mageia4_64 lies on a lvm:
/dev/vgmageia/lvrootmga4-64 / ext4 acl,relatime 1 1
/dev/vgmageia/lvbootmga4-64 /boot ext4 acl,relatime 1 2
/dev/vghome/lvhomemga4-64 /home ext4 acl,relatime 1 2
/dev/vgmageia/lvusrmga4-64 /usr ext4 acl,relatime 1 2
/dev/vgmageia/lvvarmga4-64 /var ext4 acl,relatime 1 2

and the PV of vgmageia is itself a raid volume /dev/md5:
/dev/md5:
        Version : 0.90
  Creation Time : Wed Sep 21 16:08:52 2011
     Raid Level : raid5
     Array Size : 125906112 (120.07 GiB 128.93 GB)
  Used Dev Size : 41968704 (40.02 GiB 42.98 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 5
    Persistence : Superblock is persistent

    Update Time : Sun Jun 21 18:58:04 2015
          State : clean 
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 30b3de45:455285d8:0037686d:9fe88fa7
         Events : 0.9776

    Number   Major   Minor   RaidDevice State
       0       8        5        0      active sync   /dev/sda5
       1       8       21        1      active sync   /dev/sdb5
       2       8       37        2      active sync   /dev/sdc5
       3       8       53        3      active sync   /dev/sdd5

as I wished to update on line to mageia5, I have renamed lvrootmga4-64 and the others lvm's as lvrootmga5-64 from one another mageia4 distrib on my system.

then, from this second system:
# mount /dev/vgmageia/lvrootmga5-64 /mnt/rootmga5-64
# mount /dev/vgmageia/lvbootmga5-64 /mnt/rootmga5-64/boot
# mount /dev/vgmageia/lvusrmga5-64 /mnt/rootmga5-64/usr
# mount /dev/vgmageia/lvvarmga5-64 /mnt/rootmga5-64/var
# mount -o bind /dev /mnt/rootmga5-64/dev
# mount -o bind /proc /mnt/rootmga5-64/proc
# mount -o bind /sys /mnt/rootmga5-64/sys
# chroot /mnt/rootmga5-64
# dracut -v --add "lvm mdraid" /boot/initrd-3.14.43-*-1.mga4.img 3.14.43-*-1.mga4

where *=desktop,server
# exit chroot

and when rebooting, splash shows

dracut couldn't boot 
/dev/vgmageia/lvrootmga5-64 not found
dracut/#: blkid 
doesn't show any lvm, only physical devices (/dev/sda1,... and so on)
dracut/#: vgscan
command not found
dracut/#:vgchange -a y vgmageia
vgchange; command not found

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


How reproducible:see above (tedious)


Steps to Reproduce: see above
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Comment 1 igor ivanov 2015-06-21 19:24:31 CEST
I have done the same when updating from mageia3 to mageia4, it worked fine
Comment 2 igor ivanov 2015-06-21 19:50:40 CEST
I have forgotten to precise that I have made the necessary changes in /etc/fstab
David Walser 2015-06-22 00:07:12 CEST

CC: (none) => mageia, tmb

Comment 3 igor ivanov 2015-06-23 14:46:11 CEST
Really sorry once again, I have forgotten to mount /run:
# mount -o bind /run /mnt/rootmga5-64/run

now dracut works fine under chroot

the bug may be marked as closed
until the following one...
Comment 4 Colin Guthrie 2015-06-23 14:56:09 CEST
Marking as resolved as per above.

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