Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to change the /lib loaded from initramfs to a mounted partition's /lib ideally without having to rm the initramfs' /lib and then symlink-ing to the new /lib.
The problem with this approach is that once I delete the original /lib, my binaries in /bin (particularly busybox) have no libraries to refer to so the subsequent linking would fail.
The reason I need to symlink a new /lib because I need to load additional modules that is too big to be included in the initramfs (as it will bloat the whole kernel)

Is there any tool that I could use to change the /lib directory into a symlink in a single operation?

Or is there any other way I can make my binaries be able to access the other lib directory without overwriting the original /lib?

share|improve this question

1 Answer 1

There are not a lot of size limitations on initrd (I've put 50 MB of extra stuff in there on occasion). I believe the initrd store is freed after the pivot is complete. So.... a couple things come to mind. You could just wait until the real /lib is available before inserting your special purpose module (you probably thought of this).

Another option would be to load your special purpose module optionally based on a kernel cmdline parameter. In this way you could create a grub-menu that provides booting with or without the special module.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.