ceph存储 centos系统grub引导多系统示例

来源:互联网 发布:产品可靠性 仿真软件 编辑:程序博客网 时间:2024/05/22 01:27
在一台服务器上安装centos双系统,一个6.4一个6.3,安装完毕需要更改grub引导,针对这个问题做一下总结,与各位分享。
/etc和/boot/grub下都存在grub.conf文件,/etc下的grub文件是/boot/grub下grub文件的硬链接,所以改任何一个都可以。

点击(此处)折叠或打开

  1. # grub.conf generated by anaconda
  2. #
  3. # Note that you do not have to rerun grub after making changesto this file
  4. # NOTICE: Youdo not have a /boot partition. This means that
  5. #          all kernel and initrd paths are relative to /, eg.
  6. #          root (hd2,0)
  7. #          kernel /boot/vmlinuz-version ro root=/dev/sdb1
  8. #          initrd /boot/initrd-[generic-]version.img
  9. #boot=/dev/sdd
  10. default=2
  11. timeout=5
  12. #centos6.4
  13. splashimage=(hd2,0)/boot/grub/splash.xpm.gz
  14. #centos6.3
  15. #splashimage=(hd0,0)/grub/splash.xpm.gz
  16. hiddenmenu
  17. title CentOS (3.10.58)
  18.     root (hd2,0)
  19.     kernel /boot/vmlinuz-3.10.58 ro root=UUID=eefa4f2d-a3ca-47a1-a292-40a68241c66b rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
  20.     initrd /boot/initramfs-3.10.58.img
  21. title CentOS (2.6.32)
  22.     root (hd2,0)
  23.     kernel /boot/vmlinuz-2.6.32 ro root=UUID=eefa4f2d-a3ca-47a1-a292-40a68241c66b rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
  24.     initrd /boot/initramfs-2.6.32.img
  25. title CentOS (2.6.32-358.el6.x86_64)
  26.     root (hd2,0)
  27.     kernel /boot/vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=eefa4f2d-a3ca-47a1-a292-40a68241c66b rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
  28.     initrd /boot/initramfs-2.6.32-358.el6.x86_64.img
  29. title CentOS (2.6.32-279.el6.x86_64)
  30.     root (hd0,0)
  31.     kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/vg_centos6-lv_root nomodeset rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_centos6/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=1024M rd_LVM_LV=vg_centos6/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
  32.     initrd /initramfs-2.6.32-279.el6.x86_64.img
default=2 : 制定启动的内核,从编号0开始
splashimage
=(hd2,0)/boot/grub/splash.xpm.
gz  
            \\
CentOS 在启动的时候背景是有色彩变化的,就是这个文件提供的背景图示
root (hd0,0
): 
           
root :代表的是『核心文件放置的那个 partition 而不是根目录』喔!不要搞错了!
            (hd0,0): 硬盘代号以小括号 ( ) 包起来;
                      硬盘以 hd 表示,后面会接一组数字;
                      以『搜寻顺序』做为硬盘的编号,而不是依照硬盘排线的排序!(这个重要!)
                      第一个搜寻到的硬盘为 0 号,第二个为 1 号,以此类推;
                      每颗硬盘的第一个 partition 代号为 0 ,依序类推。
上面标红的部分建议像上面几个title一样使用硬盘的uuid,防止因磁盘设备(sda,sdb,sdc….)变化印发的问题。
            (注:获取uuid的方法:ls -la /dev/disk/by-uuid)
0 0
原创粉丝点击