北京赛车官网下注赔率∕pk10投注网注册平台∕北京赛车pk10信用盘开户∕北京pk10手机app会员登录

做您身边的电脑顾问

注册

热点: Ubuntu 安装drcom报错error的处 Chrome在Ubuntu下使用ramdisk的

您现在的位置是:主页 > pk10投注网 > 北京pk10手机app > 应用技巧 >

CentOS Ubuntu双系统引导的grub设置

时间:2011-01-05 16:44   来源:未知   复制分享 共有评论(0)条

点击:

  1,先安装CentOS,再安装Ubuntu.

  2,用CentOS安装盘启动,在出现启动选项的时候用linux rescue

  在shell下执行

  chroot /mnt/sysimage

  grub-install /dev/sda

  修复CentOS的grub,然后reboot

  3.进入CentOS

  挂接Ubuntu的分区

  mount /dev/sda6 /media

  vi /media/boot/grub/grub.cfg

  #

  # DO NOT EDIT THIS FILE

  #

  # It is automatically generated by /usr/sbin/grub-mkconfig using templates

  # from /etc/grub.d and settings from /etc/default/grub

  #

  ### BEGIN /etc/grub.d/00_header ###

  if [ -s /boot/grub/grubenv ]; then

  have_grubenv=true

  load_env

  fi

  set default="0"

  if [ ${prev_saved_entry} ]; then

  saved_entry=${prev_saved_entry}

  save_env saved_entry

  prev_saved_entry=

  save_env prev_saved_entry

  fi

  insmod ext2

  set root=(hd0,2)

  search --no-floppy --fs-uuid --set 1a2b230e-d172-4b48-8395-72a33ebce462

  if loadfont /usr/share/grub/unicode.pf2 ; then

  set gfxmode=640x480

  insmod gfxterm

  insmod vbe

  if terminal_output gfxterm ; then true ; else

  # For backward compatibility with versions of terminal.mod that don't

  # understand terminal_output

  terminal gfxterm

  fi

  fi

  if [ ${recordfail} = 1 ]; then

  set timeout=-1

  else

  set timeout=10

  fi

  ### END /etc/grub.d/00_header ###

  ### BEGIN /etc/grub.d/05_debian_theme ###

  set menu_color_normal=white/black

  set menu_color_highlight=black/white

  ### END /etc/grub.d/05_debian_theme ###

  ### BEGIN /etc/grub.d/10_linux ###

  menuentry "Ubuntu, Linux 2.6.31-14-generic" {

  recordfail=1

  if [ -n ${have_grubenv} ]; then save_env recordfail; fi

  set quiet=1

  insmod ext2

  set root=(hd0,2)

  search --no-floppy --fs-uuid --set 1a2b230e-d172-4b48-8395-72a33ebce462

  linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1a2b230e-d172-4b48-8395-72a33ebce462 ro quiet splash

  initrd /boot/initrd.img-2.6.31-14-generic

  }

  menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {

  recordfail=1

  if [ -n ${have_grubenv} ]; then save_env recordfail; fi

  insmod ext2

  set root=(hd0,2)

  search --no-floppy --fs-uuid --set 1a2b230e-d172-4b48-8395-72a33ebce462

  linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1a2b230e-d172-4b48-8395-72a33ebce462 ro single

  initrd /boot/initrd.img-2.6.31-14-generic

  }

  ### END /etc/grub.d/10_linux ###

  www.linuxidc.com

  复制下面内容并带上uuid

  linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1a2b230e-d172-4b48-8395-72a33ebce462 ro quiet splash

  initrd /boot/initrd.img-2.6.31-14-generic

  编辑CentOS的grub.conf,把复制的内容加入到grub.conf中,并修改如下所示

  vi /boot/grub/grub.conf

  title Ubuntu 9.10

  root (hd0,0)

  kernel /vmlinuz-2.6.31-14-generic root=UUID=b2a79ba9-abbc-45dd-810d-2052cd782aea ro quiet splash

  initrd /initrd.img-2.6.31-14-generic

  cp Ubuntu 下的vmlinuz 及initrd到CentOS的boot下面

  cp /media/boot/vmlinuz-2.6.31-14-generic /boot/

  cp /media/boot/initrd.img-2.6.31-14-generic /boot/

(责任编辑:狗扑源码社区)
顶一下
(0)
0%
踩一下
(0)
0%
发表评论
发布言论时请自觉遵守互联网相关的政策法规!
评价:
用户名: 验证码:点击我更换图片