FreeBSD 10 installer and ZFS root
David Christensen
dpchrist at holgerdanske.com
Mon Mar 10 05:47:35 UTC 2014
freebsd-questions:
I am testing FreeBSD-10.0-RELEASE-amd64-dvd1.iso on a system with:
Intel D945GTPLKR motherboard
Intel Pentium 4 640 processor
4 GB RAM
Maxtor 5T030H3 30 GB EIDE hard drive
I have installed FreeBSD using the encrypted ZFS root option, similar to
the screenshot at the bottom of:
http://www.bsdnow.tv/tutorials/fde
Except that I set Partition Scheme to "MBR" and Swap Size to "4g".
Question -- do I need to make swap size equal to or larger than RAM?
The system boots and appears to work. Do I understand the following
correctly?
1. root at p43200:~ # gpart show -p
=> 63 60030369 ada0 MBR (29G)
63 60030369 ada0s1 freebsd [active] (29G)
=> 0 60030369 ada0s1 BSD (29G)
0 4194304 ada0s1a freebsd-zfs (2.0G)
4194304 8388608 ada0s1b freebsd-swap (4.0G)
12582912 47447457 ada0s1d freebsd-zfs (23G)
The disk has an MBR partition table and yields five GEOM providers
-- ada0, ada0s1, ada0s1a, ada0s1b, and adas1d:
ada0 is the raw block device.
ada0s1 is a primary partition table entry pointing to an extended
partition table.
The extended partition table contains partitions ada0s1a, ada0s1b,
and ada0s1d.
Question -- can I adjust the size of ada0s1a and ada0s1d during
installation?
2. root at p43200:~ # swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ada0s1b 4194304 0 4194304 0%
ada0s1b is used for swap.
swap is unencrypted.
Question -- can I arrange for swap to be encrypted during installation?
Question -- if not, is section 18.15 of the FreeBSD handbook
correct for FreeBSD 10?
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/swap-encrypting.html
E.g. to encrypt swap using a one-time random key at boot, add the
following line, or something similar per geli(8), to /etc/rc.conf:
geli_swap_flags="-e blowfish -l 128 -s 4096 -d"
3. root at p43200:~ # zpool list -v
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
bootpool 1.98G 447M 1.55G 21% 1.00x ONLINE -
ada0s1a 1.98G 447M 1.55G -
zroot 22.5G 1.73G 20.8G 7% 1.00x ONLINE -
ada0s1d.eli 22.5G 1.73G 20.8G -
There are two ZFS pools, bootpool and zroot.
bootpool is based upon ada0s1a.
zroot is based upon ada0s1d.eli.
Question -- can I set ZFS pool options for bootpool and zroot
during installation?
4. root at p43200:~ # zfs list -r -t all bootpool
NAME USED AVAIL REFER MOUNTPOINT
bootpool 447M 1.52G 446M /bootpool
bootpool has only the default file system.
Question -- can I set ZFS file system options for bootpool during
installation?
5. root at p43200:~ # geli list
Geom name: ada0s1d.eli
State: ACTIVE
EncryptionAlgorithm: AES-XTS
KeyLength: 256
Crypto: software
Version: 7
UsedKey: 0
Flags: BOOT
KeysAllocated: 6
KeysTotal: 6
Providers:
1. Name: ada0s1d.eli
Mediasize: 24293097472 (23G)
Sectorsize: 4096
Mode: r1w1e1
Consumers:
1. Name: ada0s1d
Mediasize: 24293097984 (23G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2147515904
Mode: r1w1e1
ada0s1d is consumed by geom_eli (GELI) and yields provider ada0s1d.eli.
Question -- can I set encryption options for ada0s1d.eli during
installation?
6. root at p43200:~ # zfs list -r -t all zroot
NAME USED AVAIL REFER MOUNTPOINT
zroot 1.73G 20.4G 144K none
zroot/ROOT 411M 20.4G 144K none
zroot/ROOT/default 411M 20.4G 411M /
zroot/tmp 176K 20.4G 176K /tmp
zroot/usr 1.33G 20.4G 144K /usr
zroot/usr/home 144K 20.4G 144K /usr/home
zroot/usr/ports 813M 20.4G 813M /usr/ports
zroot/usr/src 545M 20.4G 545M /usr/src
zroot/var 1.31M 20.4G 688K /var
zroot/var/crash 148K 20.4G 148K /var/crash
zroot/var/log 212K 20.4G 212K /var/log
zroot/var/mail 144K 20.4G 144K /var/mail
zroot/var/tmp 152K 20.4G 152K /var/tmp
zroot has many file systems.
Question -- can I set ZFS file system options during installation?
TIA,
David
More information about the freebsd-questions
mailing list