Tag Archives: kernel

Reinstalling and Fixing Grub 2 by NixiePixel

AddThis

Recovering the GRUB 2 Boot Loader by cgermany77

AddThis

How to manage the GRUB and purge old Kernel versions on the start-up menu

After a kernel update, you find the start-up menu populated with extra lines related to all the old kernel versions plus the current one. To manage the start-up manager and safely remove old kernels you have to manually operate on it.
First of all you have to double-check what is the current kernel version.
Open a Terminal and type:
uname -r
The result will be something similar to: 2.6.32-35-generic
Then you will go to the boot directory through the command:
cd /boot ls vmlinuz*
The next step will be to obtain more information about old kernel you have on our PC:
ls vmlinuz*
Now in the Terminal you have results similar to these:
vmlinuz-2.6.32-21-generic  vmlinuz-2.6.32-25-generic  vmlinuz-2.6.32-35-generic
vmlinuz-2.6.32-24-generic  vmlinuz-2.6.32-26-generic
As last step you have to remove all the old version of the kernel using this command:
sudo apt-get remove linux-image-X.X.XX-XX-generic
where “x” is the obsolete kernel version you want to purge. In my specific case the proper command line I used was:
sudo apt-get remove linux-image-2.6.32-21-generic linux-image-2.6.32-24-generic linux-image-2.6.32-25-generic linux-image-2.6.32-26-generic
Last but not least go to System –> Administration –> StartUp Manager (available for installation on Synaptics or on Ubuntu Software Center) and select your OS choice in the Default Operating System menu. That’s all! AddThis

Kernel Development Using the Eclipse IDE

Eclipse IDE is an open source platform useful to build an extensible development and develop application frameworks to build, deploy and manage through the complete SDLC of the software. Features wise Eclipse IDE is much more advanced than the conventional Java development Environment. As a first step you have to download Eclipse CDT from:

http://archive.eclipse.org/technology/epp/downloads/release/ganymede/SR2/eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz

Use the following command to extract the tar:

$ tar xzvf eclipse-cpp-ganymede-SR2-linux-gtk,tar.gz

As the next step you have to change your directory in terminal window into the extracted folder and then start Eclipse as given below :

# cd eclipse

$ ./eclipse

Let us consider building a “C“ application using Eclipse IDE. Use the following command sequence to accomplish the first step :

Select File – New – C Project.

Assign the project a name and identify the location (it is advisable to retain the location field as the default value. Most important mention “Executable” under the Project type. Click “Next” followed by “Finish” to complete this step. Specify the Yes for “C/C++” perspective or not. Locate the Project explorer Select build project in Project Explorer with options like Console, Tasks and Problems. Next you have to compile this project using Eclipse IDE.

Let us now get down to the task at hand – Kernel compilation. Download a kernel tar file from the website – www.kernel.org.

The commands look like this :

$mv linux-2.6.34.tar.bz2 /usr /src.

Then the file has to be extracted into the respective folder through the following command :

$ tar -jxvf linux-2.6.34.tar.bz2

$cd linux-2.6.34

Configuration can be set as follows :

$ make menuconfig

Further steps in the process to compile a kernel using Eclipse IDE are fairly simple. Take care to disable the “Automatic building and indexing” to save time. This is accomplished as follows :

Window – Preference – General – C/C++ – Indexer. You have to select “No Indexer” Next give the following command – File – New – C Project. After assigning a name to the project undo checking of “Use default location” and browse to your kernel source code directory.

Project type – Makefile project – Empty Project. To cross-compile the kernel, use existing tool from “Toolchain”. Click on Finish to complete this beginning step. Give the following commands to complete the task :

Make all

CHK include/linux/version.h

CHK include/generated/utsrelease.h

CHK scripts/checksyscalls.sh

CHK include/generated/compile.h

On waiting for a few minutes the compilation is completed. To check that the kernel image file is created successfully type the following commands :

$ ls –l /usr/src/linux-2.6.34/arch/x86/boot/bzimage

–rw-r—r—1 manoj sc 3589920 2010-11-30 12:51 /usr/src/

Linux-2.6.34/arch/x86/boot/bzimage

Option readers and internet users will certainly admit that developing kernel using Eclipse ID is one of the simplest things anyone can do. However, to realize the true potential of the eclipse, You can gradually scale up the nature of projects to more complex projects to realize the full potential of eclipse IDE. A step-by-step approach would be wise in this regard. AddThis mp3 link

How to solve some screen resolution problems when upgrading the kernel on Ubuntu!

Today, in our Linux Page (in Spanish) we added a brief, elemental guide to fix a particular inconvenience that sometimes happens with new kernel versions on Ubuntu. In fact, every time I decide to upgrade the kernel I have big problems with my graphic card (NVidia) and when rebooting I am not able to see my screen. I think that one of the possible problems is the AWN (a -MAC style- bar) I have installed on my PC. After many wasted hours trying to fix this matter I find a very fast solution. I start my Ubuntu 8.04 in the safe mode (sometimes using the previous kernel version) and I launch EnvyNG (Applications – System Tools – EnvyNG) to automatically reconfigure my video card. I know that probably this is not the most advanced way to fix my kernel problem but you can believe that it is very fast and effective. Try it if necessary! AddThis mp3 link

How to fix the number of kernels during the Ubuntu boot up!

UbuntuWe are sorry for the delay in uploading this new post but we had some technical problems. It happens! This week, in our Linux Page (in Spanish) we have posted a couple of simple but effective tips to choose how many Kernels you want you see when starting up your Ubuntu 8.04. Using Add/Remove Programs it is possible to install the “StartUp Manager” program which allows you to easily choose the number of kernels you prefer. Moreover we have suggested an alternative command line “delete” and “save” solution for the people who prefer to solve this inconvenience without installing new software. Good work! AddThis mp3 link