jail(iocage)で、なろう>mobiその1

以前の環境はぐちゃぐちゃだったので、OS更新で仕切りなおして、今度はjailですみ分けてみようかと。
前にqjailを試したことがあるけどなんかしっくりこなかったなーとか思ってぐぐってたら、iocageの紹介が。
FreeBSDでiocageを使ってJailを管理する - Qiita
FreeNAS由来の管理ツール?というわけで、これ行ってみる。

# pkg install py37-iocage
# iocage activate ztank

あら、なんか怒られた。activate対象でないpoolを、deactivateしようとしてる?
HDD更新の時に、以前のzpool(zroot)をreadonlyでimportしてたので書き込めなかったっぽい。zpool export zroot で外して再チャレンジ。

# iocage activate ztank
# mount -t fdescfs null /dev/fd
# iocage list
Creating ztank/iocage
Creating ztank/iocage/download
Creating ztank/iocage/images
Creating ztank/iocage/jails
Creating ztank/iocage/log
Creating ztank/iocage/releases
Creating ztank/iocage/templates
Please set a mountpoint on ztank/iocage

あら、また何か言われてる。ぐぐると、ztank を moupoint=none で作っているせい?ということで、再チャレンジ。
narou.rbを動かす環境なので、jail名はnarouで。

# zfs set mountpoint=/iocage ztank/iocage
# iocage create -n narou -r 12.1-RELEASE
Default configuration missing, creating one
Fetching: 12.1-RELEASE

Downloading: MANIFEST [####################] 100%
Downloading: base.txz [####################] 100%
Downloading: lib32.txz [####################] 100%
Downloading: src.txz [####################] 100%
Extracting: base.txz...
Extracting: lib32.txz...
Extracting: src.txz...

* Updating 12.1-RELEASE to the latest patch level...
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update2.freebsd.org... done.
Fetching metadata signature for 12.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 563 patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180....190....200....210....220....230....240....250....260....270....280....290....300....310....320....330....340....350....360....370....380....390....400....410....420....430....440....450....460....470....480....490....500....510....520....530....540....550....560. done.
Applying patches... done.
Fetching 23 files... ....10....20. done.
The following files will be removed as part of updating to
12.1-RELEASE-p9:
/usr/share/zoneinfo/America/Godthab
/usr/src/contrib/unbound/config.h
The following files will be added as part of updating to
12.1-RELEASE-p9:
/usr/share/zoneinfo/America/Nuuk
/usr/src/contrib/ntp/include/ntp_calgps.h
/usr/src/contrib/ntp/include/ntp_psl.h
・・省略・・
/usr/src/usr.sbin/unbound/daemon/Makefile
Installing updates... done.
Missing default rc.conf, creating it
narou successfully created!