Pages

Showing posts with label Kernel. Show all posts
Showing posts with label Kernel. Show all posts

Monday, August 27, 2012

Drivers for Linux

You devices may be supported by extra kernel modules.
You can try to install kernel-modules-extra before searching a driver for your devices.

To install kernel-modules-extra
    yum install kernel-modules-extra

Reboot to take effect
    reboot

Tuesday, August 14, 2012

Compile A Kernel Module / Driver

To Install Kernel Header
yum install kernel-devel

To Install GCC
yum install gcc

<compile module source code>
make

<install your compiled module>
make install

To Generate module.dep for New Module
depmod

To Add New Module
modprobe module_name

PS: You may need to update initrd by mkinitrd for some boot devices.

Monday, July 30, 2012

Create Custom Linux Initrd

Extract from Initrd
gunzip < initrd.img | cpio -i --make-directories

Create Initrd
find ./ | cpio -H newc -o > initrd.cpio
gzip initrd.cpio
mv initrd.cpio.gz initrd.img




Create Initrd from System Folder
mkinitrd /boot/initrd.$(uname -r).img $(uname -r) 

grub2 Recovery

Set target Linux partition as root
    root=(hd0,6)

(You may list content of the root)
    ls /

Specify kernel file and Linux root
    linux /boot/vmlinuz root=/dev/sda6

Specify initial RAM disk
    initrd /boot/initrd

Boot
    boot