Q. I know how to find out information about compiled driver under FreeBSD kernel. But, how do I find out if a Particular feature, driver or filesystem support is compiled into my running Linux kernel or not? How do I find out if DMA support is compiled into my kernel?
ow do I find out what kernel version I am currently running under Debian Linux or any other Linux distribution using a shell prompt? How do I find out Unix kernel version?
Q. How do I list all installed kernel on Linux operating system? How do I find out current kernel version?
A. You can use standard package listing command to list installed kernels.
RedHat / CentOS / RHEL / Fedora Linux user
You need to use standard rpm command to list installed software. Type the following command at shell prompt:
$ rpm -qa kernel
To list / display current kernel
Type the following command:
$ uname -r
$ uname -mrs
Linux 2.6.18-8.1.14.el5 x86_64
Debian / Ubuntu Linux user
Use dpkg command to list all installed kernel, enter:
$ dpkg --list | grep linux-image
ii linux-image-2.6.20-15-generic 2.6.20-15.27 Linux kernel image for version 2.6.20 on x86/
ii linux-image-2.6.20-16-generic 2.6.20-16.32 Linux kernel image for version 2.6.20 on x86/
ii linux-image-generic 188.8.131.52.28.1 Generic Linux kernel image
am a new proud Linux user. My question to you is – how do I find which kernel version installed on my Linux system? How do I upgrade my kernel to latest version? Any help would be greatly appreciated.
am a new Linux system user. How do I determine if my CPU is 64bit or not on a Linux operating systems using command line option? How can I check Linux kernel is in 32 bit or 64 bit mode?
Q: I think I am missing some driver or my initial ramdisk is corrupted for running kernel how do I Rebuild the initial ramdisk image under Linux?
A: You need ramdisk if you have added new hardware devices such as SCSI or FibreChannel controller to your server as the ramdisk contains the necessary modules (i.e. drivers) to initialize hardware driver. If you modified the /etc/modprob.conf (or modules.conf) file then you need to execute special script called mkinitrd.
The mkinitrd script constructs a directory structure that can serve as an initrd root file system. It then generates an image containing that directory structure using mkcramfs, which can be loaded using the initrd mechanism. The kernel modules for the specified kernel version will be placed in the directory structure. If version is omitted, it defaults to the version of the kernel that is currently running.
Find out your kernel version:
# uname -r
Make backup of existing ram disk:
# cp /boot/initrd.$(uname -r).img /root
To create initial ramdisk image type following command as the root user:
# mkinitrd -o /boot/initrd.$(uname -r).img $(uname -r)
# ls -l /boot/initrd.$(uname -r).img
You may need to modify grub.conf to point out to correct ramdisk image, make sure following line existing in grub.conf file:
When the system boots using an initrd image created by mkinitrd command, the linuxrc will wait for an amount of time which is configured through mkinitrd.conf, during which it may be interrupted by pressing ENTER. After that, the modules specified in will be loaded.