Kevin P. Fleming
2003-Mar-18 23:06 UTC
[klibc] Reason for gen_init_cpio instead of just cpio?
I've googled to try and find discussion of this topic but didn't see any results particularly interesting... Is there any particular reason the kernel has gen_init_cpio instead of just using cpio itself? I'm working on some changes that would involve just cpio-ing the entire usr/root subtree as the initramfs image (instead of gen_init_cpio having to know ahead of time what files to include), and am wondering why it wouldn't be just easier to use cpio itself. If there's a good reason, I can certainly extend gen_init_cpio to do the tree-walk and build the initramfs that way.
H. Peter Anvin
2003-Mar-18 23:16 UTC
[klibc] Reason for gen_init_cpio instead of just cpio?
Kevin P. Fleming wrote:> I've googled to try and find discussion of this topic but didn't see any > results particularly interesting... Is there any particular reason the > kernel has gen_init_cpio instead of just using cpio itself? I'm working > on some changes that would involve just cpio-ing the entire usr/root > subtree as the initramfs image (instead of gen_init_cpio having to know > ahead of time what files to include), and am wondering why it wouldn't > be just easier to use cpio itself. > > If there's a good reason, I can certainly extend gen_init_cpio to do the > tree-walk and build the initramfs that way. >I think the reason is that it's desirable to be able to build a cpio archive including device nodes (e.g. /dev/console) without having to be root. -hpa