Feeds:
Posts
Comments

Archive for November 22nd, 2007

What is Grub?

Grub is abbreviaton of “GRand Unified Bootloader”. It is used as a bootloader.

The location of grub is in /boot/grub

taufanlubis@zyrex:~$ cd /boot/grub

taufanlubis@zyrex:/boot/grub$ ls -l

total 224

-rw-r–r– 1 root root 197 2007-07-31 11:29 default

-rw-r–r– 1 root root 15 2007-07-31 11:29 device.map

-rw-r–r– 1 root root 8660 2007-07-31 11:29 e2fs_stage1_5

-rw-r–r– 1 root root 8452 2007-07-31 11:29 fat_stage1_5

-rw-r–r– 1 root root 15 2007-07-31 11:29 installed-version

-rw-r–r– 1 root root 9152 2007-07-31 11:29 jfs_stage1_5

-rw-r–r– 1 root root 4383 2007-09-30 07:37 menu.lst

-rw-r–r– 1 root root 4383 2007-09-30 07:37 menu.lst~

-rw-r–r– 1 root root 5145 2007-09-11 21:42 menu.lst.backup

-rw-r–r– 1 root root 7860 2007-07-31 11:29 minix_stage1_5

-rw-r–r– 1 root root 10132 2007-07-31 11:29 reiserfs_stage1_5

drwxr-xr-x 2 root root 4096 2007-09-21 11:43 splashimages

-rw-r–r– 1 root root 512 2007-07-31 11:29 stage1

-rw-r–r– 1 root root 110132 2007-07-31 11:29 stage2

-rw-r–r– 1 root root 9980 2007-07-31 11:29 xfs_stage1_5

taufanlubis@zyrex:/boot/grub$

 

If you use more than 1 Operating System, you can set your choice in ‘menu.lst’ file.

Always make a back up before you work with a file system.

taufanlubis@zyrex:/boot/grub$ sudo cp menu.lst menu.lst.backup

 

Open the menu.lst file.

taufanlubis@zyrex:/boot/grub$ sudo gedit menu.lst

# default number

# Numbering starts from 0, and the entry number 0 is the default if the command is not used.

default 0

## timeout sec

# Set a timeout, in SEC seconds, before automatically booting the default entry

# (normally the first entry defined).

timeout 20

# Pretty colours

color white/blue

 

title Ubuntu, kernel 2.6.20-15-generic

root (hd0,3)

kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=3bde3b2e-927d-4869-9635-6f7db9d5ed36 ro quiet splash

initrd /boot/initrd.img-2.6.20-15-generic

quiet

savedefault

 

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)

root (hd0,3)

kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=3bde3b2e-927d-4869-9635-6f7db9d5ed36 ro single

initrd /boot/initrd.img-2.6.20-15-generic

 

title Ubuntu, memtest86+

root (hd0,3)

kernel /boot/memtest86+.bin

quiet

 

### END DEBIAN AUTOMAGIC KERNELS LIST

 

If you upgrade your kernel, you will get another choice of running Ubuntu. Either you want to go with your old kernel or start with a new one. Automatically added to menu.lst

taufanlubis@zyrex:/boot/grub$ sudo apt-get update

taufanlubis@zyrex:/boot/grub$ sudo apt-get upgrade

taufanlubis@zyrex:/boot/grub$ sudo apt-get dist-upgrade

New Kernel menu added after the upgrade proccess has done. You will see it after you reboot your Ubuntu.

Before the menu.lst was:

  • Ubuntu, kernel 2.6.20-15-generic

  • Ubuntu, kernel 2.6.20-15-generic (recovery mode)

  • Ubuntu, memtest86+

     

My new menu:

  • Ubuntu, kernel 2.6.20-16-generic

  • Ubuntu, kernel 2.6.20-16-generic (recovery mode)

  • Ubuntu, kernel 2.6.20-15-generic

  • Ubuntu, kernel 2.6.20-15-generic (recovery mode)

  • Ubuntu, memtest86+

     

You have 2 new menus but Ubuntu still keep also the old one.

If you don’t need it any more just remove it.

taufanlubis@zyrex:/boot/grub$ sudo gedit menu.lst

title Ubuntu, kernel 2.6.20-16-generic

root (hd0,0)

kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=3bde3b2e-927d-4869-9635-6f7db9d5ed36 ro quiet splash

initrd /boot/initrd.img-2.6.20-16-generic

quiet

savedefault

 

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)

root (hd0,0)

kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=3bde3b2e-927d-4869-9635-6f7db9d5ed36 ro single

initrd /boot/initrd.img-2.6.20-16-generic

 

#——remove this part – START——————————————————————-

title Ubuntu, kernel 2.6.20-15-generic

root (hd0,0)

kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=3bde3b2e-927d-4869-9635-6f7db9d5ed36 ro quiet splash

initrd /boot/initrd.img-2.6.20-15-generic

quiet

savedefault

 

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)

root (hd0,0)

kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=3bde3b2e-927d-4869-9635-6f7db9d5ed36 ro single

initrd /boot/initrd.img-2.6.20-15-generic

#——remove this part – END——————————————————————-

title Ubuntu, memtest86+

root (hd0,0)

kernel /boot/memtest86+.bin

quiet

Save it. Now you only have the menu for the latest kernel.

 

Read Full Post »

Follow

Get every new post delivered to your Inbox.

Join 72 other followers