Search This Blog

Tuesday, April 27, 2010

Upgrade the Linux kernel in Ubuntu...

I know, Ubuntu 9.10 comes with 'Update Manager', by default.
But, this can be helpful in case, one wish to upgrade/downgrade to the kernel of one's choice.

1. Check the current version of kernel on the system

user@localhost:~$ uname -a
Linux localhost 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux

2. Search for the available supported kernels

user@localhost:~$ sudo apt-cache search linux-image
linux-image - Generic Linux kernel image.
linux-image-2.6.31-15-generic - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-15-server - Linux kernel image for version 2.6.31 on x86_64
linux-image-2.6.31-15-virtual - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-16-generic - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-16-server - Linux kernel image for version 2.6.31 on x86_64
linux-image-2.6.31-16-virtual - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-17-generic - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-17-server - Linux kernel image for version 2.6.31 on x86_64
linux-image-2.6.31-17-virtual - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-19-generic - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-19-server - Linux kernel image for version 2.6.31 on x86_64
linux-image-2.6.31-19-virtual - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-20-generic - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-20-server - Linux kernel image for version 2.6.31 on x86_64
linux-image-2.6.31-20-virtual - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-304-ec2 - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-305-ec2 - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-ec2 - Linux kernel image for ec2 machines
linux-image-generic - Generic Linux kernel image
linux-image-server - Linux kernel image on Server Equipment.
linux-image-virtual - Linux kernel image for virtual machines
alsa-base - ALSA driver configuration files
linux-image-2.6.31-14-generic - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-14-server - Linux kernel image for version 2.6.31 on x86_64
linux-image-2.6.31-14-virtual - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-302-ec2 - Linux kernel image for version 2.6.31 on x86/x86_64
linux-image-2.6.31-9-rt - Linux kernel image for version 2.6.31 on Ingo Molnar's full real time preemption patch
linux-image-rt - Rt Linux kernel image
rt2400-source - source for rt2400 wireless network driver
rt2500-source - source for rt2500 wireless network driver
rt2570-source - source for rt2570 wireless network driver
user@localhost:~$

3. Install the desired kernel

user@localhost:~$ sudo apt-get install linux-image-x.x.x-xx


..............Done!!!

Friday, April 16, 2010

Know what version of Linux distro you are on...

This will help you to identify the operating system details, in case, you have got only Shell prompt in any Linux machine.
Here is the command which will let you know, what version and distribution of Linux you are on.

user@localhost:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=interpid
DISTRIB_DESCRIPTION="Ubuntu 8.10"


In case of BSD, the command given should be

user@localhost:~$ cat /etc/*version
RHEL 5.4



Furthermore, if you want to know what is the kernel version and other system information details, this will be the command that will do the job.

user@localhost:~$ uname -a
Linux localhost 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux

..............Done!!!

Sunday, April 4, 2010

Bind multiple IPs to a single interface in Ubuntu...

I had came across a situation, where I had to assign more than one IP to a single interface to my Ubuntu host...so here are all the things that I did...

1. Backup the 'interfaces' file, before you make something crappy with the original one :P
user@localhost:~$ sudo cp /etc/network/interfaces /root/interfaces.backup
user@localhost:~$



2. Edit the 'interfaces' file and change is like...
user@localhost:~$ sudo nano /etc/network/interfaces
user@localhost:~$ cat /etc/network/interfaces
auto eth0
auto eth0:0
auto eth0:1

iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.248
gateway 192.168.1.254

iface eth0:0 inet static
address 192.168.1.2
netmask 255.255.255.248
gateway 192.168.1.254

iface eth0:1 inet static
address 192.168.1.3
netmask 255.255.255.248
gateway 192.168.1.254



save it, and close the file.

3. Restart the network service...
user@localhost:~$ sudo /etc/init.d/networking restart


..............Done!!!