2019/10/18(金)OpenBSD6.6 リリース

OpenBSD6.6がリリースされた。

色々変わったことが有るようだが、アップグレードが sysupgradeで行えるようになった。
機会を見て Pine64 にインストールしている OpenBSD6.5 を更新してみることにする。


OpenBSD 6.6 Released
https://openbsd.org/66.html

Announce: https://marc.info/?l=openbsd-tech&m=157132024225971&w=2

Upgrade Guide: https://openbsd.org/faq/upgrade66.html

Changelog: https://openbsd.org/plus66.html

2019/10/01(火)PINE64+ に OpenBSD6.5 をインストールした

PINE に OpenBSD6.5 をインストールした。
内容は以前に行った内容と同じである。

シングルボードコンピュータへのOpenBSDのインストール
https://hesy.dyndns.dk/019


インストールに使ったのは次のボードである。
PINE A64 (+)
https://www.pine64.org/devices/single-board-computers/pine-a64/
PINE A64 Wiki
https://wiki.pine64.org/index.php/PINE_A64_Main_Page


まず公式サイトからインストール用ファイルをダウンロードする。
https://www.openbsd.org/faq/faq4.html
minirootXX.fs [arm64] から miniroot65.fs をダウンロードした。


LinuxなどのUnix系OSを使い、マイクロSDカードにデータを書き込む。
次のコマンドは Ubuntu で実行したもので 書き込む先のマイクロSDは /dev/sdb となっている。
$ sudo dd if=miniroot65.fs of=/dev/sdb bs=1M status=progress


書き込みが終われば、PINE に挿し込む、シリアル接続し、LANケーブルを繋いだ後、電源ケーブルを差す。
シリアルの接続は以前の記事を見てもらうとして、今回はシリアルのコンソールをTeraTermProにした。

コンソール画面にはインストールの画面が表示されるので指示に従い入力を行えばインストールが出来る。

インストールが完了した直後のOSの容量は次のようになっていた。
尚、インストールはXを含めすべてを導入済みである。
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a      1.7G    938M    751M    56%    /
かなり軽量ではあるが、以前と比べるとかなりデータ量が増えたようだ。

2019/07/01(月)OpenBSD の vi

インストールされているのはnviであるので、vimはインストールされていない。
viコマンドはハードリンクによりex、viewと同じ実体である。
/usr/bin/ex
/usr/bin/vi
/usr/bin/view

viの設定は、次のファイルに書く。
  1. /etc/vi.exrc
  2. $HOME/.nexrc
  3. $HOME/.exrc
vi.exrc はシステム全体にする設定を書く。
.nexrc、.exrc は個人の設定を書き込む。設定は .nexrc が先に読み込まれる。


マニュアルによると次のオプションがある。
altwerase [off]
vi only. Select an alternate word erase algorithm.

autoindent, ai [off]
Automatically indent new lines.

autoprint, ap [on]
ex only. Display the current line automatically.

autowrite, aw [off]
Write modified files automatically when changing files or
suspending the editor session.

backup [""]
Back up files before they are overwritten.

beautify, bf [off]
Discard control characters.

cdpath [environment variable CDPATH, or current directory]
The directory paths used as path prefixes for the cd command.

cedit [no default]
Set the character to edit the colon command-line history.

columns, co [80]
Set the number of columns in the screen.

comment [off]
vi only. Skip leading comments in shell, C and C++ language
files.

edcompatible, ed [off]
Remember the values of the `c' and `g' suffixes to the s, & and ~
commands, instead of initializing them as unset for each new
command.

escapetime [1]
The tenths of a second ex/vi waits for a subsequent key to
complete an key mapping.

errorbells, eb [off]
ex only. Announce error messages with a bell.

exrc, ex [off]
Read the startup files in the local directory.

extended [off]
Use extended regular expressions (EREs) rather than basic regular
expressions (BREs). See re_format(7) for more information on
regular expressions.

filec []
Set the character to perform file path completion on the colon
command line.

flash [off]
Flash the screen instead of beeping the keyboard on error.

hardtabs, ht [0]
Set the spacing between hardware tab settings. This option
currently has no effect.

iclower [off]
Makes all regular expressions case-insensitive, as long as an
upper-case letter does not appear in the search string.

ignorecase, ic [off]
Ignore case differences in regular expressions.

keytime [6]
The tenths of a second ex/vi waits for a subsequent key to
complete a key mapping.

leftright [off]
vi only. Do left-right scrolling.

lines, li [24]
vi only. Set the number of lines in the screen.

list [off]
Display lines in an unambiguous fashion.

lock [on]
Attempt to get an exclusive lock on any file being edited, read
or written.

