On 01/03/2016 09:35 PM, 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 > > [...] > > This is just a proof of concept, [...]
Well, in case anyone's interested: https://github.com/chris-se/tiny-initrd If your kernel has the block device driver and the file system driver of your root and /usr file systems built in (NOT a standard Debian kernel), and you don't use UUID= but kernel device names (/dev/sda1 or similar) for the root= parameter with your boot loader and the /usr entry in /etc/fstab, you can use it as a drop-in replacement for the default initrd by just replacing the file in /boot. (You don't need to specify some additional parameter for the /usr mount, as the original PoC required.) The standard kernel parameters for the rootfs are also supported now (ro/rw, rootfstype=, rootdelay=, ...). (/usr doesn't have to be present, it will happily skip /usr if /etc/fstab or an entry for /usr doesn't exist.) Currently below 1000 LoC, initrd image size is around 10 KiB on amd64 unless you use glibc. (Then it's large.) Now properly packaged with Makefile (that can also generate the initrd image automatically), license (GPLv3+) and some basic documentation in form of a README. There are still some issues, please read the README before using it. Also, while it works for me[tm], there might be some bugs in there that I didn't find in my test setup. Usually a bug means a kernel panic, so you should keep an alternative way of booting around while testing it. I'll package that for Debian in the not too distant future. Regards, Christian
signature.asc
Description: OpenPGP digital signature