博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
GRUB引导程序参数
阅读量:2339 次
发布时间:2019-05-10

本文共 2100 字,大约阅读时间需要 7 分钟。

GRUB(GRand Unified Bootloader)是一个默认安装的功能强大的引导装载程序。引导装载程序是计算机启动时所运行的第一个软件,它的责任是载入操作系统内核软件并把控制转交给它,然后,内核软件再初始化剩余的操作系统。GRUB能够通过连锁载入另一个引导装载程序来载入多种操作系统,包括DOS,Windows和 Linux等。

GRUB配置文件

GRUB的配置文件位于/boot/grub/下,文件名为grub.conf,在/etc/下有一个同名的连接文件。内容如下:

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/hda2

# initrd /initrd-version.img

#boot=/dev/hda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title GreatTurbo Enterprise Server (2.6.18-8.2PAE)

root (hd0,0)

kernel /vmlinuz-2.6.18-8.2PAE ro root=LABEL=/1 rhgb quiet

initrd /initrd-2.6.18-8.2PAE.img

title GreatTurbo Enterprise Server-base (2.6.18-8.2)

root (hd0,0)

kernel /vmlinuz-2.6.18-8.2 ro root=LABEL=/1 rhgb quiet

initrd /initrd-2.6.18-8.2.img

title GreatTurbo Enterprise Server-xen (2.6.18-8.2xen)

root (hd0,0)

kernel /xen.gz-2.6.18-8.2

module /vmlinuz-2.6.18-8.2xen ro root=LABEL=/1 rhgb quiet

module /initrd-2.6.18-8.2xen.img

title GreatTurbo Enterprise Server (2.6.9-8.11)

root (hd0,4)

kernel /boot/vmlinuz-2.6.9-8.11 ro root=LABEL=/ acpi=off noapic

initrd /boot/initrd-2.6.9-8.11.imggrub.conf各配置选项介绍:

default=0在启动菜单超时(timeout)后,加载的默认系统标题(title)。这里0指的是第一个标题(title),依次类推。

timeout=5在启动菜单出现后,多长时间不进行干预就加载默认(default)的系统标题(title)。单位是秒。

splashimage=(hd0,0)/grub/splash.xpm.gz指定GRUB引导时,所使用的splashimage文件的位置。默认安装在/boot/grub/下。

hiddenmenu在超时(timeout)前,如果我们不对GRUB进行干预,我们看不到GRUB菜单。要显示标准GRUB菜单,按ESC键。

title GreatTurbo Enterprise Server (2.6.18-8.2PAE)我们指定的所要启动的系统的标题,可以随意写,不过建议要写有意义的标题。

root (hd0,0)配置GRUB根分区,这里的root指的是/boot分区。hd0,表示系统中的第一个硬盘;

(hd0,0)逗号后面的0表示的是/boot分区所在的顺序,0表示系统上的第一个分区,依次类推。

kernel /vmlinuz-2.6.18-8.2 ro root=LABEL=/1 rhgb quietkernel,指定引导操作系统时所要加载的内核文件;ro root=LABEL=/1,以只读的方式挂载系统的根分区(其LABEL=/1);

initrd /initrd-2.6.18-8.2PAE.img指定引导时的初始RAMDISK文件,它包含有启动时kernel所需的设备驱动模块。

----------------------------------

多系统的PC想要修改开机默认的启动顺序可以修改/boot/grub/grub.conf文件.

有的系统没有这个文件,那么就修改/boot/grub/menu.lst

转载地址:http://xqwvb.baihongyu.com/

你可能感兴趣的文章
【剑指offer python】面试题8:旋转数组的最小数字
查看>>
【剑指offer python】面试题9:斐波那契数列
查看>>
【剑指offer python】面试题11:数值的整数次方
查看>>
【剑指offer python】面试题14:调整数组顺序使奇数位于偶数前面
查看>>
【剑指offer python】面试题15:链表中倒数第k个结点
查看>>
【剑指offer python】面试题19:二叉树的镜像
查看>>
【剑指offer python】数字在排序数组中出现的次数
查看>>
【剑指offer python】二叉树的深度
查看>>
【剑指offer python】判断平衡二叉树
查看>>
【剑指offer python】数组中只出现一次的数字
查看>>
【剑指offer python】和为S的两个数字
查看>>
【剑指offer python】左旋转字符串
查看>>
【剑指offer python】翻转单词顺序列
查看>>
【剑指offer python】链表中环的入口结点
查看>>
Linux上创建虚拟环境 Virtualenv
查看>>
Linux非root用户在服务器安装Anaconda
查看>>
Linux非root用户在服务器安装cuda8.0
查看>>
Linux非root用户服务器安装cudnn5.1
查看>>
mac给ps安装字体包
查看>>
MAC 查看已连接的WI-FI密码
查看>>