- iso イメージから FreeBSD をインストールする
<VBOX HARDDISK 1.0> at scbus0 target 0 lun 0 (ada0,pass0)
<VBOX HARDDISK 1.0> at scbus0 target 1 lun 0 (ada1,pass1)
※このメモでは仮に ada0 に FreeBSD をインストールしたものとする
root@freebsd:~ # gpart show ada0
=> 34 41942973 ada0 GPT (20G)
34 1024 1 freebsd-boot (512K)
1058 39844864 2 freebsd-ufs (19G)
39845922 2097084 3 freebsd-swap (1.0G)
- kldload geom_mirror
- echo 'geom_mirror_load="YES"' >> /boot/loader.conf
- gpart backup ada0 | gpart restore -F /dev/ada1
- gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1
- gmirror label -vb round-robin gm0p1 /dev/ada0p1
- gmirror label -vb round-robin gm0p2 /dev/ada1p2
- gmirror label -vb round-robin gm0p3 /dev/ada0p3
- dd if=/dev/ada0p2 of=mirror/gm0p2 bs=1G
# Device Mountpoint FStype Options Dump Pass#
/dev/ada0p2 / ufs rw 1 1
/dev/ada0p3 none swap sw 0 0
- reboot
- gmirror insert gm0p1 /dev/ada1p1
- gmirror insert gm0p2 /dev/ada0p2
- gmirror insert gm0p3 /dev/ada1p3