Showing posts with label kernel 3.8.2. Show all posts
Showing posts with label kernel 3.8.2. Show all posts

05 March 2013

355. Compiling kernel 3.8.2 on Arch linux -- exploration

Edit: remove the sudo make install line -- it shouldn't be necessary and it triggers an error: 'cannot find LILO'

You can generate a good starting .config with make localconfig which creates a .config which prepares the modules which are in use by your system at that point. You can also get the old kernel config from /proc/config.gz which is probably a better approach.

I would guess that the approach described here is pretty much distro-agnostic.

Anyway, compiling the kernel:

mkdir ~/tmp
cd ~/tmp
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.2.tar.bz2
tar xvf linux-3.8.2.tar.bz2
cd linux-3.8.2/
cp /proc/config.gz .
gunzip config.gz
mv config .config
make oldconfig
make -j2
make -j2 modules
sudo make modules_install
sudo make headers_install INSTALL_HDR_PATH=/usr/src/linux-3.8.2
sudo cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.8.2
sudo cp System.map /boot/System-3.8.2.map
sudo mkinitcpio -k 3.8.2-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-3.8.2.img

NOTE: the naming isn't random. In order for grub-mkconfig to discover both the vmlinuz and initramfs files they need to be named vmlinuz-IDENTIFIER and initramfs-IDENTIFIER.img. The identifier can be anything.

Generate your grub.cfg:
sudo grub-mkconfig -o /boot/grub/grub.cfg

Reboot, and do
uname -a
Linux titanium 3.8.2 #1 SMP Mon Mar 4 20:17:17 EST 2013 x86_64 GNU/Linux