freeBSD7 boot from zfs

2009-05-13 15:39:09来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


   
      FreeBSD root on ZFS
      How to install FreeBSD on a ZFS system 'root' partition
      Yarema
      Written: 2007-12-20, Last Modified: 2008-09-15
      Version: 0.1
   
    Problem
   
   
ZFS

    the breakthrough file system in FreeBSD 7 (ported from Sun's
   
Solaris 10 Operating System
)
    delivers virtually unlimited capacity, provable data integrity,
    and near-zero administration. However FreeBSD's
   
sysinstall(8)
    does not yet support installing the system onto anything more exotic
    than a commonly used UFS partition scheme. Furthermore FreeBSD's boot
   
loader(8)
    cannot yet load the kernel and modules from ZFS.
   
Solutions
   
    Install FreeBSD onto a bootable USB flash drive along with a copy of
    the
zfsboot
script on it.
    Boot from the USB flash drive and run the
zfsboot
script.
    This
usbinstall
script can be used to
    prepare the bootable USB drive:
   
#!/bin/sh
#
# HOWTO/script to create a USB mounted bootable "root" install for
# bootstrapping a ZFS-on-root and the like.
#
# -- Yarema
#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#
program=`basename $0`
if [ -f "$0.rc" ];then
  . "$0.rc"
fi
: ${KMEMSIZE:="512M"}
: ${RELEASE:="7.0-RELEASE"}
: ${DESTDIR:="/media"}
if [ $# -lt 1 ]; then
  echo "Usage:        ${program}  "
  echo "        where  is the path to the distribution"
  echo "        files, usually an .iso mounted on /dist"
  echo "        and  is usually da0"
  exit 1
fi
dist="$1"
vdev="$2"
#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#
ask() {
  local question default answer
  question=$1
  default=$2
  read -p "${question} [${default}]? " answer
  if [ -z "${answer}" ]; then
    answer=${default}
  fi
  echo ${answer}
}
yesno() {
  local question default answer
  question=$1
  default=$2

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD sysctl.conf 配置详解及最佳方案

下一篇:FreeBSD7 boot ZFS存储的规划