Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM2 - lvm2create_initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Mon Jul 31, 2017 11:43 am    Post subject: LVM2 - lvm2create_initramfs Reply with quote

With LVM2, having the lvm2create_initrd USE flag enabled I can do:
Code:
# lvm2create_initrd

As the result I am getting:
# lvm2create_initramfs wrote:
which: no lvm.static in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0)
lvm2create_initrd -- make LVM initial ram disk /boot/initrd-lvm2-4.9.34-gentoo.gz

lvm2create_initrd -- finding required shared libraries
lvm2create_initrd -- calculating initrd filesystem parameters
lvm2create_initrd -- calculating loopback file size
lvm2create_initrd -- making loopback file (9096 kB)
lvm2create_initrd -- making ram disk filesystem
Warning: label too long; will be truncated to 'LVM-4.9.16-gento'

lvm2create_initrd -- mounting ram disk filesystem
lvm2create_initrd -- adding required /dev files
/usr/sbin/lvm2create_initrd: line 383: /dev/MAKEDEV: No such file or directory
lvm2create_initrd -- ERROR adding /dev files

Solving the MAKEDEV thing is easy, just adding the -M gentoo option (PR #5257).
But for the no lvm.static matter, what USE flag would I need to enable, static-libs or static?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Mon Jul 31, 2017 11:50 am    Post subject: Reply with quote

charles17,

Its the static USE flag, but I think LVM has been broken with USE=static for some time. From memory, the build fails.
The fix is to include all the libs in the intrd.
My initrd was made long enough ago that USE=static worked.

Code:
$ lddtree /sbin/lvm
/sbin/lvm (interpreter => /lib64/ld-linux-x86-64.so.2)
    libdl.so.2 => /lib64/libdl.so.2
    libblkid.so.1 => /lib64/libblkid.so.1
        libuuid.so.1 => /lib64/libuuid.so.1
    libdevmapper-event.so.1.02 => /lib64/libdevmapper-event.so.1.02
    libdevmapper.so.1.02 => /lib64/libdevmapper.so.1.02
        libpthread.so.0 => /lib64/libpthread.so.0
        libm.so.6 => /lib64/libm.so.6
    libreadline.so.7 => /lib64/libreadline.so.7
        libncurses.so.6 => /lib64/libncurses.so.6
    librt.so.1 => /lib64/librt.so.1
    libc.so.6 => /lib64/libc.so.6

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Mon Jul 31, 2017 1:33 pm    Post subject: Reply with quote

Thanks for the help, already puts me one step forward.

FYI, it's no longer broken:
emerge -pvq sys-fs/lvm2:
sys-fs/lvm2-2.02.145-r2  USE="lvm2create_initrd readline static udev (-clvm) (-cman) -corosync -device-mapper-only -lvm1 -openais (-selinux) -static-libs -systemd -thin"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum