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