@cpedetta
Crea un hilo nuevo en Dudas y Pedidos Generales, este post no debe ser revivido.
Crea un hilo nuevo en Dudas y Pedidos Generales, este post no debe ser revivido.

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menúnmap -p80 x.x.x.xCitar...queda reservada por mas que no tenga la maquina prendida?
CitarEl Nat "no se abre": se habilita o no
Citar*.- NAT Abierta: tienes el mejor tipo de NAT. Podrás crear y hospedar partidas y conectarte a otras creadas por otros usuarios sin importar qué tipo de NAT tengan estos.
*.- NAT moderada: podrás jugar con algunos usuarios que tengan el mismo nivel de NAT que tú, pero en algunas ocasiones no te dejarán ser el anfitrión de la partida.
*.- NAT estricta: tu única opción es jugar a partidas multijugador creadas por jugadores con NAT abierta. No podrás ser anfitrión de la partida nunca.
*.- NAT no disponible: es el peor de los casos. No podrás entrar en salas de grupo de charla ni conectarte a muchos de los juegos que ofrecen multijugador en Xbox Live.

git clone https://github.com/mmatuska/mfsbsd.git

dd if=mfsbsd-se-13.1-RELEASE-amd64.img of=/dev/da0 bs=30m status=progress && fsync mfsbsd-se-13.1-RELEASE-amd64.img# Estamos en el directorio de trabajo, pero es necesario tener estos archivos en una carpeta aparte
mkdir freebsd-dist
ftp -o freebsd-dist/kernel.txz ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.1-RELEASE/kernel.txz
ftp -o freebsd-dist/base.txz ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.1-RELEASE/base.txz$ ls tools/
destroygeom do_gpt.sh motd packages-mini.sample prunelist roothack
doFS.sh kern_exclude motd.se packages.sample prunelist.9 zfsinstall
$ ls conf/
authorized_keys.sample hosts.sample loader.conf.sample rc.local.sample ttys.sample
boot.config.sample interfaces.conf.sample rc.conf.sample resolv.conf.sample# $Id$
#
# This is the /boot/loader.conf of your image
#
# Custom mfsbsd variables
#
# Set all auto-detected interfaces to DHCP
#mfsbsd.autodhcp="YES"
#
# Define a new root password
#mfsbsd.rootpw="foobar"
#
# Alternatively define a root password hash like in master.passwd
# NOTICE: replace '$' characters with '%'
#mfsbsd.rootpwhash=""
#
# Add additional nameservers here
#mfsbsd.nameservers="192.168.1.1 192.168.1.2"
#
# Change system hostname
#mfsbsd.hostname="mfsbsd"
#
# List of interfaces to be set
#mfsbsd.interfaces="em0 em1"
#
# Individual configuration of each interface
#mfsbsd.ifconfig_em0="DHCP"
#mfsbsd.ifconfig_em1="DHCP"
#
# List of special interfaces to be created
#mfsbsd.cloned_interfaces=""
#
# List of mac_interfaces (see interfaces.conf.sample)
#mfsbsd.mac_interfaces="eth0"
#mfsbsd.ifconfig_eth0_mac="xx:xx:xx:xx:xx:xx"
#mfsbsd.ifconfig_eth0="inet 192.168.1.10/24"
#
# Default router
#mfsbsd.defaultrouter="192.168.1.1"
#
# List of static routes and their definitions
#mfsbsd.static_routes="r1 r2"
#mfsbsd.route_r1="-net 192.168.2 192.168.1.1"
#mfsbsd.route_r2="-net 192.168.3 192.168.1.1"
#
# Do not change anything here until you know what you are doing
#
mfs_load="YES"
mfs_type="mfs_root"
mfs_name="/mfsroot"
ahci_load="YES"
vfs.root.mountfrom="ufs:/dev/md0"
mfsbsd.autodhcp="YES"cp conf/loader.conf.sample conf/loader.confmfsbsd.rootpw="this is a very secure password.12345"mfsbsd.rootpwhash="%6%0DMGate/WoCrttXO%WQbsFPYr1LOjJlVzjt/PbP929J130YsAbaEfMm.FGwKsKQvC4xjJSrcM3YhHgoz/LOveMVToCZ3Jmghd/cJlw0"mfsbsd.nameservers="208.67.222.222 208.67.220.220"mfsbsd.autodhcp="NO"mfsbsd.interfaces="em0 em1"
mfsbsd.ifconfig_em0="DHCP"
mfsbsd.ifconfig_em1="DHCP"mfsbsd.mac_interfaces="ext1"
mfsbsd.ifconfig_ext1_mac="64:74:78:64:66:2E"
mfsbsd.ifconfig_ext1="inet 192.168.1.10/24"mfsbsd.defaultrouter="192.168.1.1"cat ~/.ssh/id_ed25519.pub > conf/authorized_keysecho \-c > conf/boot.configecho screen > tools/packagescat <<EOF >> tools/packages
fusefs-sshfs
smartmontools
rsync
EOF# make BASE=freebsd-dist# make iso BASE=freebsd-dist# make tar BASE=freebsd-dist# make gce BASE=freebsd-dist# make SE=1 BASE=freebsd-dist# make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1#
# User-defined variables
#
BASE?= /cdrom/usr/freebsd-dist
KERNCONF?= GENERIC
MFSROOT_FREE_INODES?= 10%
MFSROOT_FREE_BLOCKS?= 10%
MFSROOT_MAXSIZE?= 120m
ROOTPW_HASH?= $$6$$051DdQA7fTvLymkY$$Z5f6snVFQJKugWmGi8y0motBNaKn9em0y2K0ZsJMku3v9gkiYh8M.OTIIie3RvHpzT6udumtZUtc0kXwJcCMR1
# If you want to build your own kernel and make you own world, you need to set
# -DCUSTOM or CUSTOM=1
#
# To make buildworld use
# -DCUSTOM -DBUILDWORLD or CUSTOM=1 BUILDWORLD=1
#
# To make buildkernel use
# -DCUSTOM -DBUILDKERNEL or CUSTOM=1 BUILDKERNEL=1
#
# For all of this use
# -DCUSTOM -DBUILDWORLD -DBUILDKERNEL or CUSTOM=1 BUILDKERNEL=1 BUILDWORLD=1
#
#
# Paths
#
SRC_DIR?= /usr/src
CFGDIR?= conf
SCRIPTSDIR?= scripts
PACKAGESDIR?= packages
CUSTOMFILESDIR?= customfiles
CUSTOMSCRIPTSDIR?= customscripts
TOOLSDIR?= tools
PRUNELIST?= ${TOOLSDIR}/prunelist
KERN_EXCLUDE?= ${TOOLSDIR}/kern_exclude
PKG_STATIC?= /usr/local/sbin/pkg-static
#
# Program defaults
#
MKDIR?= /bin/mkdir -p
CHOWN?= /usr/sbin/chown
CAT?= /bin/cat
PWD?= /bin/pwd
TAR?= /usr/bin/tar
GTAR?= /usr/local/bin/gtar
CP?= /bin/cp
MV?= /bin/mv
RM?= /bin/rm
RMDIR?= /bin/rmdir
CHFLAGS?= /bin/chflags
GZIP?= /usr/bin/gzip
TOUCH?= /usr/bin/touch
INSTALL?= /usr/bin/install
LS?= /bin/ls
LN?= /bin/ln
FIND?= /usr/bin/find
PW?= /usr/sbin/pw
SED?= /usr/bin/sed
UNAME?= /usr/bin/uname
BZIP2?= /usr/bin/bzip2
XZ?= /usr/bin/xz
MAKEFS?= /usr/sbin/makefs
SSHKEYGEN?= /usr/bin/ssh-keygen
SYSCTL?= /sbin/sysctl
PKG?= /usr/local/sbin/pkg
OPENSSL?= /usr/bin/openssl
CUT?= /usr/bin/cut
#
WRKDIR?= ${.CURDIR}/work
#
BSDLABEL?= bsdlabel
#
DOFS?= ${TOOLSDIR}/doFS.sh
SCRIPTS?= mdinit mfsbsd interfaces packages
BOOTMODULES?= acpi ahci
.if defined(LOADER_4TH)
BOOTFILES?= defaults device.hints loader_4th *.rc *.4th
EFILOADER?= loader_4th.efi
.else
BOOTFILES?= defaults device.hints loader_lua lua
EFILOADER?= loader_lua.efi
.endif
MFSMODULES?= aesni crypto cryptodev ext2fs geom_eli geom_mirror geom_nop \
ipmi ntfs nullfs opensolaris smbus snp tmpfs zfs
# Sometimes the kernel is compiled with a different destination.
KERNDIR?= kernel
#
XZ_FLAGS?=
#
.if defined(V)
_v=
VERB=1
.else
_v=@
VERB=
.endif
.if !defined(ARCH)
TARGET!= ${SYSCTL} -n hw.machine_arch
.else
TARGET= ${ARCH}
.endif
.if !defined(RELEASE)
RELEASE!= ${UNAME} -r
.endif
.if !defined(PKG_ABI)
PKG_ABI!= echo "FreeBSD:`${UNAME} -U | ${CUT} -c 1-2`:`${UNAME} -m`"
.endif
.if !defined(SE)
IMAGE_PREFIX?= mfsbsd
.else
IMAGE_PREFIX?= mfsbsd-se
.endif
IMAGE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.img
ISOIMAGE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.iso
TARFILE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.tar
GCEFILE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.tar.gz
_DISTDIR= ${WRKDIR}/dist/${RELEASE}-${TARGET}
.if !defined(DEBUG)
EXCLUDE= --exclude *.symbols
.else
EXCLUDE=
.endif
# Roothack stuff
.if !defined(NO_ROOTHACK)
. if defined(ROOTHACK_FILE) && exists(${ROOTHACK_FILE})
ROOTHACK_PREBUILT=1
. else
ROOTHACK_FILE= ${WRKDIR}/roothack/roothack
. endif
.endif
# Check if we are installing FreeBSD 9 or higher
.if exists(${BASE}/base.txz) && exists(${BASE}/kernel.txz)
FREEBSD9?= yes
BASEFILE?= ${BASE}/base.txz
KERNELFILE?= ${BASE}/kernel.txz
.else
BASEFILE?= ${BASE}/base/base.??
KERNELFILE?= ${BASE}/kernels/generic.??
.endif
.if defined(MAKEJOBS)
_MAKEJOBS= -j${MAKEJOBS}
.endif
_ROOTDIR= ${WRKDIR}/mfs
_BOOTDIR= ${_ROOTDIR}/boot
.if !defined(NO_ROOTHACK)
_DESTDIR= ${_ROOTDIR}/rw
MFSROOT_FREE_INODES?=1%
MFSROOT_FREE_BLOCKS?=1%
.else
_DESTDIR= ${_ROOTDIR}
.endif
.if !defined(SE)
# Environment for custom build
BUILDENV?= env \
NO_FSCHG=1 \
WITHOUT_CLANG=1 \
WITHOUT_DICT=1 \
WITHOUT_GAMES=1 \
WITHOUT_LIB32=1
# Environment for custom install
INSTALLENV?= ${BUILDENV} \
WITHOUT_TOOLCHAIN=1
.endif
# Environment for custom scripts
CUSTOMSCRIPTENV?= env \
WRKDIR=${WRKDIR} \
DESTDIR=${_DESTDIR} \
DISTDIR=${_DISTDIR} \
BASE=${BASE}
.if defined(FULLDIST)
NO_PRUNE=1
WITH_RESCUE=1
.endifExtracting base and kernel ... done
Copying base.txz and kernel.txz ... done
Removing selected files from distribution ... done
Copying out cdboot and EFI loader ... done
Installing configuration scripts and files ... done
Generating SSH host keys ... done
Copying user files ...
customfiles/ -> /usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/mfs/rw
customfiles/etc -> /usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/mfs/rw/etc
customfiles/etc/profile -> /usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/mfs/rw/etc/profile
done
Configuring boot environment ...x ./
x ./linker.hints
x ./kernel
done
Creating EFI boot image ...Creating `/usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/cdboot/efiboot.img'
/usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/cdboot/efiboot.img: 4039 sectors in 4039 FAT12 clusters (512 bytes/cluster)
BytesPerSec=512 SecPerClust=1 ResSectors=1 FATs=2 RootDirEnts=512 Sectors=4096 Media=0xf0 FATsecs=12 SecPerTrack=63 Heads=255 HiddenSecs=0
Populating `/usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/cdboot/efiboot.img'
Image `/usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/work/cdboot/efiboot.img' complete
done
Installing pkgng ... done
Installing user packages ...
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.pkg: 100% 6 MiB 146.6kB/s 00:46
Processing entries: 100%
FreeBSD repository update completed. 31196 packages processed.
All repositories are up to date.
The following 18 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
fusefs-libs3: 3.10.5
fusefs-sshfs: 3.7.2
gettext-runtime: 0.21
glib: 2.70.4_3,2
indexinfo: 0.3.1
libffi: 3.3_1
libiconv: 1.16
liblz4: 1.9.3,1
libxml2: 2.9.13_1
mpdecimal: 2.5.1
pcre: 8.45_1
python38: 3.8.13
readline: 8.1.2
rsync: 3.2.3_1
screen: 4.9.0_4
smartmontools: 7.3
xxhash: 0.8.1
zstd: 1.5.2
Number of packages to be installed: 18
The process will require 185 MiB more space.
33 MiB to be downloaded.
[1/18] Fetching screen-4.9.0_4.pkg: 100% 496 KiB 169.4kB/s 00:03
[2/18] Fetching fusefs-sshfs-3.7.2.pkg: 100% 40 KiB 40.9kB/s 00:01
[3/18] Fetching smartmontools-7.3.pkg: 100% 505 KiB 258.6kB/s 00:02
[4/18] Fetching rsync-3.2.3_1.pkg: 100% 355 KiB 181.6kB/s 00:02
[5/18] Fetching indexinfo-0.3.1.pkg: 100% 6 KiB 5.7kB/s 00:01
[6/18] Fetching fusefs-libs3-3.10.5.pkg: 100% 95 KiB 97.3kB/s 00:01
[7/18] Fetching glib-2.70.4_3,2.pkg: 100% 3 MiB 261.7kB/s 00:13
[8/18] Fetching libxml2-2.9.13_1.pkg: 100% 1 MiB 237.0kB/s 00:06
[9/18] Fetching readline-8.1.2.pkg: 100% 361 KiB 184.6kB/s 00:02
[10/18] Fetching python38-3.8.13.pkg: 100% 23 MiB 187.7kB/s 02:11
[11/18] Fetching mpdecimal-2.5.1.pkg: 100% 322 KiB 164.7kB/s 00:02
[12/18] Fetching libffi-3.3_1.pkg: 100% 39 KiB 40.1kB/s 00:01
[13/18] Fetching gettext-runtime-0.21.pkg: 100% 166 KiB 169.8kB/s 00:01
[14/18] Fetching pcre-8.45_1.pkg: 100% 1 MiB 313.1kB/s 00:04
[15/18] Fetching libiconv-1.16.pkg: 100% 606 KiB 310.5kB/s 00:02
[16/18] Fetching xxhash-0.8.1.pkg: 100% 80 KiB 82.3kB/s 00:01
[17/18] Fetching zstd-1.5.2.pkg: 100% 471 KiB 241.0kB/s 00:02
[18/18] Fetching liblz4-1.9.3,1.pkg: 100% 131 KiB 134.5kB/s 00:01
Checking integrity... done (0 conflicting)
[1/18] Installing indexinfo-0.3.1...
[1/18] Extracting indexinfo-0.3.1: 100%
[2/18] Installing readline-8.1.2...
[2/18] Extracting readline-8.1.2: 100%
[3/18] Installing mpdecimal-2.5.1...
[3/18] Extracting mpdecimal-2.5.1: 100%
[4/18] Installing libffi-3.3_1...
[4/18] Extracting libffi-3.3_1: 100%
[5/18] Installing gettext-runtime-0.21...
[5/18] Extracting gettext-runtime-0.21: 100%
[6/18] Installing libxml2-2.9.13_1...
[6/18] Extracting libxml2-2.9.13_1: 100%
[7/18] Installing python38-3.8.13...
[7/18] Extracting python38-3.8.13: 100%
[8/18] Installing pcre-8.45_1...
[8/18] Extracting pcre-8.45_1: 100%
[9/18] Installing libiconv-1.16...
[9/18] Extracting libiconv-1.16: 100%
[10/18] Installing liblz4-1.9.3,1...
[10/18] Extracting liblz4-1.9.3,1: 100%
[11/18] Installing fusefs-libs3-3.10.5...
[11/18] Extracting fusefs-libs3-3.10.5: 100%
[12/18] Installing glib-2.70.4_3,2...
[12/18] Extracting glib-2.70.4_3,2: 100%
[13/18] Installing xxhash-0.8.1...
[13/18] Extracting xxhash-0.8.1: 100%
[14/18] Installing zstd-1.5.2...
[14/18] Extracting zstd-1.5.2: 100%
[15/18] Installing screen-4.9.0_4...
[15/18] Extracting screen-4.9.0_4: 100%
[16/18] Installing fusefs-sshfs-3.7.2...
[16/18] Extracting fusefs-sshfs-3.7.2: 100%
[17/18] Installing smartmontools-7.3...
[17/18] Extracting smartmontools-7.3: 100%
[18/18] Installing rsync-3.2.3_1...
[18/18] Extracting rsync-3.2.3_1: 100%
=====
Message from python38-3.8.13:
--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
py38-gdbm databases/py-gdbm@py38
py38-sqlite3 databases/py-sqlite3@py38
py38-tkinter x11-toolkits/py-tkinter@py38
=====
Message from fusefs-libs3-3.10.5:
--
Install the FUSE kernel module (kldload fusefs) to use this port.
=====
Message from screen-4.9.0_4:
--
As of GNU Screen 4.4.0:
Note that there was fix to screen message structure field
responsible for $TERM handling, making it impossible
to attach to older versions.
=====
Message from fusefs-sshfs-3.7.2:
--
Basic Instructions:
There are three ways to do this:
1)
% sshfs -o idmap=user [email protected]: /path/to/mount/point
or
2)
% mount_fusefs auto /path/to/mount/point sshfs -o idmap=user \
[email protected]:
or
3)
% env FUSE_DEV_NAME=/dev/fuse0 sshfs -o idmap=user \
[email protected]:
% mount_fusefs /dev/fuse0 /path/to/mount/point
For further options see ``sshfs -h''.
=====
Message from smartmontools-7.3:
--
smartmontools has been installed
To check the status of drives, use the following:
/usr/local/sbin/smartctl -a /dev/ad0 for first ATA/SATA drive
/usr/local/sbin/smartctl -a /dev/da0 for first SCSI drive
/usr/local/sbin/smartctl -a /dev/ada0 for first SATA drive
To include drive health information in your daily status reports,
add a line like the following to /etc/periodic.conf:
daily_status_smart_devices="/dev/ad0 /dev/da0"
substituting the appropriate device names for your SMART-capable disks.
To enable drive monitoring, you can use /usr/local/sbin/smartd.
A sample configuration file has been installed as
/usr/local/etc/smartd.conf.sample
Copy this file to /usr/local/etc/smartd.conf and edit appropriately
To have smartd start at boot
echo 'smartd_enable="YES"' >> /etc/rc.conf
--- % 0.0 MiB / 0.6 MiB = 0.000 0:02 100 % 93.6 MiB / 485.9 MiB = 0.193 477 KiB/s 17:24
done
echo roothack.full: /usr/lib/libc.a >> .depend
cc -O2 -pipe -g -MD -MF.depend.roothack.o -MTroothack.o -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/11.0.1/include -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /usr/home/dtxdf-fbsd/Downloads/Clones/Github/mfsbsd-work/tools/roothack/roothack.c -o roothack.o
cc -O2 -pipe -g -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/11.0.1/include -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -static -o roothack.full roothack.o -larchive -lbz2 -lz -llzma -lcrypto -lbsdxml -lmd -lprivatezstd
objcopy --only-keep-debug roothack.full roothack.debug
objcopy --strip-debug --add-gnu-debuglink=roothack.debug roothack.full roothack
Installing roothack ... done
Creating and compressing mfsroot ... done
Copying FreeBSD installation image ... done
Creating image file ...423968+0 records in
423968+0 records out
434143232 bytes transferred in 8.400635 secs (51679810 bytes/sec)
423936+0 records in
423936+0 records out
434110464 bytes transferred in 8.056553 secs (53882906 bytes/sec)
md0 created
md0p1 added
partcode written to md0p1
bootcode written to md0
md0p2 added
16+0 records in
16+0 records out
2097152 bytes transferred in 0.135044 secs (15529442 bytes/sec)
md0p3 added
Calculated size of `./mfsbsd-se-13.0-RELEASE-p11-amd64.img.jkCqJ9Vx': 390168576 bytes, 44 inodes
Extent size set to 32768
./mfsbsd-se-13.0-RELEASE-p11-amd64.img.jkCqJ9Vx: 372.1MB (762048 sectors) block size 32768, fragment size 4096
using 1 cylinder groups of 372.09MB, 11907 blks, 256 inodes.
super-block backups (for fsck -b #) at:
64,
Populating `./mfsbsd-se-13.0-RELEASE-p11-amd64.img.jkCqJ9Vx'
Image `./mfsbsd-se-13.0-RELEASE-p11-amd64.img.jkCqJ9Vx' complete
2976+1 records in
2976+1 records out
390168576 bytes transferred in 23.367620 secs (16696975 bytes/sec)
done
-rw-r--r-- 1 root dtxdf-fbsd 434143232 Jun 29 15:15 mfsbsd-se-13.0-RELEASE-p11-amd64.imgmkdir /media/wrk
mkdir /media/tmp
mount /dev/da4p3 /media/wrkenv BSDINSTALL_DISTDIR=/media/wrk/13.0-RELEASE-p11-amd64 bsdinstall auto# zfsinstall -h
Install FreeBSD using ZFS from a compressed archive
Required flags:
-d geom_provider : geom provider(s) to install to (e.g. da0)
Optional flags:
-u dist_url : URL or directory with base.txz and kernel.txz
(defaults to FreeBSD FTP mirror)
-r raidz|mirror : select raid mode if more than one -d provider given
-s swap_part_size : create a swap partition with given size (default: no swap)
-z zfs_part_size : create zfs parition of this size (default: all space left)
-p pool_name : specify a name for the ZFS pool (default: tank)
-C : compatibility mode with limited feature flags
(enable only async_destroy, empty_bpobj and lz4_compress)
-m mount_point : use this mount point for operations (default: /mnt)
-c : enable compression for all datasets
-l : use legacy mounts (via fstab) instead of ZFS mounts
-4 : use fletcher4 as default checksum algorithm
-A : align partitions to 4K blocks
Examples:
Install on a single drive with 2GB swap:
tools/zfsinstall -u /path/to/release -d da0 -s 2G
Install on a mirror without swap, pool name rpool:
tools/zfsinstall -u /path/to/release -d da0 -d da1 -r mirror -p rpool
Notes:
When using swap and raidz/mirror, the swap partition is created on all drives.
The /etc/fstab entry will contatin only the first drive's swap partition.
You can enable all swap partitions and/or make a gmirror-ed swap later.# destroygeom -d da0 -d da1 -d da2 -d da3
Destroying geom da0:
Deleting partition 1 ... done
Deleting partition 2 ... done
Deleting partition 3 ... done
Destroying geom da1:
Deleting partition 1 ... done
Deleting partition 2 ... done
Deleting partition 3 ... done
Destroying geom da2:
Deleting partition 1 ... done
Deleting partition 2 ... done
Deleting partition 3 ... done
Destroying geom da3:
Deleting partition 1 ... done
Deleting partition 2 ... done
Deleting partition 3 ... donezfsinstall -u /media/wrk/13.0-RELEASE-p11-amd64 -d da0 -s 2G -m /media/tmp -cA# zfsinstall -u /media/wrk/13.0-RELEASE-p11-amd64 -d da0 -s 2G -m /media/tmp -cA
Creating GUID partitions on da0 ... done
Configuring ZFS bootcode on da0 ... done
=> 40 1172123488 da0 GPT (559G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 1167921152 3 freebsd-zfs (557G)
1172119552 3976 - free - (1.9M)
Creating ZFS pool tank on da0p3 ... done
Enabling default compression on tank ... done
Creating tank root partition: ... done
Creating tank partitions: var tmp ... done
Setting bootfs for tank to tank/root ... done
NAME USED AVAIL REFER MOUNTPOINT
tank 248K 539G 24K none
tank/root 73K 539G 25K /media/tmp
tank/root/tmp 24K 539G 24K /media/tmp/tmp
tank/root/var 24K 539G 24K /media/tmp/var
Extracting FreeBSD distribution ... done
Writing /boot/loader.conf... done
Writing /etc/fstab...Writing /etc/rc.conf... done
Copying /boot/zfs/zpool.cache ... done
Installation complete.
The system will boot from ZFS with clean install on next reboot
You may make adjustments to the installed system using chroot:
chroot /media/tmp
Some adjustments may require a mounted devfs:
mount -t devfs devfs /media/tmp/dev
WARNING - Don't export ZFS pool "tank"!zfsinstall -u /media/wrk/13.0-RELEASE-p11-amd64 -d da0 -d da1 -r mirror -s 2G -m /media/tmp -cA# zfsinstall -u /media/wrk/13.0-RELEASE-p11-amd64 -d da0 -d da1 -r mirror -s 2G -m /media/tmp -cA
Creating GUID partitions on da0 ... done
Configuring ZFS bootcode on da0 ... done
=> 40 1172123488 da0 GPT (559G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 1167921152 3 freebsd-zfs (557G)
1172119552 3976 - free - (1.9M)
Creating GUID partitions on da1 ... done
Configuring ZFS bootcode on da1 ... done
=> 40 1172123488 da1 GPT (559G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 1167921152 3 freebsd-zfs (557G)
1172119552 3976 - free - (1.9M)
Creating ZFS pool tank on da0p3 da1p3 ... done
Enabling default compression on tank ... done
Creating tank root partition: ... done
Creating tank partitions: var tmp ... done
Setting bootfs for tank to tank/root ... done
NAME USED AVAIL REFER MOUNTPOINT
tank 252K 539G 24K none
tank/root 73K 539G 25K /media/tmp
tank/root/tmp 24K 539G 24K /media/tmp/tmp
tank/root/var 24K 539G 24K /media/tmp/var
Extracting FreeBSD distribution ... done
Writing /boot/loader.conf... done
Writing /etc/fstab...Writing /etc/rc.conf... done
Copying /boot/zfs/zpool.cache ... done
Installation complete.
The system will boot from ZFS with clean install on next reboot
You may make adjustments to the installed system using chroot:
chroot /media/tmp
Some adjustments may require a mounted devfs:
mount -t devfs devfs /media/tmp/dev
WARNING - Don't export ZFS pool "tank"!# zfsinstall -h
Install FreeBSD using ZFS from a compressed archive
Required flags:
-d geom_provider : geom provider(s) to install to (e.g. da0)
Optional flags:
-r raidz|mirror : select raid mode if more than one -d provider given
(must begin after -d)
-u dist_url : URL or directory with base.txz and kernel.txz
(defaults to FreeBSD FTP mirror)
-s swap_part_size : create a swap partition with given size (default: no swap)
-z zfs_part_size : create zfs parition of this size (default: all space left)
-p pool_name : specify a name for the ZFS pool (default: tank)
-C : compatibility mode with limited feature flags
(enable only async_destroy, empty_bpobj and lz4_compress)
-m mount_point : use this mount point for operations (default: /mnt)
-c : enable compression for all datasets
-l : use legacy mounts (via fstab) instead of ZFS mounts
-4 : use fletcher4 as default checksum algorithm
-A : align partitions to 4K blocks
Examples:
Install on a single drive with 2GB swap:
/root/bin/zfsinstall -u /path/to/release -d da0 -s 2G
Install on four-disk stripe:
/root/bin/zfsinstall -u /path/to/release -d da0 -d da1 -d da2 -d da3
Install on an stripped mirror:
/root/bin/zfsinstall -u /path/to/release -d da0 -d da1 -r mirror -d da2 -d da3 -r mirror
Install on a mirror without swap, pool name rpool:
/root/bin/zfsinstall -u /path/to/release -d da0 -d da1 -r mirror -p rpool
Notes:
When using swap and raidz/mirror, the swap partition is created on all drives.
The /etc/fstab entry will contatin only the first drive's swap partition.
You can enable all swap partitions and/or make a gmirror-ed swap later.zfsinstall -u /media/wrk/13.0-RELEASE-p11-amd64 -d da0 -d da1 -r mirror -d da2 -d da3 -r mirror -s 2G -m /media/tmp -cA# zfsinstall -u /media/wrk/13.0-RELEASE-p11-amd64 -d da0 -d da1 -r mirror -d da2 -d da3 -r mirror -s 2G -m /media/tmp -cA
Creating GUID partitions on da0 ... done
Configuring ZFS bootcode on da0 ... done
=> 40 1172123488 da0 GPT (559G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 1167921152 3 freebsd-zfs (557G)
1172119552 3976 - free - (1.9M)
Creating GUID partitions on da1 ... done
Configuring ZFS bootcode on da1 ... done
=> 40 1172123488 da1 GPT (559G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 1167921152 3 freebsd-zfs (557G)
1172119552 3976 - free - (1.9M)
Creating GUID partitions on da2 ... done
Configuring ZFS bootcode on da2 ... done
=> 40 143374576 da2 GPT (68G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 139173888 3 freebsd-zfs (66G)
143372288 2328 - free - (1.1M)
Creating GUID partitions on da3 ... done
Configuring ZFS bootcode on da3 ... done
=> 40 143374576 da3 GPT (68G)
40 472 1 freebsd-boot (236K)
512 3584 - free - (1.8M)
4096 4194304 2 freebsd-swap (2.0G)
4198400 139173888 3 freebsd-zfs (66G)
143372288 2328 - free - (1.1M)
Creating ZFS pool tank on da0p3 da1p3 da2p3 da3p3 ... done
Enabling default compression on tank ... done
Creating tank root partition: ... done
Creating tank partitions: var tmp ... done
Setting bootfs for tank to tank/root ... done
NAME USED AVAIL REFER MOUNTPOINT
tank 253K 603G 24K none
tank/root 73K 603G 25K /media/tmp
tank/root/tmp 24K 603G 24K /media/tmp/tmp
tank/root/var 24K 603G 24K /media/tmp/var
Extracting FreeBSD distribution ... done
Writing /boot/loader.conf... done
Writing /etc/fstab...Writing /etc/rc.conf... done
Copying /boot/zfs/zpool.cache ... done
Installation complete.
The system will boot from ZFS with clean install on next reboot
You may make adjustments to the installed system using chroot:
chroot /media/tmp
Some adjustments may require a mounted devfs:
mount -t devfs devfs /media/tmp/dev
WARNING - Don't export ZFS pool "tank"!#!/bin/sh -x
# Destruimos el esquema de particionado actual y
# creamos uno nuevo, que en este caso es GPT.
gpart destroy -F da0
gpart create -s gpt da0
# Particionamos
gpart add -t freebsd-boot -a 1m -l boot0 -s 512k da0
gpart add -t freebsd-swap -a 1m -l swap0 -s 2g da0
gpart add -t freebsd-ufs -a 1m -l root0 da0
# Incrustamos el código de arranque dentro del esquema
# de los metadatos del esquema de particionado actual
# y escribimos escribimos el código de arranque en
# la partición de booteo.
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# Formateamos la partición UFS y activamos journaling
newfs -j /dev/gpt/root0
# Montamos la partición donde se encuentran los archivos
# de distribución y montamos la partición root del disco
# donde instalaremos FreeBSD.
mkdir /media/wrk
fsck -p /dev/gpt/rootfs
mount /dev/gpt/rootfs /media/wrk
mount /dev/gpt/root0 /mnt
# Descomprimimos base.txz y kernel.txz dentro de la
# partición del disco actual.
tar --unlink -xpf /media/wrk/13.0-RELEASE-p11-amd64/base.txz -C /mnt
tar --unlink -xpf /media/wrk/13.0-RELEASE-p11-amd64/kernel.txz -C /mnt
# Escribimos en fstab las particiones que deberán ser montadas
# al inicio de nuestro sistema.
echo /dev/gpt/root0 / ufs rw 0 1 > /mnt/etc/fstab
echo /dev/gpt/swap0 none swap sw 0 0 >> /mnt/etc/fstab
# Configuramos algunos parámetros e iniciamos algunos servicios.
echo clear_tmp_enable="YES" >> /mnt/etc/rc.conf
echo syslogd_flags="-ss" >> /mnt/etc/rc.conf
echo hostname="bob" >> /mnt/etc/rc.conf
echo keymap="es.acc.kbd" >> /mnt/etc/rc.conf
echo sshd_enable="YES" >> /mnt/etc/rc.conf
echo ifconfig_em1="DHCP" >> /mnt/etc/rc.conf
# Cambiamos la contraseña del superusuario.
chroot /mnt passwd
# Agregamos un nuevo usuario administrativo y
# le asignamos una contraseña.
mkdir -p /mnt/home/bob
pw useradd -R /mnt -n bob -c "Bob Stephan" -G wheel
chroot /mnt passwd bob
# Reiniciamos
reboot$ scp install-ufs.sh [email protected]:/tmp
$ ssh [email protected] sh /tmp/install-ufs.sh2022-05-11.00:58:03 zpool create -o altroot=/mnt -O compress=zstd -O atime=off -m none -f zroot mirror /dev/gpt/zfsXXXXX /dev/gpt/zfsYYYYY
2022-05-11.00:58:22 zfs create -o mountpoint=none zroot/ROOT
2022-05-11.00:58:58 zfs create -o mountpoint=/ zroot/ROOT/default
2022-05-11.00:59:23 zfs create -o mountpoint=/tmp -o exec=off -o setuid=off zroot/tmp
2022-05-11.00:59:43 zfs create -o mountpoint=/usr -o canmount=off zroot/usr
2022-05-11.00:59:56 zfs create zroot/usr/home
2022-05-11.01:00:22 zfs create -o setuid=off zroot/usr/ports
2022-05-11.01:00:38 zfs create zroot/usr/src
2022-05-11.01:01:04 zfs create -o mountpoint=/var -o canmount=off zroot/var
2022-05-11.01:01:24 zfs create -o exec=off -o setuid=off zroot/var/audit
2022-05-11.01:01:26 zfs create -o exec=off -o setuid=off zroot/var/crash
2022-05-11.01:01:32 zfs create -o exec=off -o setuid=off zroot/var/log
2022-05-11.01:01:42 zfs create -o atime=on zroot/var/mail
2022-05-11.01:01:54 zfs create -o setuid=off zroot/var/tmp
2022-05-11.01:02:21 zfs set mountpoint=/zroot zroot
2022-05-11.01:02:42 zpool set bootfs=zroot/ROOT/default zroot
2022-05-11.01:03:19 zpool set cachefile=/mnt/boot/zfs/zpool.cache zroot
2022-05-11.01:03:34 zfs set canmount=noauto zroot/ROOT/default#!/bin/sh -x
# Destruimos el esquema de particionado actual y
# creamos uno nuevo, que en este caso es GPT.
gpart destroy -F da0
gpart create -s gpt da0
# lo mismo pero con otro disco
gpart destroy -F da1
gpart create -s gpt da1
# Particionamos
gpart add -t freebsd-boot -a 1m -l boot0 -s 512k da0
gpart add -t freebsd-swap -a 1m -l swap0 -s 2g da0
gpart add -t freebsd-zfs -a 1m -l root0 da0
# Idem
gpart add -t freebsd-boot -a 1m -l boot1 -s 512k da1
gpart add -t freebsd-swap -a 1m -l swap1 -s 2g da1
gpart add -t freebsd-zfs -a 1m -l root1 da1
# Incrustamos el código de arranque dentro del esquema
# de los metadatos del esquema de particionado actual
# y escribimos escribimos el código de arranque en
# la partición de booteo.
gpart bootcode -b /boot/pmbr -p /boot/gpzfstboot -i 1 da0
# Idem
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da1
zpool create -o altroot=/mnt -O compress=zstd -O atime=off -m none -f zroot mirror /dev/gpt/root0 /dev/gpt/root1
zfs create -o mountpoint=none zroot/ROOT
zfs create -o mountpoint=/ zroot/ROOT/default
zfs create -o mountpoint=/tmp -o exec=off -o setuid=off zroot/tmp
zfs create -o mountpoint=/usr -o canmount=off zroot/usr
zfs create zroot/usr/home
zfs create -o setuid=off zroot/usr/ports
zfs create zroot/usr/src
zfs create -o mountpoint=/var -o canmount=off zroot/var
zfs create -o exec=off -o setuid=off zroot/var/audit
zfs create -o exec=off -o setuid=off zroot/var/crash
zfs create -o exec=off -o setuid=off zroot/var/log
zfs create -o atime=on zroot/var/mail
zfs create -o setuid=off zroot/var/tmp
zfs set mountpoint=/zroot zroot
zpool set bootfs=zroot/ROOT/default zroot
mkdir -p /mnt/boot/zfs
zpool set cachefile=/mnt/boot/zfs/zpool.cache zroot
zfs set canmount=noauto zroot/ROOT/default
# Montamos la partición donde se encuentran los archivos
# de distribución.
mkdir /media/wrk
fsck -p /dev/gpt/rootfs
mount /dev/gpt/rootfs /media/wrk
# Descomprimimos base.txz y kernel.txz dentro de la
# partición del disco actual.
tar --unlink -xpf /media/wrk/13.0-RELEASE-p11-amd64/base.txz -C /mnt
tar --unlink -xpf /media/wrk/13.0-RELEASE-p11-amd64/kernel.txz -C /mnt
# Escribimos en fstab las particiones que deberán ser montadas
# al inicio de nuestro sistema.
echo /dev/gpt/swap0 none swap sw 0 0 > /mnt/etc/fstab
echo /dev/gpt/swap1 none swap sw 0 0 >> /mnt/etc/fstab
# Configuramos algunos parámetros e iniciamos algunos servicios.
echo zfs_enable="YES" >> /mnt/etc/rc.conf
echo clear_tmp_enable="YES" >> /mnt/etc/rc.conf
echo syslogd_flags="-ss" >> /mnt/etc/rc.conf
echo hostname="bob" >> /mnt/etc/rc.conf
echo keymap="es.acc.kbd" >> /mnt/etc/rc.conf
echo sshd_enable="YES" >> /mnt/etc/rc.conf
echo ifconfig_em1="DHCP" >> /mnt/etc/rc.conf
# Cargamos el módulo ZFS desde el inicio
echo zfs_load="YES" >> /mnt/boot/loader.conf
# Cambiamos la contraseña del superusuario.
chroot /mnt passwd
# Agregamos un nuevo usuario administrativo y
# le asignamos una contraseña.
mkdir -p /mnt/home/bob
pw useradd -R /mnt -n bob -c "Bob Stephan" -G wheel
chroot /mnt passwd bob
# Reiniciamos
reboot