Monday, 6 July 2009

Writing GParted GRUB Menu

To write the menu for the GRUB we have to invoke a text editor and write the menu.lst file. “Debian” command line has the “nano” editor, same as “pico” Hence, I can use either name. At the command prompt I enter “pico /mnt/boot/grub/menu.lst” When  the editor opens I write down the following lines. I am careful not to leave spce after end of each line and not a line skipped between line. Only between each section I leave a line. each section starts with the phrase, “title”
default 0
title GParted live
root (hd0,0)
kernel /live/vmlinuz1 toram boot=live union=aufs noswap noprompt vga=normal ip=frommedia
initrd /live/initrd1.img

title CDROM
root (hd0,5)
kernel /boot/grub/memdisk
initrdl /boot/grub/sbootmgr.dsk

kernel is the core of each operating system loaded to do house keeping jobs such as delegating jobs to the the hardware and doing their requests. initrd job is to intialize physical memory of computer that is to put the image of operating system in RAM. This image is called the system and its job is to boot or make the computer live. I remember that I had the required files “memdisk” and “sbootmgr.dsk” on my customized GParted ISO.  I use the copy command
“cp –pf /live/image/memdisk  /mnt/boot/grub/memdisk” and
“cp –pf /live/image/sbootmgr.dsk  /mnt/boot/grub/sbootmgr.dsk” to copy these two files into the grub boot file. They load GParted from the GParted CD instead of GParted hard disk partition if I opt to. Let me tell you I can add more sections to this grub menu to load any further operating system from GParted partition and add a nice splash to the menu with cool listing and get rid of XOSL! So why not? It is because I do experiment with tools to become more efficient.

No comments:

Post a Comment