2.安装windows,或ghost to this partition。(最好是ghost,这样不会抢linux的启动区域。那样的话就改的就是windows下的文件。
3.更改linux或windows下的grub.
以liunx(ubuntu)为例:
a. 更改"/etc/fstab"文件以挂载windows下的硬盘
(如果已经更改过磁盘,如,格式化,uuid会改变,所以直接用盘符,如/dev/sda4)[code]# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/sda1
UUID=859e7d90-2c50-4d50-ba5e-f906500c9207 / reiserfs notail 0 1
# /dev/sda3
UUID=2c2b11f7-c905-486d-8030-d2891e4ed786 /space jfs defaults 0 2
# /dev/sda4
/dev/sda4 /winxp ntfs-3g defaults,locale=zh_CN.utf8,user,auto,uid=1000,rw 0 2
# /dev/sda2
UUID=b83bc168-c030-4f86-8e19-4ba571cf85ae none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0 [/code]更改linux的grub文件,如下
路径/boot/grub/menu.lst
更改DEBIAN AUTOMAGIC KERNELS LIST代码[code]title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=859e7d90-2c50-4d50-ba5e-f906500c9207 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=859e7d90-2c50-4d50-ba5e-f906500c9207 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
title Windows XP
root (hd0,3)
makeactive
chainloader +1[/code]done!