[klibc] Reason for gen_init_cpio instead of just cpio?
Kevin P. Fleming
kpfleming@cox.net
Tue, 18 Mar 2003 16:23:22 -0700
H. Peter Anvin wrote:
>>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.
>
Ahh, because a non-root user wouldn't be able to mknod underneath usr/root... so
the template tree couldn't have device nodes in it. That's a sticky one.
I guess that means that gen_init_cpio may have to _both_ include a predefined
list of initramfs contents as well as be able to walk the usr/root tree to get
the rest of the stuff that's been built during the kernel compile. Any other
type of file beyond a device node should be safe to be picked up that way.