|
发表于 2003-9-26 09:34:29
|
显示全部楼层
我没试过,现在也没条件试,下面的文章你看一下,或许就明白了:
===============================================================
Inspirion disk configuration :
====================
1 disk (hd0) : 1 partition (hd0,0) NTFS with Windows NT 4.0 , 2nd FAT, 3rd NTFS
1 disk (hd0) : 4th slice (hd0,3,a) FreeBSD 4.5-STABLE
Getting Grub :
==========
As a package
prompt# pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/p...grub-0.5.96.tgz
From ports
As a root:
prompt# cd /usr/ports/sysutils/grub
prompt# make install clean
Grub Configuration :
===============
Copy configuration files:
prompt# mkdir /boot/grub
prompt# cd /boot/grub
prompt# cp /usr/local/share/grub/i386-freebsd/* .
Create menu file
============
Grub configuration: /boot/grub/menu.lst
default 0 # OS defaut boot, FreeBSD
timeout 5 # timeout
# FreeBSD: choice 0
title FreeBSD #
root (hd0,3,a) # 1 disk, 4th slice, disklabel a (/)
kernel /boot/loader # loader for FreeBSD
# Windows NT: choice 1
title Windows NT 4.0 #
root (hd0,0) # 1st disk, 1st partition
makeactive # Rendre la partition active
chainloader +1 # Utiliser le boot de Windows
Grub installation as the MBR
====================
1.Grub on bootable floppy.
-------------------------------
This will make a bootable floppy for the next stage:
prompt# cd /boot/grub
prompt# dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 1.181812 secs (433 bytes/sec)
prompt# dd if=stage2 of=/dev/fd0 bs=512 seek=1
155+1 records in
155+0 records out
79360 bytes transferred in 3.687975 secs (21519 bytes/sec)
2.Installation as MBR
--------------------------
Boot from the floppy from the previous step or run grub from the FreeBSD prompt:
prompt# grub
Probing devices to guess BIOS drives. This may take a long time.
GRUB version 0.5.96 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,3,a) [ use (fd0) to make floppy with Grub menu]
Filesystem type is ffs, partition type 0xa5
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/ffs_stage1_5" exists... yes
Running "embed /boot/grub/ffs_stage1_5 (hd0)"... 14 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 d (hd0) (hd0)1+14 p (hd0,3,a)/boot/grub/stage2"... succeeded
Done.
grub> quit
Reboot
============================================================== |
|