/boot/grub/menu.lst详解
基本概念
menu.lst有时候也叫grub.conf,但是/boot/grub/下会有一个名叫menu.lst的符号链接指向它。它是grub引导系统的配置文件。
基本选项
default 0
timeout 10
hidemenu
color white/blue
password --md5 $1$etSG6$LlxT8irAfAv5vYQn6tZUw1
default:后跟一个数字,指grub的默认启动项。也可以跟saved字样,这样的话,后面的savedefault就会起作用。
timeout:指定一个超时值,单位为秒,若用户在grub等待的超时时间范围内没有任何操作,则启动默认项。
hidemenu:若被设置则启动的时候默认不显示选项菜单,否则grub启动时自动显示选项菜单。
color:指定grub菜单的默认颜色。
password:指定一个密码,启用grub的密码保护。为安全起见,一般使用md5值,这个值可以使用grub-md5-crypt或者在grub shell中使用md5crypt生成。
一个启动Linux的菜单项
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=3f784cd9-516f-4808-a601-b19356f6bdea ro quiet splash locale=zh_CN vga=0x318
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
略解:
title:指定此菜单项的名称,既在grub列表里的名称
root:指定启动分区,注意,编号从0开始:比如第一块硬盘的第一个分区应该是(hd0,0)。启动分区的编号可以使用fdisk -l查询,但是需要root权限。
kernel:指定启动的内核的绝对路径和名称,后边跟参数,一般来说root参数就是你的根文件系统,一定要有的,可以像范例中使用
uuit表示,也可以直接使用/dev/sda2或者/dev/hda1这样的表示。其实有root和kernel两行就可以启动linux了。
initrd:指定系统启动访问真正的根文件系统前,访问的ramdisk映象。具体可以参照
Linux2.6 内核的 Initrd 机制解析
quiet:安静模式?不显示启动过程中具体的信息(此项与内核参数中的quiet区别不明)
savedefault:如果选择了这个启动项,那么下次启动时就用此项作为默认项。在前面设置为default saved时有效。
Linux kernel常用的参数
root:根文件系统的位置。
ro:可读写,当启动分区是JFS等格式时需要使用此参数使得系统可以在启动是存放日志。
quiet:安静模式,不显示启动详细信息。
splash:显示徽标。
locale:指定locale
vga:指定framebuffer的显示模式。一般对应关系为:
640x480 800x600 1024x768 1280x1024
256 0x301 0x303 0x305 0x307
32k 0x310 0x313 0x316 0x319
64k 0x311 0x314 0x317 0x31A
16M 0x312 0x315 0x318 0x31B
启动Windows的菜单项
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
略解:
title,root,savedefault同上。
makeactive:使此分区成为活动分区,Windows必须从活动分区启动,而且NT内核的启动分区一般应该为第一个主分区。
chainloader +1:告诉grub不要自己加载此操作系统,而使用这个分区上的加载器,比如ntldr。
晒晒我自己的menulist.ubuntu本来是有三个的我去了一个觉得没什么用,我本来想把recovery mode也去掉的.其实这些去了grub引导的时候都可以自己写,也没什么.
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 5c5b2c70-3956-4170-b82b-3313638fabdd
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=5c5b2c70-3956-4170-b82b-3313638fabdd ro splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 5c5b2c70-3956-4170-b82b-3313638fabdd
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=5c5b2c70-3956-4170-b82b-3313638fabdd ro single
initrd /boot/initrd.img-2.6.27-7-generic
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda7.
title CentOS (2.6.18-92.el5) (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-92.el5.img
savedefault
boot
title Microsoft Window XP
root (hd0,0)
savedefault
makeactive
chainloader +1
/boot/grub/menu.lst详解的更多相关文章
- Spring Boot的启动器Starter详解
Spring Boot的启动器Starter详解 作者:chszs,未经博主允许不得转载.经许可的转载需注明作者和博客主页:http://blog.csdn.net/chszs Spring Boot ...
- Spring Boot 之使用 Json 详解
Spring Boot 之使用 Json 详解 简介 Spring Boot 支持的 Json 库 Spring Web 中的序列化.反序列化 指定类的 Json 序列化.反序列化 @JsonTest ...
- Spring Boot(八):RabbitMQ详解
Spring Boot(八):RabbitMQ详解 RabbitMQ 即一个消息队列,主要是用来实现应用程序的异步和解耦,同时也能起到消息缓冲,消息分发的作用. 消息中间件在互联网公司的使用中越来越多 ...
- Spring boot注解(annotation)含义详解
Spring boot注解(annotation)含义详解 @Service用于标注业务层组件@Controller用于标注控制层组件(如struts中的action)@Repository用于标注数 ...
- Spring Boot Actuator监控使用详解
在企业级应用中,学习了如何进行SpringBoot应用的功能开发,以及如何写单元测试.集成测试等还是不够的.在实际的软件开发中还需要:应用程序的监控和管理.SpringBoot的Actuator模块实 ...
- Spring Boot中@ConditionalOnProperty使用详解
在Spring Boot的自动配置中经常看到@ConditionalOnProperty注解的使用,本篇文章带大家来了解一下该注解的功能. Spring Boot中的使用 在Spring Boot的源 ...
- Spring Boot启动命令参数详解及源码分析
使用过Spring Boot,我们都知道通过java -jar可以快速启动Spring Boot项目.同时,也可以通过在执行jar -jar时传递参数来进行配置.本文带大家系统的了解一下Spring ...
- Spring Boot的SpringApplication类详解
相信使用过Spring Boot的开发人员,都对Spring Boot的核心模块中提供的SpringApplication类不陌生.SpringApplication类的run()方法往往在Sprin ...
- 【转】/etc/grub.conf文件详解
转自:http://leejia.blog.51cto.com/4356849/788902 grub.conf是grub的主配置文件,通过这个配置文件,grub才能找到kernel,系统才能正常启动 ...
随机推荐
- 试图从数据库 ‘UFData_001_2003' 中提取的逻辑页 (1:10720) 属于对象 '0',而非对象 'syscolumns'
数据库可以使用,可以备份,但对备份进行恢复时报错,使用sp_attach_db对两个物理文件进行连接时,报同样错误: 服务器: 消息 605,级别 21,状态 1,行 1 试图从数据库 ‘UFData ...
- hdu 4674 Trip Advisor(缩点+倍增lca)
花了一天半的时间,才把这道题ac= = 确实是道好题,好久没敲这么长的code了,尤其是最后的判定,各种销魂啊~ 题目中给出的条件最值得关注的就是:每个点最多只能在一个环内->原图是由一个个边连 ...
- mysql互为主从复制配置笔记
MySQL-master1:192.168.72.128 MySQL-master2:192.168.72.129 OS版本:CentOS 5.4MySQL版本:5.5.9(主从复制的master和s ...
- 【转】No JVM could be found on your system解决方法
原文网址:http://my.oschina.net/liusicong/blog/324964 在安装android studio时,报错: Error launching android Stud ...
- 【转】定时器、sigevent结构体详解
原文网址:http://blog.163.com/zheng_he_xiang/blog/static/18650532620116311020390/ 最强大的定时器接口来自POSIX时钟系列,其创 ...
- iwpriv工具通过ioctl动态获取相应无线网卡驱动的private_args所有扩展参数
iwpriv工具通过ioctl动态获取相应无线网卡驱动的private_args所有扩展参数 iwpriv是处理下面的wlan_private_args的所有扩展命令,iwpriv的实现上,是这样的, ...
- HDU 1247 Hat’s Words
Hat’s Words Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- switchomega配置
- [Hive - LanguageManual] Statistics in Hive
Statistics in Hive Statistics in Hive Motivation Scope Table and Partition Statistics Column Statist ...
- android 拍照或者图库选择 压缩后 图片 上传
通过拍照或者从相册里选择图片通过压缩并上传时很多应用的常用功能,记录一下实现过程 一:创建个临时文件夹用于保存压缩后需要上传的图片 /** * path:存放图片目录路径 */ private Str ...