On 01/04/2016 12:39 AM, Ben Hutchings wrote: > On Sun, 2016-01-03 at 21:35 +0100, Christian Seiler wrote: > [...] >> >> Well, just for the heck of it I wrote a braindead-simple initrd >> implementation in just 300 LOC: >> >> https://gist.github.com/chris-se/e0fbc073fcbd9ac2d7ae > [...] > > Neat. It should probably implement 'ro', 'rw' and 'rootdelay', though.
Yeah, those are on my list of things to implement if enough people are interested in this. My code was just a simple PoC. Ideally, the goal would be to support: - get /usr information from /etc/fstab of rootfs - support ro, rw, rootdelay, rootwait, rootflags, rootfstype - better error reporting - support MAJ:MIN device id syntax - for Debian: integration into the hooks as initramfs-tools and dracut currently do But not more, because I want the binary to remain *really* small, and I don't want to replace initramfs-tools or dracut with this. Btw. initramfs-tools (via switch_root from util-linux) recursively deletes the files in the initramfs in a forked-off process right before exec()ing init. Is that really necessary? Shouldn't the kernel loose the data of the initramfs when the last process using the mount is replaced with the system's init? (If I look at /proc/self/mountinfo, there's no entry for the initramfs anymore after just doing what my PoC does.) Regards, Christian
signature.asc
Description: OpenPGP digital signature