          ************ FreeBSD ************************ Remote Console

  Daniel Gerzo

   <danger@FreeBSD.org>

   ******: 43126

   ****** (c) 2008 The FreeBSD Documentation Project

   FreeBSD *** FreeBSD************************

   ***************************************************************************************************._
   ************************************** FreeBSD Project
   ***************************************** '(TM)' *** '(R)'
   ***************._

   2013-11-07 *** gabor.
   ******

   ****************************************** console ************ FreeBSD
   ************._ ****************************** Martin Matuska
   ***************** ****** Pawel Jakub Dawidek ************************._

     ----------------------------------------------------------------------

   ************

   1. ******

   2. ******

   3. ****** - mfsBSD

   4. FreeBSD *********************

   5. ZFS

1. ******

   *************** server hosting provider************************** FreeBSD
   ******************._ ****************************************** Linux(R)
   distribution ***************._

   ********************************* Linux(R) distribution ********
   ************************************ FreeBSD._
   ******************************************** ***************************
   FreeBSD._

   ************************************ FreeBSD ***************** RAID-1 ***
   ZFS ************._

2. ******

   ******************************************************************._
   ********************* FreeBSD ***************(colocation)**************
   *********************************************._

    1. ************ ****** ************************************** server
       hosting ************************************************** LAN
       ***************************** SSH ******************._
       *****************************
       ******************************************************************._
       ****************************************************** FreeBSD._

    2. ***************************************************************
       FreeBSD -- *************************************** ramdisk
       ******************** sysinstall *** FTP mirror *********************
       FreeBSD ************._

    3. *********************************************** ZFS
       *********************._

  2.1. ******

   **********************************************

     * ***************************************** SSH ************._

     * ****** FreeBSD ***************

     * ****************** sysinstall(8)

     * *** FreeBSD ********************* ISO image ***

3. ****** - mfsBSD

   ****** FreeBSD ******************************** FreeBSD ************ image
   ***** ******************************._
   **********************************************************
   ********************************************* console._

   *** mfsBSD *************************************** FreeBSD image ***._
   mfsBSD (************ "mfs" ****** "memory file system")******************
   ********************* ramdisk ***************._
   *************************************************
   ********************************* FreeBSD ************._ mfsBSD
   *************** http://people.freebsd.org/~mm/mfsbsd/**
   ********************************* release ******._

   ***********mfsBSD ********************************
   ***************************._ *****************************************
   mfsBSD ************************._

   ********************* mfsBSD *****************
   ************************************************** mfsBSD script
   **************

 # fetch http://people.freebsd.org/~mm/mfsbsd/mfsbsd-latest.tar.gz
 # tar xvzf mfsbsd-1.0-beta1.tar.gz
 # cd mfsbsd-1.0-beta1/

  3.1. ****** mfsBSD

   ****** mfsBSD ************** *********************************._
   *****************************************************._
   ****************************************************************
   *********************************************************._
   ****************** mfsBSD ******************************************._

   ****************************** root ******._ ******************
   conf/rootpw.conf *********._
   *************************************************************************************************._
   *****************************************************************************._

    3.1.1. ************(conf/interfaces.conf ******)

   ********************************************************************************
   mfsBSD *********************._ mfsBSD ********* script ******************
   MAC ***********************************************************
   conf/interfaces.conf **************

 initconf_interfaces="ext1"
 initconf_mac_ext1="00:00:00:00:00:00"
 initconf_ip_ext1="192.168.0.2"
 initconf_netmask_ext1="255.255.255.0"

   ************ conf/rc.conf ************ defaultrouter *****************

 defaultrouter="192.168.0.1"

    3.1.2. ************(conf/rc.conf ******)

   ***********************************************************************
   conf/rc.conf ***************._ ********************* FreeBSD *********
   rc.conf(5) ************._

   ******************************************** re(4)**************
   conf/rc.conf ***********************

 defaultrouter="192.168.0.1"
 ifconfig_re0="inet 192.168.0.2 netmask 255.255.255.0"

  3.2. ****** mfsBSD image

   ****** mfsBSD image ************************._

   ************ FreeBSD ****************************** ISO image *********
   /cdrom._ ***************************************************** FreeBSD
   7.0-RELEASE ISO._ ****** ISO image ************ /cdrom
   ******************** ********* mdconfig(8)**

 # mdconfig -a -t vnode -u 10 -f 7.0-RELEASE-amd64-disc1.iso
 # mount_cd9660 /dev/md10 /cdrom

   ********************************* mfsBSD image**

 # make BASE=/cdrom/7.0-RELEASE

  ******:

   ********* make ************ mfsBSD ***********************************
   ~/mfsbsd-1.0-beta1/._

  3.3. mfsBSD ******

   ****** mfsBSD image **************
   ************************************************************ Linux(R)
   distribution._ ****************************************** scp**

 # scp disk.img root@192.168.0.2:.

   ********************* mfsBSD image**
   *********************************************(*********)*********._
   ********************************************* sda**
   ***********************************

 # dd if=/root/disk.img of=/dev/sda bs=1m

   ******************** image *************************************** MBR
   ***************************************._ ********* ping(8)
   ******************************************._ ****** ping ***********
   *************** ssh(1) ******************** root
   ******************************._

