Erik van Konijnenburg
2005-May-22 07:50 UTC
[klibc] [patch 00/12] ipconfig and nfsmount compatibility with glibc
Hi, The following set of patches is intended mostly to improve ipconfig and nfsmount compatibility with glibc. The context: I'm working on yaird, an alternative to mkinitrd, and currently implementing nfs root file systems. This is based on ipconfig and nfsmount from klibc, with a rewritten version of kinit. Users should be able to build the package with vanilla glibc, since klibc is not yet a standard part of every distribution; users with klibc should be able to build a leaner version simply by using klcc rather than gcc. The package will contain copies of ipconfig and nfsmount, so I can patch as needed to achieve compatibility. That said, if you can include (some of) these patches in the canonical version, that makes it easier for me to track future improvements in klibc. The kinit rewrite stays a bit closer to the nfsroot.txt kernel documentation, does a fallback from TCP to UDP to NFSv2 if needed, and handles only NFS: no mounting of /sys, no pivotroot, no searching for root file systems other than NFS. This should make it play nicer with the rest of the initrd; I can post it if anyone has a use for this. But I digress. The following patches need extra attention: ** avoid exit on valid usage in nfsmount This one makes it possible to do a retry with UDP in kinit if TCP is unsupported. It also makes sense in a pure klibc context. ** new include file net/route.h This one touches library code rather than application code, so it has potentially larger impact. ** Unpleasantness in linux/nfs_mount.h Exceptionally ugly, but I don't see a better solution without touching the kernel includes. It's the same approach used in util-linux. The patches were made against 1.0.8 and compile-tested against 1.0.10. You mentioned working on kinit and ipconfig last week or so, but that's not visible yet in git. Please let me know if you want me to rediff this stuff after your changes are published. Regards, Erik --
H. Peter Anvin
2005-May-22 10:39 UTC
[klibc] [patch 00/12] ipconfig and nfsmount compatibility with glibc
Erik van Konijnenburg wrote:> > The kinit rewrite stays a bit closer to the nfsroot.txt > kernel documentation, does a fallback from TCP to UDP to NFSv2 > if needed, and handles only NFS: no mounting of /sys, no pivotroot, > no searching for root file systems other than NFS. This should > make it play nicer with the rest of the initrd; I can post it if > anyone has a use for this. But I digress. >No, that's completely the wrong thing. kinit *MUST* be a full replacement for prepare_namespace() in the kernel; in fact, there is lots of *MISSING* functionality. --> INITRAMFS IS NOT INITRD <-- Say that forty-seven million times. In fact, with a proper kinit, initrd handling can be done in userspace too. -hpa