Chinaunix首页 | 论坛 | 博客
  • 博客访问: 482214
  • 博文数量: 82
  • 博客积分: 3003
  • 博客等级: 中校
  • 技术积分: 1285
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-11 15:27
文章分类

全部博文(82)

文章存档

2011年(1)

2010年(5)

2009年(63)

2008年(13)

我的朋友

分类:

2009-10-10 00:06:44

 

How it works

1.先装windows再装linuxlinux并不会破坏windows的启动;
当你先安装linux再装windows的话,windows会把MBR重写,linuxgrub会被破坏,如果想修复,就要使用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
用于加载Windowsboot 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.


阅读(651) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~