[klibc] lvm initrd -> initramfs

Martin Schlemmer azarah at nosferatu.za.org
Fri Aug 26 14:48:58 PDT 2005

On Fri, 2005-08-26 at 11:32 -0700, ms419 at freezone.co.uk wrote:


> I converted my lvm root initrd to an initramfs by putting glibc, lvm, 
> pivot_root, my linuxrc, etc. in my initramfs source file. I use ash 
> compiled against klibc to run my linuxrc
> Unfortunately -
> pivot_root . initrd
> - complains -
> pivot_root: Invalid argument
> I suspect this may be because you can't pivot_root using a cpio 
> initramfs root?
> If so, what should I do instead? Should I still mount my lvm root 
> partition as I do currently? Should I call kinit?

I just use run-init from klibc:

---- snip -----
# Other setup and all else before I can mount root before
# this line ...

# Mount /root
mount -t ext3 /dev/nsw1p2 /rootfs

# The rc-scripts will take care of this
umount /sys


for x in $(cat /proc/cmdline)
        case "${x}" in
                # Set $init to whatever the user specified ...
                eval ${x}

# The rc-scripts will take care of this
umount /proc

# Right, pivot and give control to real init
exec run-init /rootfs "${init}" "$@"

Something like above over here.


Martin Schlemmer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.zytor.com/pipermail/klibc/attachments/20050826/04598aa6/attachment.bin

More information about the klibc mailing list