Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. - Create ZFS filesystem hierarchy\\ \\ The **fletcher4** algorithm should be more robust than the **fletcher2** algorithm. <code> Fixit# zfs set checksum=fletcher4 zroot </code> <code> Fixit# zfs create -o compression=on -o exec=on -o setuid=off zroot/tmp Fixit# chmod 1777 /zroot/tmp </code> <code> Fixit# zfs create zroot/usr Fixit# zfs create zroot/usr/home Fixit# cd /zroot ; ln -s /usr/home home </code> <code> Fixit# zfs create -o compression=lzjb -o setuid=off zroot/usr/ports Fixit# zfs create -o compression=off -o exec=off -o setuid=off zroot/usr/ports/distfiles Fixit# zfs create -o compression=off -o exec=off -o setuid=off zroot/usr/ports/packages </code> <callout type="info"> **Note:** If you use nullfs or nfs to mount /usr/ports to different locations/servers, you will also need to nullfs/nfs mount /usr/ports/distfiles and/or /usr/ports/packages. </callout> <code> Fixit# zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/usr/src </code> <code> Fixit# zfs create zroot/var Fixit# zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/crash Fixit# zfs create -o exec=off -o setuid=off zroot/var/db Fixit# zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/db/pkg Fixit# zfs create -o exec=off -o setuid=off zroot/var/empty Fixit# zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/log Fixit# zfs create -o compression=gzip -o exec=off -o setuid=off zroot/var/mail Fixit# zfs create -o exec=off -o setuid=off zroot/var/run Fixit# zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/tmp Fixit# chmod 1777 /zroot/var/tmp </code> <callout type="info"> **Note:** - Compression may be set to on, off, lzjb, gzip, gzip-N (where N is an integer from 1 (fastest) to 9 (best compression ratio. gzip is equivalent to gzip-6). - Compression will cause some latency when accessing files on the [[/ZFS]] filesystems. Use compression on [[/ZFS]] filesystems which will not be accessed that often. </callout> - Install %%FreeBSD%% to zroot <code> Fixit# cd /dist/8.0-* Fixit# export DESTDIR=/zroot Fixit# for dir in base catpages dict doc games info lib32 manpages ports; \ do (cd $dir ; ./install.sh) ; done Fixit# cd src ; ./install.sh all Fixit# cd ../kernels ; ./install.sh generic Fixit# cd /zroot/boot ; cp -Rlp GENERIC/* /zroot/boot/kernel/ </code> - Make /var/empty readonly <code> Fixit# zfs set readonly=on zroot/var/empty </code> - chroot into /zroot <code> Fixit# chroot /zroot </code> - Create /etc/rc.conf <code> Fixit# echo 'zfs_enable="YES"' > /etc/rc.conf Fixit# echo 'hostname="beastie.mydomain.local"' >> /etc/rc.conf Fixit# echo 'ifconfig_re0="DHCP"' >> /etc/rc.conf </code> <callout type="info"> **Note:** Replace re0 with the name of the Network interface for the new system </callout> - Create /boot/loader.conf <code> Fixit# echo 'zfs_load="YES"' > /boot/loader.conf Fixit# echo 'vfs.root.mountfrom="zfs:zroot"' >> /boot/loader.conf </code> - Change root's password <code> Fixit# passwd </code> - Set the local time zone <code> Fixit# tzsetup </code> - Create /etc/mail/aliases.db <code> Fixit# cd /etc/mail Fixit# make aliases </code> - Exit from the /zroot <code> Fixit# umount /dev Fixit# exit </code> - Install zpool.cache to the ZFS filesystem <code> Fixit# cp /boot/zfs/zpool.cache /zroot/boot/zfs/zpool.cache </code> rootonzfs/installingfreebsd.txt Last modified: 2013/02/14 22:54by GavinAtkinson