Things To Fix After Each Kernel Update

Every now and then, your running Linux distro will receive a kernel update. It’s a normal part of running a Linux distro, or any OS for that matter. Mac OS and Windows perform updates as well. Unfortunately in Linux, there are certain things that break after each kernel update. It’s annoying as all get out, but its a small price to pay for running a secure desktop. In this article, I will list 3 things that need fixing, and their solutions, after each kernel update.

Fix Virtualbox

sudo /etc/init.d/vboxdrv setup

Fix Alsa

sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa

Fix Webcam

sudo rmmod uvcvideo
sudo modprobe uvcvideo

I rather not to do this after each upgrade, but it’s a fact of life in the Linux world. It’s a good thing, it doesn’t happen very often. Perhaps, in the future, when Linux becomes perfect, or near perfect, this unnecessary exercise can all be avoided all together.

Fix Virtualbox After Kernel Upgrade

Ubuntu 11.04 recently upgraded to Linux kernel 2.6.38-11. Unfortunately, every new Linux kernel introduced on your system will break your Virtualbox setup. This article will show you how to fix Virtualbox with a new kernel. The error will appear if you try to launch a Virtual Machine. You will most likely get the following errors:

As detailed in the error box, you will need to run vboxdrv setup to fix the problem. All you need to do is open up the Terminal and type this command:

$ sudo /etc/init.d/vboxdrv setup

As displayed in the Terminal, the vboxdrv setup will stop the current Virtualbox kernel module, uninstall it, register a new kernel module, and finally start it. This completes the Virtualbox upgrade that’s necessary after each Linux kernel upgrade.

So, in the future, if your Ubuntu distro upgrades to a newer Linux kernel, you know exactly what to do to make your Virtualbox work with the latest kernel.

Linux 3.0 Faster Than Linux 2.6

Linus Torvalds wrote:

Well, so far I haven’t really seen any suggestions on how to improve
it much further.

3.0 will still be noticeably faster than 2.6.39 due to the other
changes made (ie the read-ahead), so yes, the regression itself is
fixed.

But performance on that particular benchmark with that particular
machine is clearly not optimal, in that there are known setups that
would be faster still.

Of course, the reason for the mutex conversion was _other_ loads,
where the spinlocks had bad behavior. So it’s a balancing act. And I
suspect we’ve reached a reasonable point in that balancing, yes.

Linus

Here’s the original thread.

Remove Old Kernel in Ubuntu and Grub2

In 2005, I wrote a short article on how to delete old kernels in Linux. At that time, I was using Fedora exclusively. Since then, I’ve moved on to Ubuntu. In addition, Grub2 is now standard for all Ubuntu releases. This short article will show you how to remove old kernels in your Linux system as well as clean up your Grub2 entries. By the way, you will see Grub2 entries only if you have a multi-boot configuration. If not, Ubuntu will boot directly to the login screen.

First, determine the current kernel being used by typing the following command in the Terminal.

# uname -r

The result will display something like the one below.

2.6.32-24-generic

Now, it’s important not to delete your current kernel because all hell will break loose or the sky will fall on your head. In either case, you don’t want to be in that predicament.

You can use the ‘Synaptic Package Manager’ to remove the older kernels. Use ‘2.6.32’ to narrow down your search. Right click on the kernel you want removed and choose ‘Mark for Complete Removal.’ After all older kernels are removed, you can now update the Grub2 configuration.

Grub2 Configuration

# sudo update-grub

That’s it. The next time you boot your multi-boot Ubuntu system, you will see less entries in Grub as well as successfully have deleted older kernels you no longer needed. There is a more detailed instruction how to remove other entries in Grub from howtogeek.com.

Reduce Energy Using PowerTop

Reduce the energy consumption of your Ubuntu Desktop by running PowerTop. A tip from Linux and Microcontroller Tips:

Since version 2.6.21, the Linux kernel has introduced a feature called tickless. The kernel no longer has a fixed 1000Hz timer tick. This will give a dramatic  power savings because the CPU stays in low power mode for longer periods of time during system idle.

A Nice handy tool, PowerTop has been created for reducing the Power Usage of Linux. This application will help to find the software components that are preventing optimal usage of your hardware and give proper suggestions for both hardware and software configurations to reduce power consumption of your system. So Now Your Ubuntu is energy Efficient. It is very useful for Laptop Users.

Linux Is Bloated and Scary

Linus Torvalds called Linux bloated and scary. Did he really mean this and this? Kidding aside, it’s only natural that an OS that’s maturing will get fat with age. Hundreds of lines of code are being added each day. Linux now has over 2.7 million lines of code. Does Linux really need to go on a diet? Maybe. Maybe not.

I think the biggest misconception is that most people think Linux is the Gnome Desktop. It’s really not. In fact, you can run Linux using an entirely different graphical desktop environment like KDE, Xfce, Fluxbox, Icewm, Windowmaker and many, many others . So, it’s a bit deceiving, because users only see the graphical desktop environments and not the kernel.

It’s a good bet that Linus Torvalds was talking about the kernel and the kernel only.

Slackware 13.0

Slackware Linux Project just released version 13.0 which promises to be a major bump up from version 12.0. The biggest addition to Slackware is the support of the 64-bit version. There are many updates and enhancements to version 13.0: Xfce 4.6.1, KDE 4.2.4, HAL or Hardware Abstraction Layer which allows support for USB flash sticks, USB cameras that appear like USB storage, portable hard drives, CD and DVD media, MP3 players without sudo requirement. Slackware uses Linux kernel 2.6.29.6. Download Slackware 13.0.

Build Linux From Scratch

If you want to learn the internals of Linux, try building a Linux kernel from scratch using LFS, Linux from Scratch. The 300 page instruction will teach you how to create your own distribution. You can customize, compile and build Linux to your own taste. LFS gives you the ability to select which programs you want loaded, what services you want running, what security features you want loaded. LFS is ideal for anyone who wants to delve into the internals of Linux. Download.