2018/03/05(月)OpenBSD6.2 初回起動時の設定

インストール後、ディスクを抜いて起動すると以下の画面になる。
...

OpenBSD/amd64 (hostname.example.com) (ttyC0)

login:


ユーザ名とパスワードを入力し、ログインをすると次の画面になる。


OpenBSD 6.2 (GENERIC) #132: Tue Oct  3 21:18:21 MDT 2017

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

You have new mail.
$
「メールが来ている」と表示されるのでメールを見てみる。






sshでログインすると次のような画面になる。

OpenBSD 6.2 (GENERIC) #132: Tue Oct  3 21:18:21 MDT 2017

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

$




メールを見るため、mail コマンドを入力
$ mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/bsduser": 3 messages 3 new
>N  1 deraadt@do-not-re  Sun Oct 15 06:20   74/4012  Welcome to OpenBSD 6.2!
 N  2 root@hostname.exa  Sat Feb 17 16:18   50/1767  hostname.example.com install response file
 N  3 root@hostname.exa  Sat Feb 17 16:18   16/681   hostname.example.com rc.firsttime output
& 

メールが3通来ている。

一つ目のメールはOpenBSDの開発者Theo de Raadt(テオ・デ・ラート)から来ている。
From: deraadt@do-not-reply.openbsd.org (Theo de Raadt)
To: bsduser <bsduser>
Subject: Welcome to OpenBSD 6.2!
Status: R

This message attempts to describe the most basic initial questions that a
system administrator of an OpenBSD box might have.  You are urged to save
this message for later reference.

For more information on how to set up your OpenBSD system, refer to the
"afterboot" man page (i.e. after you exit the mail subsystem, type
"man afterboot").  If you are not familiar with how to read man pages, type
"man man" at a shell prompt and read the entire thing.  Pay specific
attention to the "man -k keyword" option, which will permit you to find the
man page you are looking for more easily; for instance, "man -k ethernet".
The GNU "info" subsystem is also installed with further documentation
resources: to read info pages type "info".  (The info subsystem behaves like
the popular emacs editor.)

Again, PLEASE READ THE MANUAL PAGES.  Our developers have spent countless
hours improving them so that they are clear and precise.

If you have installed the X11 file sets during the install process, you can
find further information regarding configuration in the file /usr/X11R6/README.

Several popular binary packages (pre-compiled applications) are
available from mirror sites.  Mirror selection is usually automatic
during install/upgrade -- a mirror URLs from https://www.openbsd.org/ftp.html
is stored into the file /etc/installurl.  Installation of packages is
as simple as:

 # pkg_add -v rsync chromium emacs-25.2-no_x11

Significant efforts were made to centralize all system configuration in the
/etc directory.  You should be able to find each of the configuration files
you seek there, lightly documented.  In particular, much of the configuration
has been centralized in the file /etc/rc.conf.  You should not need to ever
edit the file /etc/rc.   The files /etc/rc.securelevel and /etc/rc.local exist
for this purpose; the first is run before the system has gone into secure
mode; the second is run afterwards (if in doubt, add your tools to rc.local).

Please refer to our web pages for any other questions you might have.
	https://www.OpenBSD.org
Please pay special attention to the Frequently Asked Questions section at
	https://www.OpenBSD.org/faq/

OpenBSD is free software.  You can do with it as you like, subject to very few
conditions (described at www.OpenBSD.org/policy.html).  But free software isn't
written without money.  Network links, hardware costs, release engineering and
testing work all take money and significant effort on the part of those who
have made this OpenBSD release what it is.  Please reward the developers who
have made OpenBSD what it is, and thus make it possible for this wonderful
process to continue.  For more information on how you can help, please see
www.OpenBSD.org/goals.html and visit www.OpenBSD.org/donations.html to see a
list of those who have donated money, equipment, or other resources to ensure
OpenBSD continues.

If you wish to ensure that OpenBSD runs better on your machines, please do us
a favor (after you have your mail system configured!) and type something like:
 # (dmesg; sysctl hw.sensors) | \
	mail -s "Sony VAIO 505R laptop, apm works OK" dmesg@openbsd.org
