How to install GRUB2 into flash on FreeBSD

1. Setup GRUB package
gy# cd /usr/ports/sysinstall/grub2
gy# make install clean

2. fdisk&newfs three partition in a flash as follows.
da0
da0s1
da0s2
da0s3

gy# newfs /dev/da0s3

3. Create folder "/boot/grub"
gy# mkdir /mnt/da0
gy# mount /dev/da0s3d /mnt/da0

// gy# mkdir /mnt//boot
// gy# mkdir /mnt/boot/grub

4. install GRUB2 into da0
// cp -r /boot/grub/* /mnt/boot/grub
// copy
gy# grub-install --root-directory=/mnt/da0 /dev/da0  
or
gy# grub-install --modules=ufs2 /dev/da0
gy# grub-mkconfig -o /mnt/da0/boot/grub/grub.cfg
//gy# grub-setup /dev/da0





Note that. please type as follows command if show of grub rescue >
grub rescue>set root=hd0,2,d
grub rescue>prefix=(hd0,2,d)/boot/grub
grub rescue>insmod normal
grub rescue>normal

虹光大成就-密教灌頂(一)