Carey【胭脂扣】

Linux启动管理:grub

1.grub中分区表示

Linux 中 /dev/sda1   在grub中为   hd0,0    代表第一个硬盘的第一个分区

Linux中 /dev/sdb3是扩展分区     在grub中为   hd1,2   表示在第二块硬盘的第3个分区 

Linux中 /dev/sdb5是扩展分区中的逻辑分区  在grub中为 hd1,3   因为上述逻辑分区是第3个分区 那么后面的Linux序号/dev/sdb4就不会存在 逻辑分区不可能小于5  所以这里是第四个分区

 

2.grub配置文件:

 1 [root@localhostA1 lib]# vim /boot/grub/grub.conf 
 2 # grub.conf generated by anaconda
 3 #
 4 # Note that you do not have to rerun grub after making changes to this file
 5 # NOTICE:  You have a /boot partition.  This means that
 6 #          all kernel and initrd paths are relative to /boot/, eg.
 7 #          root (hd0,0)
 8 #          kernel /vmlinuz-version ro root=/dev/sda5
 9 #          initrd /initrd-[generic-]version.img
10 #boot=/dev/sda
11 default=0     @选择进入的那个系统
12 timeout=5     @超时时间,开机时启动进入那种系统的默认等待时间
13 splashimage=(hd0,0)/grub/splash.xpm.gz   @指定grub启动时的背景图像文件的保存位置:这里说明了在第一个硬盘的第一个分区中调用grub 其实第一个硬盘的第一个分区就是boot
14 hiddenmenu    @启动界面隐藏
15 title CentOS (2.6.32-358.el6.x86_64)  @启动界面显示的文字 可以修改的
16         root (hd0,0)   @启动的主目录的位置
17         kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=32af0552-c200-46ac-b1   @加载内核  还有一些设置 例如语言设置LANG为中文简体等等
18 be-07101977d777 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=aut
19 o LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
20         initrd /initramfs-2.6.32-358.el6.x86_64.img   @加载模拟内核镜像的

 

posted @ 2015-07-01 01:19  胭脂筘  阅读(637)  评论(0编辑  收藏  举报