so that we can see what kinds of configurations people are running.  As shown,
including a bit of information about your machine in the subject or the body
can help us even further.  We will use this information to improve device driver
support in future releases.  (Please do this using the supplied GENERIC kernel,
not for a custom compiled kernel, unless you're unable to boot the GENERIC
kernel.  If you have a multi-processor machine, dmesg results of both GENERIC.MP
and GENERIC kernels are appreciated.)  The device driver information we get from
this helps us fix existing drivers. Thank you!

(If you wish to save it, use the "x" command.)

このメッセージは、OpenBSDボックスのシステム管理者が持つ可能性のある最も基本的な初期の質問を記述しようとしています。
このメッセージは後で参照できるように保存することをお勧めします。

VirtualBOXにOpenBSD6.2をインストールする

2018/02/17 OpenBSD6.2::Install
OpenBSD https://www.openbsd.org/
より近くのミラーサイトを探し、amd64のディスクイメージをダウンロードした。

VirtualBOXにて仮想環境を構築する。
プロセッサ数: 1
メモリ: 1GB
ビデオメモリ: 16MB
HDD: 4GB


上記システム上にOpenBSD 6.2をインストールする。
OpenBSDinstall62.iso をブートディスクにして、起動。

...
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcom to the OpenBSD/amd64 6.2 installation program.
(I)nstall, (U)pgrade, (A)utoinstall, or (S)hell?
i を押して (I) を選択し、Enter を押す。

...

Choose your keyboard layout('?' or 'L' for list) [default]
? か L を押せば一覧が表示される。
日本語キーボードならjpを入力する。
日本語キーボードでCtrlとCapsを入れ替えるならjp.swapctrlcapsを入力する。

...
System hostname? (short form, e.g. 'foo')
インストールするマシンの名前を入力。

...

Available network interfaces are: em0 vlan0.
Which one do you wish to configure? (or 'done' ) [em0]
ネットワークインタフェースが複数見つかるとどれを使うのかきいてくるようだ。
vlan0 は VirtualBOX の仮想アダプタで、em0 はPCの実際のネットワークアダプタ。
em0 はマシンによって異なる。
特に問題なければそのままenterですすめる。

...
IPv4 address for em0? (or 'dhcp' or 'none' ) [dhcp]
IPアドレスが固定ならここで入力する。
ルーターなどで割り振られるならdhcpにする。

...
IPv6 address for em0? (or 'rtsol' or 'none' ) [none]
IPv6のアドレスを設定するならここで行う。
今の環境はIPv4でつながるのでnoneを選択する。

...
Available network interfaces are: em0 vlan0.
Which one do you wish to configure? (or 'done') [done]
今行った設定で良ければdoneを選択する。
設定し直す場合や他のネットワークインターフェースを設定する場合は該当インタフェースを選ぶ。

...
Default IPv4 route? (IPv4 address or 'none') [192.168.0.1]
IPv4アドレス を dncp で設定したのでルータのアドレスを指定する。

...
DNS domain name? (e.g. 'example.com') [my.domain]
ドメイン名を指定する。
取得したドメイン名があればそれを設定すればよいが、無い場合は自由に使えるドメインがあるのでそれを設定する。
取り敢えずここでは'example.jp'を設定した。
予約ドメイン名
example.com
example.net
example.org
例示用の予約されたセカンドレベル・ドメイン名
.com、.net、.orgというgTLD(generic TLD。汎用TLD)にも、例示/実験用のセカンドレベル・ドメインが定義されている。
http://www.atmarkit.co.jp/fwin2k/win2ktips/801exampledom/exampledom.html

...

Password for root account? (will not echo)
ここでrootアカウントのパスワードを設定する。
入力しても表示はされない。

...
Password for root account? (again)
先程入力したパスワードを確認の為、再度入力。

...
Start sshd(8) by default? [yes]
sshでリモート接続するならyesを選択。

...
Do you expect to run the X Window System? [yes]
X Windows System を利用するならyesを選択。

...
Do you want the X Window System to be started by xenodm(1)? [no]
X Windows System を ウインドウマネージャxenodm から起動するならyesを選択。

...
Setup a user? (enter a lower-case loginname, or 'no') [no]
ユーザの作成を行うかきいてくるので、作成するユーザ名を入力。
不要ならnoを選択。

