免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1122 | 回复: 0
打印 上一主题 下一主题

Working With The GRUB Menu [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-04 21:12 |只看该作者 |倒序浏览

Working With The GRUB Menu
This tutorial describes how to edit the GRUB menu. It will also show how to add operating systems and how to add splash screens.
What everything means
To start off I will go over why you would use GRUB and what it all means.
The reason anyone would use the GRUB menu is to dual-boot two different operating systems. All it is is a simple DOS menu that you select which operating system you want to load during boot-up.
To open it type -
gksudo gedit /boot/grub/menu.lst
This will open up the menu.lst (the file in which you edit the GRUB Menu) in a simple text editor while giving you the ability to make changes and save them.
You will see a bunch of lines at first that all begin with "#". That tells the file to skip over these lines when reading the file. Scroll down into you stop seeing them.
Title - This is what is shown when the menu loads at boot up. Editing this will only change what is written on the screen.
Root - You likely have something along these lines "(hd0,1)". "hd0" refers to the your hard drive while 1 points to the partition. Note that for GRUB, partitions start at 0 and not 1. for example 0=Partition 1, 1=Partition 2 and so on.
Kernel -Pretty self-explanatory. This just is to ask what kernel version you would like to boot with.
Initrd - This is simple a temporary file system used by the kernel during a boot till the real file system can be mounted.
That is the basics of what all those lines mean.
Adding an OS
Adding an operating system to your grub menu is by no means difficult. Just fill in a few lines and you are done!
1. Open up Terminal (Applications>Accessories>Terminal) and run -
gksudo gedit /boot/grub/menu.lst
Once menu.lst opens up, scroll down to the button of the page. For this example I will be adding "Windows XP".
First add the title, which should look like what is shown bellow -
title        Microsoft Windows XP
Now to add the root for the OS. For me it is on the 1st disk and the third partition so I will put the following -
root        (hd0,2)
To finish it off add the following lines -
makeactive
chainloader    +1
Definitions -

The final product should look something like this (with your options of course) -
title        Microsoft Windows XP
root        (hd0,2)
makeactive
chainloader    +1
Save and reboot to make sure it worked correctly
Installing a Splash Screen
As you have probably noticed, the default look of GRUB is nothing too exciting. But fear not, you can install splash screens to spice it up a bit!
To start off find a image that pleases you (
9 beautiful screens
). Make sure it meets the requirements though -

  • .xpm file
  • 640x480
  • 14 colors only

1. Download an image and add it to a directory.
2. Open up your GRUB file again -
gksudo gedit /boot/grub/menu.lst
3. To keep it organized, add the following line under "Pretty colours" -
splashimage=(hd0,1)your/directory/splashimage.xpm
Remember to change the above line accordingly and reboot to test.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/5948/showart_353836.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP