As to why MemTotal is missing some memory: https://serverfault.com/a/219990/37681
MemTotal: Total usable ram (i.e. physical ram minus a few reserved
bits and the kernel binary code)
As long as the kernel message buffer hasn't been filled with more recent events: look for a line starting with Memory
in dmesg
:
# dmesg |grep " Memory:"
[ 0.000000] Memory: 8125008K/8388088K available (8546K kernel code, 1313K rwdata, 4000K rodata, 1516K init, 1316K bss, 263080K reserved, 0K cma-reserved)
which shows the physical ram: 8388088K
and the "few reserved bits and the kernel binary code" 263080K
and the rest is available for the applications 8125008K and what will be shown as MemTotal in /proc/meminfo.
(Later stages in the boot process will free up some additional memory, increasing MemTotal, btw dmesg |grep Freeing
)