- 论坛徽章:
- 0
|
新添一块儿硬盘给Linux使用,在旧的硬盘上安装了windows,在BIOS中设置新硬盘为第一个硬盘,因此计算机默认从新硬盘启动,仍然使用grub作为loader。
由于windows安装在第二块硬盘上,使用以前的方法来引导windows的时候并不能凑效:
root (hd1,0)chainloader +1
查看了grub的文档,发现要引导DOS/Windows等系统时,如果其不在第一块硬盘上,还需要做一些特殊的设置,比如我的windows安装在第二块硬盘的第一个主分区上,我要使用grub来引导的话需要使用这样的grub命令:
map (hd0) (hd1)map (hd1) (hd0)root (hd1,0)chainloader (hd1,0)+1
可以看出这两者的不同了吧?
在这里使用了map命令,map命令用来把一个硬盘设备映射为另一个,官方文档中是这样写的:
Map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive.
chainloader的使用也有些不同,在这里要显式的指出windows所在的分区。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/23409/showart_216480.html |
|