config root man

Current Path : /usr/src/tools/tools/nanobsd/rescue/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/src/tools/tools/nanobsd/rescue/merge.sh

#!/bin/sh
# $FreeBSD: release/9.1.0/tools/tools/nanobsd/rescue/merge.sh 219823 2011-03-21 13:23:25Z mr $

D1="/usr/obj/nanobsd.rescue_i386"
D2="/usr/obj/nanobsd.rescue_amd64"

MD=`mdconfig -a -t vnode -f ${D1}/_.disk.full`

dd if=${D2}/_.disk.image of=/dev/${MD}s2 bs=128k
tunefs -L rescues2a /dev/${MD}s2a
mount /dev/${MD}s2a ${D1}/_.mnt

sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/conf/base/etc/fstab
sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/etc/fstab

umount ${D1}/_.mnt

mdconfig -d -u ${MD}

Man Man