Summary: | sys-apps/mkinitrd doesn't work with LVM | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sascha Silbe <sascha-gentoo-bugzilla> |
Component: | [OLD] Core system | Assignee: | Chris PeBenito (RETIRED) <pebenito> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | CC: | method, mkennedy |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | install vgscan and vgchange themselves instead of vgwrapper |
Description
Sascha Silbe
2003-09-26 12:43:36 UTC
Created attachment 18369 [details, diff]
install vgscan and vgchange themselves instead of vgwrapper
The attached patch fixes the problem by copying vgscan and vgchange themselves
into the initrd instead of copying vgwrapper and linking to it.
In addition to this, sys-fs/lvm-user needs to be compiled with USE=static.
why not use lvmcreate_initrd to create the initrd? then if you need anything special done edit that one? Because lvmcreate_initrd does not use pivot_root, so I cannot have an ext3 LVM root mounted with data=journal (rootflags get applied to the initrd, not the real root). Even the initrd created by mkinitrd had to be hand-edited because it only works for self-hosting, but I needed the initrd for a UML host. initrd-tools from Debian might be better, haven't tried that yet. UML=user mode linux, BTW. I'm not sure if we can take this patch, since we cant ensure that lvm-user is compiled static. I've never used LVM, how does the Redhat behavior differ from ours? Did Redhat cook up vgwrapper as a lite, static program that incorporates the needed functionality of vgscan and vgchange, for use in initrds? If this is the case, we could ask the lvm-user people to see if we can get this wrapper, which would probably be a better solution. On a RedCrap machine: [root@gcomm root]# ldd /sbin/vgwrapper not a dynamic executable I'm in favour of redirecting this to lvm-user and dropping the patch. The vgwrapper that Red Hat has doesn't seem so nice. So I am going to put in a lvm-user patch that always causes a vgscan.static and vgchange.static to be built, and then use your patch so mkinitrd will install them into the initrd. However, I ran into this warning when building them static (near the end of the build): gcc -static vgscan.o -L/var/tmp/portage/lvm-user-1.0.7/work/LVM/1.0.7/tools/lib -llvm-10 -o vgscan /var/tmp/portage/lvm-user-1.0.7/work/LVM/1.0.7/tools/lib/liblvm-10.a(lv_create_node.o)(.text+0x82): In function `lv_create_node': : warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking Did you receive this warning when you built lvm-user with USE="static"? (its near the end of the build, and it doesnt fail the ebuild). If so does it still work ok? I just want to be sure, since I don't use LVM myself. I committed lvm-user-1.0.7-r1 and mkinitrd-3.5.7-r2. Together they should fix this. Works fine. Thanks! |