magic [on]
When turned off, all regular expression characters except for `^'
and `$' are treated as ordinary characters. Preceding individual
characters by `\' re-enables them.

matchtime [7]
vi only. The tenths of a second ex/vi pauses on the matching
character when the showmatch option is set.

mesg [on]
Permit messages from other users.

noprint [""]
Characters that are never handled as printable characters.

number, nu [off]
Precede each line displayed with its current line number.

octal [off]
Display unknown characters as octal numbers, instead of the
default hexadecimal.

open [on]
ex only. If this option is not set, the open and visual commands
are disallowed.

paragraphs, para [IPLPPPQPP LIpplpipbpBlBdPpLpIt]
vi only. Define additional paragraph boundaries for the and
commands.

path [""]
Define additional directories to search for files being edited.

print [""]
Characters that are always handled as printable characters.

prompt [on]
ex only. Display a command prompt.

readonly, ro [off]
Mark the file and session as read-only.

recdir [/tmp/vi.recover]
The directory where recovery files are stored.

remap [on]
Remap keys until resolved.

report [5]
Set the number of lines about which the editor reports changes or
yanks.

ruler [off]
vi only. Display a row/column ruler on the colon command line.

scroll, scr [($LINES - 1) / 2]
Set the number of lines scrolled.

searchincr [off]
Makes the / and ? commands incremental.

sections, sect [NHSHH HUnhshShSs]
vi only. Define additional section boundaries for the [[ and ]]
commands.

secure [off]
Turns off all access to external programs.

shell, sh [environment variable SHELL, or /bin/sh]
Select the shell used by the editor.

shellmeta [~{
Set the meta characters checked to determine if file name
expansion is necessary.

shiftwidth, sw [8]
Set the autoindent and shift command indentation width.

showmatch, sm [off]
vi only. Note matching `' and `(' for `' and `)' characters.

showmode, smd [off]
vi only. Display the current editor mode and a "modified" flag.

sidescroll [16]
vi only. Set the amount a left-right scroll will shift.

tabstop, ts [8]
This option sets tab widths for the editor display.

taglength, tl [0]
Set the number of significant characters in tag names.

tags, tag [tags]
Set the list of tags files.

term, ttytype, tty [environment variable TERM]
Set the terminal type.

terse [off]
This option has historically made editor messages less verbose.
It has no effect in this implementation.

tildeop [off]
Modify the ~ command to take an associated motion.

timeout, to [on]
Time out on keys which may be mapped.

ttywerase [off]
vi only. Select an alternate erase algorithm.

verbose [off]
vi only. Display an error message for every error.

w300 [no default]
vi only. Set the window size if the baud rate is less than 1200
baud.

w1200 [no default]
vi only. Set the window size if the baud rate is equal to 1200
baud.

w9600 [no default]
vi only. Set the window size if the baud rate is greater than
1200 baud.

warn [on]
ex only. This option causes a warning message to be printed on
the terminal if the file has been modified since it was last
written, before a ! command.

window, w, wi [environment variable LINES - 1]
Set the window size for the screen.

windowname [off]
Change the icon/window name to the current file name even if it
can't be restored on editor exit.

wraplen, wl [0]
vi only. Break lines automatically, the specified number of
columns from the left-hand margin. If both the wraplen and
wrapmargin edit options are set, the wrapmargin value is used.

wrapmargin, wm [0]
vi only. Break lines automatically, the specified number of
columns from the right-hand margin. If both the wraplen and
wrapmargin edit options are set, the wrapmargin value is used.

wrapscan, ws [on]
Set searches to wrap around the end or beginning of the file.

writeany, wa [off]
Turn off file-overwriting checks.

2018/08/26(日)シングルボードコンピュータへのOpenBSDのインストール

シングルボードコンピュータ に OpenBSD をインストールしてみた。
使用したボードは
PINE A64+ 1GB
を用いた。
マイクロSDは2GBを使った。

まず、PINE A64+と操作するコンピュータをシリアル接続する。
今回は秋月電子で次のケーブルを入手した。
FTDI USB・シリアル変換ケーブル(3.3V)[TTL-232R-3V3]
このケーブルのピン配置は次のようになっている。
黒:GND
茶:CTS
赤:VCC(5V最大75mA出力)
橙:TXD
黄:RXD
緑:RTS

PINE A64のピンの配置は次のページを参照。
GPIOs geographical layout
http://synfare.com/599N105E/hwdocs/pine64/gpiosgeo.html
UART Serial ports
http://synfare.com/599N105E/hwdocs/pine64/uartserial.html

今回はPINEA64 の Exp の X7,X8,X9 を使った。
シリアル接続は取り敢えず3本接続すれば繋がる。
GND同士をつなぎ、TXとRXを繋ぐ。次の様な感じ。







PINE A64シリアル変換ケーブル
X7 UART0_TX黄:UART_RXD
X8 UART0_RX橙:UART_TXD
X9 GND黒:GND



次にOpenBSDのサイトからファイルを落とす。
https://www.openbsd.org/faq/faq4.html
minirootXX.fs の arm64 からファイルをダウンロードした。
今回使ったファイルは miniroot63.fs 。

UNIX系OSならddコマンドでマイクロSDに書き込む。
書き込み先が/dev/sdbの場合、例えばこんな感じで。
sudo dd if=./miniroot63.fs of=/dev/sdb bs=1M

書き込みが済めば、マイクロSDをPINE A64+に挿す。
PINE A64+にシリアルケーブルを接続し、PC(Win10)のUSBに接続する。

PCにはシリアル接続のためのソフトを起動しておく。
もしもソフトがないなら、次のページを参考にする。
マイクロテクニカ製品サポートFAQ
http://www.microtechnica.tv/faq/faq.cgi?kate=Maeni&faq=4

今回はSerialCommunicatorを使った。
ポートを適切に設定し、ボーレートを115200に設定、connectをしておく。
comポートはUSBを指した後に新しく認識したポートを設定すればいい。


ここまで準備できれば、PINE A64+の電源を入れる。
起動の画面がPC側のシリアル接続のソフトに表示される。

ここからOpenBSDのインストール画面になるので、
通常通りインストールすればよい。

どうやらHDMIからの映像出力は今できないみたい。

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ボックスのシステム管理者が持つ可能性のある最も基本的な初期の質問を記述しようとしています。
このメッセージは後で参照できるように保存することをお勧めします。
OK キャンセル 確認 その他