[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/fstab question (problem)?



On Sun 23 Apr 2023 at 01:14:05 (-0700), David Christensen wrote:
> On 4/22/23 21:11, David Wright wrote:
> > On Sat 22 Apr 2023 at 18:51:26 (-0700), David Christensen wrote:
> > > "Back in the day", people running Linux had computers with limited
> > > amounts of storage and memory.  I imagine an initial ramdisk seemed
> > > like an good trade-off/ work-around at that time.
> > > 
> > > But today, this is my Linux daily driver:
> > 
> > > Total online memory:      32G
> > 
> > That must be nice. I don't know what it might have cost. I'm afraid
> > I only use cast-offs. The oldest has ½GB memory.
> 
> https://www.ebay.com/itm/393918586141

When the boat comes in, maybe. The most expensive piece of computing
equipment I've bought is my first 500GB internal PATA disk, which was
£120 in 2007. It still runs.

> > > # ls -l /boot/initrd.img-5.10.0-21-amd64  /boot/vmlinuz-5.10.0-21-amd64
> > > -rw-r--r-- 1 root root 47837534 Mar 18 19:23
> > > /boot/initrd.img-5.10.0-21-amd64
> > > -rw-r--r-- 1 root root  7019136 Jan 21 06:35 /boot/vmlinuz-5.10.0-21-amd64
> > 
> > > The Linux kernel is ~7 MB and initrd.img is ~48 MB.  My daily driver
> > > is complete overkill.
> > 
> > I think your kernel is probably more like 12.3MB of code.
> 
> Where do you get 12.3MB?

$ sudo dmesg | grep -e 'kernel code' -e 'Freeing'
[    0.073101] Memory: 261408K/2087060K available (12295K kernel code, 2537K rwdata, 7560K rodata, 2660K init, 5468K bss, 85560K reserved, 0K cma-reserved)
[    0.216704] Freeing SMP alternatives memory: 32K
[    1.301737] Freeing initrd memory: 11472K
[    1.417122] Freeing unused decrypted memory: 2036K
[    1.418881] Freeing unused kernel image (initmem) memory: 2660K
[    1.436299] Freeing unused kernel image (text/rodata gap) memory: 2040K
[    1.436768] Freeing unused kernel image (rodata/data gap) memory: 632K
$ uname -vsor
Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) GNU/Linux
$ 

I take it you're not running an i386:

$ sudo dmesg | grep -e 'kernel code' -e 'Freeing'
[    0.067626] Memory: 472644K/522744K available (8213K kernel code, 1158K rwdata, 2516K rodata, 872K init, 476K bss, 50100K reserved, 0K cma-reserved, 0K highmem)
[    0.126156] Freeing SMP alternatives memory: 32K
[    2.906178] Freeing initrd memory: 30656K
[    3.694974] Freeing unused kernel image (initmem) memory: 872K
$ uname -vsor
Linux 5.10.0-21-686 #1 SMP Debian 5.10.162-1 (2023-01-21) GNU/Linux
$ 

> > Your initrd
> > is larger than mine: I'd have to see inside to tell why, but no matter.
> > 
> > > Even my 2007 laptop has 2 GB of memory an a 1 GB boot partition/
> > > filesystem.  Still overkill.
> > 
> > Overkill for what? I don't understand.
> 
> 2 GB of memory and 1 GB of boot file system are more than enough to
> boot Linux or FreeBSD.

That looks like a restatement, so in order to understand /why/ you
might say that, I have to put words into your mouth; sorry if they're
the wrong ones.

You seem to be saying that because 2GB/1GB is enough to boot a system,
then that's a good reason to allow the running kernel to be 48+12=60MB
in size, just to eliminate the initramfs. And the sole reason for
wishing to eliminate it is because of its "complexity", as you see it.

I don't buy that, and I don't think most linux users want their kernel
stuffed with 80% of code that's never used and is only there for other
people who might some day boot their kernel on a system that has a
fancy way of accessing the root filesystem that doesn't interest them,
and I, for one, would never be able to afford.

And that's before you look at the advantages of developing and running
that 80% of the code in user-mode rather than kernel-mode, in terms of
debugging, security, etc.

Cheers,
David.


Reply to: