How to Customize or Remove Extra Linux Kernel Version Details Shown at Boot

How to change version string of the kernel?

At the top of the top-level Makefile, there are four lines

VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 7
EXTRAVERSION =

The values are different for different kernel versions, of course. These are used to construct the version string, so changing them before building the kernel changes the version string of the kernel you build.

Additionally, there's a configuration option CONFIG_LOCALVERSION, to be found under General Setup -> Local version - append to kernel release in make menuconfig that is appended to this.

Compiling a kernel

Just open Makefile in the linux kernel_src/Makefile and check the "EXTRAVERSION" information.
It may be the "EXTRAVERSION" is added.

Adding some extra info in uname -v output string in linux kernel

The variable CONFIG_LOCALVERSION (inside your kernel .config file) let you set a custom string that will be appended to the kernel release number, thus shown when using 'uname'.

Is that what you want?

Booting a newly compiled linux kernel

Most automatic grub setups include kernel options to hide the messages generated as the kernel attempts to boot. For example:

/boot/vmlinuz-x.x.x.x-generic root=UUID=something ro quiet splash

While on the grub menu line of the kernel you wish to boot, press 'e' to temporarily edit it, and delete options such as quiet and splash (but leave the ro).

Then boot the temporarily modified line, and see the progress messages in order to get an idea where the boot is failing.

How to remove a newly installed kernel?

Delete *3.10.26* from /boot. This is what got installed. Delete /lib/modules/*3.10.36* as well. This is what got modules_installed. Run update-grub afterwards.

Note: before deleting, do an echo with the paths that I gave you to make sure they correspond to a single kernel and that is the kernel you want.



Related Topics



Leave a reply



Submit