lundi 4 avril 2016

[Kernel] Initramfs is too big ...


Kernel is not booting...

You then realize that your initramfs is very big : 200MB ...

A normal initramfs can range between 2MB to ~20MB in general.
If your initramfs is too big, then the kernel will not be able to map it in memory and it won't boot.

You can remove all the things your computer won't use anyway from the bloated initramfs.

Edit /etc/initramfs-tools/initramfs.conf
and set MODULES=dep instead of MODULES=most

You can then rebuild your kernel.

Sources

http://askubuntu.com/questions/299396/how-to-reduce-the-size-of-initrd-img-on-ubuntu-13-04

[cmdline] MoreUtils

The errno util


Just a quick note to praise the moreutils package.

When programming userspace application that communicate with drivers, you will always get some errno number or somme perror formated strings.

errno is just the tool that make it easy to get the information about the error.

$ errno 12
ENOMEM 12 Cannot allocate memory



$ errno -s memory
ENOMEM 12 Cannot allocate memory
EHWPOISON 133 Memory page has hardware error



You don't need this site anymore.

Source:

https://joeyh.name/code/moreutils/