4. FreeBSD *********************

   ****** mfsBSD ***************************************** ssh(1)
   ************._ *************************** slice ******,_****** gmirror
   ****** RAID-1,_********* sysinstall ********* FreeBSD
   ******************************._

  4.1. ************

   *************************************** FreeBSD************** slice
   ************._
   *******************************************************************************
   ******************************************._ *********************
   sysinstall ********* fdisk(8) ****** bsdlabel(8) *********._

   *********************************._ ********************************

 # dd if=/dev/zero of=/dev/ad0 count=2

   ************************************** slice ************ label._
   ****************** *** sysinstall *****************************
   ************************************************ UNIX(R)
   ************(****** fdisk(8),
   bsdlabel(8))***********************************._ *************** FreeBSD
   Handbook *** ****** FreeBSD
   *****************************************************************************
   RAID-1 ************ ZFS._ ************************ gmirror(8)
   *************** mirrored ************** / (*********), /usr ******
   /var******************************************** zpool(8) ****** ZFS ***
   mirrored ************ ._ ************************** FreeBSD
   ***************************************************** ZFS ************._

   ************************************ slice ******
   label,_*************************** gmirror(8),_*************** mirrored
   ****************** UFS2 **************

 # fdisk -BI /dev/ad0 1
 # fdisk -BI /dev/ad1
 # bsdlabel -wB /dev/ad0s1 2
 # bsdlabel -wB /dev/ad1s1
 # bsdlabel -e /dev/ad0s1 3
 # bsdlabel /dev/ad0s1 > /tmp/bsdlabel.txt && bsdlabel -R /dev/ad1s1 /tmp/bsdlabel.txt 4
 # gmirror label root /dev/ad[01]s1a 5
 # gmirror label var /dev/ad[01]s1d
 # gmirror label usr /dev/ad[01]s1e
 # gmirror label -F swap /dev/ad[01]s1b 6
 # newfs /dev/mirror/root 7
 # newfs /dev/mirror/var
 # newfs /dev/mirror/usr

   1 ****************** slice ******************************************._    
     *********************************************._                          
   2 ****************** label ****** bootstrap ***._                          
   3 ******************************                                           
     label*****************************(partitions) ********* bsdlabel(8)     
     ******._ ***********************a ****** / (*********)** b *** swap** d  
     *** /var** e *** /usr** ***************************** f *** ZFS ******._ 
   4 ************ label *************************************************     
     *************************** label ******************._                   
   5 ************************ gmirror(8)                                      
   6 ***********-F *************** swap ***._ *************** gmirror(8)      
     **************************************                                   
     ***********************************************************._            
   7 *************** mirror ********************* UFS2 ************           

  4.2. ************

   *****************************
   ******************************************************************************
   FreeBSD**
   ****************************************************************************
   sysinstall ********* FreeBSD *****************

 # mount /dev/mirror/root /mnt
 # mkdir /mnt/var /mnt/usr
 # mount /dev/mirror/var /mnt/var
 # mount /dev/mirror/usr /mnt/usr

   *********************************** sysinstall(8)._
   ************************ Custom *********** Options *** Enter._
   *************************** Install Root ******** Space ***************
   /mnt******** Enter ************************************** q
   ********************* Options ******._

  ******:

   ******************************************************* sysinstall
   ****************** FreeBSD._

   ********* Distributions*********************** Minimal ******** Space
   ***._
   ***********************************************************************************************
   ftp ***************._ ************************** Exit ******._

  ******:

   ****** Partition *** Label ********************
   ******************************************._

   *** Media *************** FTP._ *************** mirror **************
   sysinstall ************************._ ********************* Custom
   ******._

   ************** Commit ************************._
   ***************************** sysinstall._

  4.3. ******************

   ****** FreeBSD
   *****************************************************************._
   ***************************************** FreeBSD *********************._

   ****************** chroot(8) ************************************._
   **************

 # chroot /mnt

   *****************************************

     * *** GENERIC kernel ********* /boot/kernel ********

 # cp -Rp /boot/GENERIC/* /boot/kernel

     * ****** /etc/rc.conf, /etc/resolv.conf *** /etc/fstab ******._
       *********************** /etc/rc.conf
       *********************************** sshd ******._ ******** /etc/fstab
       ********************************

 # Device                Mountpoint      FStype  Options         Dump    Pass#
 /dev/mirror/swap        none            swap    sw              0       0
 /dev/mirror/root        /               ufs     rw              1       1
 /dev/mirror/usr         /usr            ufs     rw              2       2
 /dev/mirror/var         /var            ufs     rw              2       2
 /dev/cd0                /cdrom          cd9660  ro,noauto       0       0

     * ****** /boot/loader.conf ***** **************************

 geom_mirror_load="YES"
 zfs_load="YES"

     * *********************************************** ZFS **

 # echo 'zfs_enable="YES"' >> /etc/rc.conf

     * ****** adduser(8) ************************************._ ***********
       ********************************* wheel ********
       ****************************************** root._

     * ***********************************************************._

   *********************************************** reboot(8)
   ******************._

5. ZFS

   *****************************************************._
   ********************* FreeBSD **************
   ********************************* remote console**

   ************************ zpool(8) ************ zfs(8) ******************._
   ZFS ***************************************._ ******** ****** mirrored
   pool**

 # zpool create tank mirror /dev/ad[01]s1f

   ****************************

 # zfs create tank/ports
 # zfs create tank/src
 # zfs set compression=gzip tank/ports
 # zfs set compression=on tank/src
 # zfs set mountpoint=/usr/ports tank/ports
 # zfs set mountpoint=/usr/src tank/src

   ************************._ ****** FreeBSD ****** ZFS
   ******************************** FreeBSD Wiki ****** ZFS ************._
