- 论坛徽章:
- 0
|
关于grub的问题
If you have installed DOS (or Windows) on a non-first hard disk, you
have to use the disk swapping technique, because that OS cannot boot
from any disks but the first one. The workaround used in GRUB is the
command `map' (*note map: , like this:
grub>; map (hd0) (hd1)
grub>; map (hd1) (hd0)
This performs a "virtual" swap between your first and second hard
drive.
*Caution:* This is effective only if DOS (or Windows) uses BIOS to
access the swapped disks. If that OS uses a special driver for the
disks, this probably won't work.
Another problem arises if you installed more than one set of
DOS/Windows onto one disk, because they could be confused if there are
more than one primary partitions for DOS/Windows. Certainly you should
avoid doing this, but there is a solution if you do want to do so. Use
the partition hiding/unhiding technique.
If GRUB "hide"s a DOS (or Windows) partition (*note hide: , DOS (or
Windows) will ignore the partition. If GRUB "unhide"s a DOS (or
Windows) partition (*note unhide: , DOS (or Windows) will detect the
partition. Thus, if you have installed DOS (or Windows) on the first
and the second partition of the first hard disk, and you want to boot
the copy on the first partition, do the following:
grub>; unhide (hd0,0)
grub>; hide (hd0,1)
grub>; rootnoverify (hd0,0)
grub>; chainloader +1
grub>; makeactive
grub>; boot |
|