I am running Ubuntu 12.04.1 LTS i686 on VirtulBox. Every time I check the updates, there's a new Linux kernel. If I install the new kernel, I have to install the Virtulbox Guest Additions again and reboot the server. I don't want to do this every week. I know I can manually uncheck the kernel packages from update manager, but is there a way to skip the kernel update automatically? I found an answer here, but it's for Ubuntu 10. Thanks.
Ubuntu – How to skip kernel update
kernelupdates
Related Question
- Ubuntu – way to disable kernel updates
- Ubuntu – How to update the nvidia modules after updating the kernel
- Ubuntu – How to use apt-get to update to the latest kernel
- Ubuntu – How to get Software Update to automatically grab kernel source along with kernel update
- Ubuntu – Workaround to re-install guest additions after every kernel update
- Ubuntu – Update of latest kernel
Best Answer
APT (Advanced Packaging Tool) is the system that Ubuntu uses to manage all of the software installed on a system. It allows you to “pin” a package to a certain version, so that it won’t be updated when you the Update Manager runs.
To pin your kernel packages, first you must determine what version your kernel is. One way to do this is to open the Synaptic Package Manager in System > Administration.
Type in “linux-generic” in the Quick search text field and hit enter.
Make a note of the number listed in the “Installed Version” column. We’ll use it in the next step.
Next, we need to edit the file /etc/apt/preferences. Open it by pressing Alt+F2 to bring up the Run Application window and entering in:
This will open up a gedit window. Most likely the window will be blank, unless you’ve played around with APT before.
In the window, type in the following, replacing the version number with the version number you found in the Synaptic Package Manager.
Save the file and close gedit. If you open the Update Manager, you should see that the Linux kernel updates are now hidden!
Source
Blocking packages with APT/DPKG
Remember the package name of your kernel from above.
Open a terminal and run:
And hit enter.
Enter your password for sudo:
Replace
kernel_package_name
with the name of the kernel you want to pin.Now run:
To remove pin from Apt/Dpkg:
Open a terminal
Replace kernel_package with the package you want to pin.
Now run:
Source
What you're trying to do is called pinning. The sources I gave you above, have the essentials on what you must do to accomplish your tasks in hand.