...
Full user name for testuser? [testuser]
testuserというユーザを作成するので、フルネームを入力する。
特に必要なければそのままenter。

...
Password for user testuser? (will not echo)
testuser のパスワードを設定。
入力した文字は表示されない。

...
Password for user testuser? (agein)
確認の為、再度パスワード入力。

...
WARNING: root is targeted by password guessing attacks, pubkeys are safer.
Allow root ssh login? (yes, no, prohibit-password) [no]
root は攻撃対象となり、公開鍵でログインする方が良い。
sshへrootでのログインを自由に認める場合はyesを、公開鍵でログインするならprohibit-passwordを、完全に禁止するならnoを選択。
今はユーザを作成したのでnoを選択。

...
What timezone are you in? ('?' for list) [Asia/Tokyo]
今のタイムゾーンを選択。
デフォルトがTokyoになっているのでこのままenter。


...

Available disks are: wd0
Which disk is the root disk? ('?' for details) [wd0]
ここよりHDDの設定。
インストール先のHDDを選択する。

...
Disk: wd0       geometry: 522/255/63 [8388608 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0  -     0   0   0 [           0:           0 ] unused
 1: 00      0   0   0  -     0   0   0 [           0:           0 ] unused
 2: 00      0   0   0  -     0   0   0 [           0:           0 ] unused
 3: 00      0   0   0  -     0   0   0 [           0:           0 ] unused
Use (W)hole disk MBR, whole disk (G)PT or (E)dit? [whole]
ハードディスクを選択すると上記のような文字が表示される。
このハードディスクは何も入っていないので unused が表示されている。
ディスク容量が2TBを超えるならGPTを選ぶが、今の環境は4GBなのでMBRを選択する。
このままenterを押す。

...
Setting OpenBSD MBR partition to whole wd0...done.
The auto-allocated layout for wd0 is:
#                size           offset  fstype [fsize bsize   cpg]
 a:            902.9M               64  4.2BSD   2048 16384     1 # /
 b:            256.0M          1849248    swap
 c:           4096.0M                0  unused
 d:           2505.7M          2373536  4.2BSD   2048 16384     1 # /usr
 e:            430.0M          7505280  4.2BSD   2048 16384     1 # /home
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]
HDDの全体をOpenBSDで使用する為、自動でパーテーション内の割当が表示される。
ここで変更することも出来る。
これで良ければ[a]を選択する。

...

let's install the sets!
Location of sets? (cd0 disk http or 'done') [cd0]
インストール元のデータの入手先を聞かれるので選択します。
今はCDブートで起動しているので[cd0]を選択します。

...
Pathname to the sets? (or 'done') [6.2/amd64]
インストール元のデータの場所を聞かれるので選択します。
上でcd0を選択したなら特に変更する必要はないでしょう。

...

Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'.
    [X] bsd           [X] comp62.tgz    [X] xbase62.tgz   [X] xserv62.tgz
    [X] bsd.rd        [X] man62.tgz     [X] xshare62.tgz
    [X] base62.tgz    [X] game62.tgz    [X] xfont62.tgz
Set name(s)? (or 'abort' or 'done') [done]
インストールするファイルを選択する。
デフォルトでは全てが選択されている。
不要なファイルが有れば、'-ファイル名'と入力する。
ワイルドカードを用いて選択もできる。
今回はすべてインストールする。


...
Directory does not contain SHA256.sig. Continue without verification? [no]
SHA256.sig が無いことを警告される。
確認せずにインストールするので[yes]を選択。

...
Location of sets? (cd0 disk http or 'done') [done]
まだ他にインストールするファイルが有れば場所を指定。
インストールが完了すれば[done]を選択。

...
Time appears wrong.  Set to 'Sat Feb 17 16:10:28 JST 2018'? [yes]
現在時刻をきいてくるのでよければ[yes]を選択。

...

CONGRATULATIONS! Your OpenBSD install has been successfully completed!
To boot the new system, enter 'reboot' at the command prompt.
When you login to your new system the first time, please read your mail
using the 'mail' command.

#
この画面になればインストールは完了。
このまま、rebootを実行し、システムにログインしたら mailコマンドでメールを読むことを勧められる。
ブートディスクを抜いてからrebootを実行すれば、OpenBSDが起動する。
OK キャンセル 確認 その他