On Sat, Aug 31, 2013 at 10:55 PM, Walter Dnes <waltd...@waltdnes.org> wrote: >> I usally use ext4 as filesystem. >> >> # lsmod|grep ext >> ext3 100768 0 >> jbd 39586 1 ext3 >> ext2 49572 0 >> ext4 263621 1 >> crc16 1255 2 ext4,bluetooth >> mbcache 4450 3 ext2,ext3,ext4 >> jbd2 48679 1 ext4 >> >> Isn't great what an initramfs can do? > > In this case, initramfs is your root filesystem, from which you load > another fs and then transfer (pivot root?) to it. You have to build > initramfs support into the kernel, to boot an initramfs. So my argument > still stands, regardless of whether your *INITIAL* filesystem is ext4fs, > or ZFS, or initramfs, that *INITIAL* filesystem has to be built into the > kernel.
Interesting perspective. Of course, support for an initramfs is not actually a file system (it's not even in the File systems section of the kernel configuration, is in General setup); it's not possible to have initramfs as a module (that would make no sense at all); and it's code that is several orders of magnitude more simpler than the one used by ext4 (or any other journal file system). But you are right that for booting with an initramfs, you need initramfs support. > Also, I really wonder what the point is in having to use > initramfs on a system where /usr is part of /. Well, since some months ago I've been running as a module almost everything that can be compiled as a module. This allows me to run a *truly* minimal kernel, and only the necessary modules autoload automatically (one big exception: binfmt_script, I compiled that into the kernel because it was not loading automatically). I can also unload some modules when not in use anymore (and this is great to debug sometimes). This also lets me to add a lot of stuff in the kernel, as long as I add them as modules, without me worrying about bloating my kernel. Only when they are needed they are loaded. I have USB speakers, but I almost never use them; no problem, they (like almost everything else) live as modules, and only are loaded (automagically, thanks to udev) when needed. And again, I can unload them when not in use. And also, it turns out that by using dracut+systemd you could boot faster than without initramfs (although I can't find the link anymore). Finally, using only modules and dracut liberates me from thinking what should it be compiled in and what not; I just put *everything* as a module, and the kernel, udev and dracut take care of loading what's necessary. Thus, my kernel (the one running in memory) is as minimal as it can be, all the time. Oh, and one more thing; by having everything as a module, if suddenly I need support for new hardware, usually I can do a quick "make menuconfig; make modules_install", and the new module can be modprobe'd into the kernel without needing a reboot. That's convenient. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México