How it works
1.先装windows再装linux,linux并不会破坏windows的启动;
当你先安装linux再装windows的话,windows会把MBR重写,linux的grub会被破坏,如果想修复,就要使用linux的引导盘才能进入linux rescue 模式。
2.这时就启动光盘进入Linux rescue模式
然后运行fdisk -l 查看/boot位于哪个分区
运行grub,进入
grub> find /boot/grub/stage1
grub>root (hd0,1) 这是/boot所在的分区
grub>setup (hd0) 把grub写到MBR上
运行成功后,就修改/boot/grub/grub.conf
在最后添加
title winxp rootnoverify (hd0,1) 用于指定Windows所在的分区 chainloader +1 用于加载Windows的boot loader
然后重启就可以看到grub界面多了个启动项。
Notice:Windows必须安装在主分区上,而linux可以安装在主分区或逻辑分区 |
Environment:
Install Red Hat Enterprise Linux first on the disk;then install Windows server 2003
Procedure:
Step1:Install Linux operating system
Partition:Leave a PV forced to be primary partition for Windows operating system.
Then Red Hat Enterprise Server is installed successfully.
Step2:Install Windows OS
Prepare a Windows Sever 2003 cd and boot from cd driver.
Windows Server 2003 is installed successfully.
Step3:Fix Grub for linux and change the file /etc/grub.conf
Insert cd-rom and enter rescue mode(choose continue)
#chroot /mnt/sysimage
#fdisk -l %find that /boot is on /dev/sda1
#vi /etc/grub.conf %add menu for windows
Enter grub shell and fix it
grub>root (hda0,0)
grub>setup(hda0)
Then reboot and find the menu both for windows and linux.
Notice:Be aware that there is a tab between commands of the configuration of Windows.
阅读(710) | 评论(0) | 转发(0) |