1、先安装现代冬日,再安装mgdhl/p 2,用CentOS安装盘启动,出现启动选项时使用linux rescue
在外壳程序下运行
grub-install /dev/sda
修复CentOS的grub,然后reboot
3 .进入吵蜂/p挂载Ubuntu的分区
mount /dev/sda6 /media
#
# DO NOT EDIT THIS FILE
#
# itisautomaticallygeneratedby/usr/sbin/gru B- mkconfigusingtemplates
# from/etc/grub.dandsettingsfrom/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---- set1 a2b 230 e-d172-4b 48-8395-72a 33 ebce 462
ifloadfont/usr/share/grub/unicode.pf2; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm; then true; else
# forbackwardcompatibilitywithversionsofterminal.modthatdon ' t
# understand terminal_output
终端gf xterm
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' {
记录故障=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2 ) )。
search---- no-floppy---- fs-uuid---- set1 a2b 230 e-d172-4b 48-8395-72a 33 ebce 462
Linux/boot/vmlinuz-2.6.31-14-generic root=uuid=1a2b 230 e-d172-4b 48-8395-72a 33 ebce 462 roquietsplash
}
menuentry 'Ubuntu,Linux2.6. 31-14-generic (恢复模式) ) {
记录故障=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2 ) )。
search---- no-floppy---- fs-uuid---- set1 a2b 230 e-d172-4b 48-8395-72a 33 ebce 462
Linux/boot/vmlinuz-2.6.31-14-generic root=uuid=1a2b 230 e-d172-4b 48-8395-72a 33 ebce 462 ro single
}
### END /etc/grub.d/10_linux ###
复制以下内容并带上uuid
Linux/boot/vmlinuz-2.6.31-14-generic root=uuid=1a2b 230 e-d172-4b 48-8395-72a 33 ebce 462 roquietsplash
编辑CentOS的grub.conf,将复制的内容添加到grub.conf中,然后进行以下修改
title Ubuntu 9.10
根(hd0,0 ) )。
在cp Ubuntu下的vmlinuz和initrd到CentOS引导下
CP/media/boot/vmlinuz-2.6.31-14-generic/boot /
CP/media/boot/initrd.img-2.6.31-14-generic/boot /