For FreeBSD automatic installation of using bsdinstall [ZFS Operations] ※Self-translation
Now, we take a look at how to install to ZFS using bsdinstall.
Installation of ZFS in an auto layout
As it is described in the manual, to the first half (PREAMBLE), if describe the environment variable “ZFSBOOT_DISKS” instead of “PARTITIONS”, ZFS allows you to install to.However, care must be taken of the following two points.
- If you want to automatically install, set environment variable _"nonInteractive"_.
- It needs to be _export_ environment variables _"ZFSBOOT_DISKS"_ and _"nonInteractive"_.
First half (PREAMBLE)
|
|
In the above configuration, ZFS partition has been created by default setting.
- Disk:ada0
- Device type:stripe
- Pool name:zroot
- Partition scheme:GPT
- Swap size:2G
- Mount points
|
|
Installation of ZFS in a custom layout
Set environment variable “ZFSBOOT_DATASETS”, it seems that you can create a ZFS layout freely.For now, we will try to split /, /tmp, /usr, /var.
First half (PREAMBLE)
|
|
In the above configuration, ZFS partition has been created with the following settings.
- Mount points
|
|
※At the time of automatic installation ZFS more information on setting, I think that it is better to check source code of the zfsboot (freebsd/zfsboot at master · freebsd/freebsd · GitHub).
Reference URL
- bsdinstall(8)
- freebsd/script at master · freebsd/freebsd · GitHub
- freebsd/zfsboot at master · freebsd/freebsd · GitHub
- https://groups.google.com/d/msg/fa.freebsd.stable/kg6svI6b8Fk/X-MIYF0lCEAJ
NOTE
※This article is a self-translation of “bsdinstallを使ったFreeBSDの自動インストールについて[ZFS編] - くんすとの備忘録”.