河豚板ガイド
をテンプレートにして作成
Start:
*河豚板とは [#s592cdf8]
RIGHT:川俣 吉広~
kaw@on.rim.or.jp
河豚板(ふぐいた)はOpenBSDというオペレーティングシステム...
河豚板は無償で入手・利用することができ、DVDやUSBメモリに...
さらに、河豚板はバラエティに富んだ起動方法をサポートして...
この河豚板ガイドでは、記録メディアへの河豚板の書込み方法...
>Unix系OSの使用経験があまりなく、Unixの基本的な事柄につい...
LinuxやFreeBSDなど他のUnix系OSの使用経験がありOpenBSDにつ...
----
''【河豚板ガイド 目次】''
#contents
----
>''【おことわり】'' ~
''⇒''この文書は無保証です。~
この文書を作成するにあたり著者は正確な内容と明確な表現を...
なおこの文書に関して、不明瞭な表現、不足している部分、事...
*河豚板を作る [#w5465a04]
この章では、河豚板が起動するDVDやUSBメモリを作成する方法...
河豚板を使うには、主に2つの方法があります。
1つはDVD-RやDVD-RWに河豚板を書込み、これを起動する方法で...
もう1つはUSBメモリに書込んだものを起動する方法で、こちら...
河豚板はLiveDVD版とLiveUSB版のどちらを使用しても同じよう...
-一般的にはUSBメモリの方がDVDよりデータの読み出し速度が早...
-古いPCのなかにはUSBメモリからうまく起動できないものや起...
対してDVDのドライブは標準化された規格に準拠して製造されて...
-河豚板などの「ライブシステム」は、ハードディスクなどにイ...
LiveUSB版の河豚板にはデータの保存領域が確保されており、こ...
-記録メディアの単価はUSBメモリに比べDVD-Rなどの光学メディ...
総じて「動作の確実性や経済性を求めるのであればLiveDVD版が...
>''【メモ】'' ~
''⇒''[[LiveDVD版とLiveUSB版の両方を同時に使う>#o7bfa547]]...
このテクニックを使うと、例えば「USB起動に対応していないPC...
最初に河豚板を使い始めるには、以下の手順を踏みます;
+河豚板の配布サイトからファイルをダウンロードする
+ダウンロードしたファイルは圧縮されているので、それを展開...
+展開したファイルをDVD-RやUSBメモリに書き込む
以下、それぞれの手順について説明をします。
**河豚板をダウンロードする [#vd7f3e84]
#ref(dlsite.png,around,right)
河豚板はフリーソフトウェアです。河豚板の最新版を始めとし...
河豚板のダウンロードサイトは4つあります。
-https://jp1.dl.fuguita.org/
-https://jp2.dl.fuguita.org/
-https://de.dl.fuguita.org/
-https://fr.dl.fuguita.org/
サイトの内容は同じなので、どちらのサイトからでも同じよう...
日本国内からは、jp1.dl.fuguita.org または jp2.dl.fuguita....
これらのサイトにアクセスすると、右図のような内容が表示さ...
このうち、「FuguIta-」で始まる名前のファイルが河豚板の配...
#clear
このファイル名の意味は、次のようになっています。
FuguIta-6.7-amd64-202006244.iso.gz
--- ----- --------- --- --+->ファイルの圧縮形式...
| | | | ・gz ... gzipコマン...
| | | | ・xz ... xzコマンド...
| | | | (現在はgzip形式での...
| | | +->ファイルの種類です
| | | ・iso ... DVD-R/DVD-RW書...
| | | ・img ... USBメモリ書込...
| | | ・tar ... 複数のファイル...
| | |
| | +->河豚板のリリース(バージョン)...
| | ・「年月日」「一連番号」 の形式...
| | ・一連番号は、一日のうち2つ以...
| | 一つづつ増えて行きます
| |
| +->対応プラットフォームです。
| 河豚板は現在、i386, amd64, arm64の3種...
| しています。お使いのPCのCPU型式に対応し...
|
+->この河豚板の元となっているOpenBSDのバージョ...
作成するのがLiveDVDか、あるいはLiveUSBか、PCのがインテル...
>''【メモ: 対応アーキテクチャについて】'' ~
''⇒''上で説明したように、使用しているPCのCPUの種類によっ...
arm64はシングルボードコンピュータ「Raspberry Pi 3」版の河...
ダウンロードが完了したら、圧縮されているファイルを展開し...
以下は、Unix系のOSでシェルのコマンドラインからDVD-R/DVD-R...
gzip -d FuguIta-6.0-amd64-201612251.iso.gz
展開が完了するとファイルサイズが約1ギガバイトになり、フ...
>''【ご注意】'' ~
''⇒''「Raspberry Pi 3」版の河豚板は、tar形式のアーカイブ...
tar xzvf FuguIta-6.7-arm64-202006244.tar.gz
Raspberry Pi 3版河豚板の作成方法、および起動方法について...
**河豚板のLiveDVDを作る [#f68a63fc]
LiveDVD版の河豚板を作るにはDVD-RやDVD-RWなどの書込み可能...
以下は、OpenBSD上で書き込みを行う場合の例です;
pkg_add dvd+rw-tools ←DVDの書込みソフ...
growisofs --dvd-compat -Z /dev/rcd0c=FuguIta-6.7-amd64-2...
>''【メモ】'' ~
''⇒''他のOSでも[[ISOイメージ書き込みソフトが公開されてい...
**河豚板のLiveUSBを作る [#i222ed0b]
LiveUSB版の河豚板を作るには2ギガバイト以上のサイズのUSB...
以下は、OpenBSDを使用して書き込みを行う場合の例です;
dd if=FuguIta-6.7-amd64-202006244.img of=/dev/rsd0c
>&color(red){''【ご注意】''};~
&color(red){''!!''上の例の「/dev/rsd0c」の部分は書き込...
>''【メモ】''~
''⇒''ISOイメージ書込みソフト同様、[[生イメージ書き込み用...
''⇒''2ギガバイト以上のUSBメモリを使用しても、2ギガバイ...
USBメモリのサイズに合ったLiveUSB版河豚板を作成したい場合...
*河豚板を起動する [#z10a837d]
この章では河豚板の起動方法、およびその途中で行う設定値の...
**起動デバイスの選択 [#g59fd44e]
河豚板を書き込んだDVDやUSBメモリをPCにセットして起動する...
>''【メモ】''~
''⇒''DVDやUSBメモリをセットして起動しても、すでにインスト...
河豚板を起動できるようにするにはPCのBIOSメニューの設定を...
PCのBIOSメニューは機種により異なりますので、お使いのPCの...
河豚板が起動すると、以下のようなメッセージが表示されます;
>> OpenBSD/amd64 CDBOOT 3.46
boot>
booting cd0a:/bsd-fi.mp: 12997960+2769928+2277408+0+7086...
entry point at 0xffffffff81001000
[ using 2587528 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. Al...
Copyright (c) 1995-2020 OpenBSD. All rights reserved. h...
OpenBSD 6.7-stable (RDROOT.MP) #1: Fri Jun 5 09:41:45 J...
root@nimbus9.localnet:/opt/fi/6.7/sys/arch/amd64/com...
real mem = 1056825344 (1007MB)
avail mem = 1010286592 (963MB)
mpath0 at root
〜略〜
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
uhub1: illegal enable change, port 1
root on rd0a swap on wd0b dump on rd0b
>''【メモ】''~
''⇒''実際には画面表示が途中から&color(white,blue){青地に...
このメッセージはカーネル(オペレーティングシステム本体)が...
#ref(fuguboot.png,wrap)
これらの表示にはPCのメモリや周辺機器の接続状態などの認識...
OpenBSDカーネルの起動が完了すると、河豚板のバナーが表示さ...
============================================
= ______ __ _
= / ____/ | |_| |__
= / /____ ______ __ _| /_ _/_____
= / ___/ / / / __ \/ / / | | | | / _ |
= / / / /_/ / /_/ / /_/ /| | | |_| (_) |__
=/_/ \____/\__ /\____/ |__| \___/____/__/
= __/ /
= /___/
=
= Welcome to FuguIta - OpenBSD Live System!
= http://fuguita.org/
=============================================
河豚板のバナー表示に続きこのPCに接続されているディスク機...
以下の例では「FuguIta's operating device(s): cd0a.」とあ...
よって、「Which is FuguIta's operating device?」(河豚板...
>''【メモ】''~
''⇒''これ以降、様々な値を入力してゆきますが、それらのプロ...
scanning partitions: cd0a sd1d
FuguIta's operating device(s): cd0a.
Which is FuguIta's operating device? [default: cd0a] -> ...
>''【メモ】''~
''⇒''OpenBSDオペレーティングシステムでは、ディスク機器に...
-最初のアルファベット数文字 ... 機器の種類
--cd ... CD, DVDやBlu-Rayなどの光学ドライブ
--wd ... ハードディスク(IDE, SATA接続)
--sd ... USBメモリ、SDカード、メモリスティック、SATA接続...
--fd ... フロッピーディスク
-それに続く数字 ... その種類の機器が複数接続されてる場合...
-最後のアルファベット ... その機器内の区画(パーティション)~
パーティションは概ね、以下のように使用されています;
--c ... その機器全体を表します
--b ... その機器内のOpenBSDスワップパーティションを表します
--a, d〜h ... OpenBSDのファイルが格納されるパーティション...
--i, j など ... WindowsやLinux用のパーティションはこのi, ...
-注)cパーティション、bパーティション以外は慣習的にそのよ...
**mfsサイズの設定 [#lab8d0b5]
続いて、メモリに関する設定を行います。
以下の例ではまず、このPCでは1007メガバイトのメモリが使用...
そして、その1007MBのメモリの内、何メガバイトをmfsに割り当...
河豚板は通常、PCに内蔵されたハードディスクを使用しないた...
設定値の入力箇所には「default: 755M」と表示されており、<E...
通常は<Enter>キーだけの入力で問題ありません。
activating swap partition: /dev/sd0b
available memory: 1007M
total swap size: 16M
Enter mfs size.
You can add suffix K, M, or G.
% is a percentage of memory size.
and %% is a percentage of the total memory and swap.
otherwise considered "megabytes"
[default: 755M] -> ← <Enter>のみ入力
set mfs size to 755MB
''【メモ】''~
''⇒''表示で説明されているように、入力値には「K」「M」「G...
何も付けず数字だけの場合はメガバイトと見なされます。
''【メモ】''~
''⇒''mfsの最大容量には、アーキテクチャ毎に最大値が決って...
///>''【メモ】''~
///''⇒''0ではない数値を入力した場合はその値がmfsが保持で...
**起動モードの選択 [#ve0c5d62]
続いて起動モードの選択に移ります。
起動モードにはモード0からモード5までの6種類がありますが、...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->0
Running manual setup.
Copying system files to /ram ... done
Extracting symlinks from /ram to /fuguita ... done
>''【メモ】''~
''⇒''他のモードについては [[河豚板を使う【一般編】>#v7ad3...
**キーボードレイアウトの設定 [#l7dd451d]
次はキーボードの言語設定です。
日本語キーボードの場合は「jp」又は「jp.swapctrlcaps」を入...
「jp.swapctrlcaps」を入力すると、<Control>キーと<Caps>キ...
EmacsエディタやBashシェルなどのキー割り付けに慣れている方...
Enter keyboard type.
pc-xt/pc-at keyboard:
us de de.nodead fr fr.dvorak dk dk.nodead it uk jp sv sv...
declk us.dvorak us.colemak us.swapctrlcaps us.iopener uk...
lcaps fr.swapctrlcaps fr.swapctrlcaps.dvorak be.swapctrl...
rak us.swapctrlcaps.colemak us.swapctrlcaps.iopener es b...
sf.nodead pt lt la br tr tr.nodead pl hu si cf cf.nodead...
odead ee ee.nodead
keyboard type -> jp
**管理者パスワードの設定 [#s2ae4507]
キーボード設定に続き、管理者パスワードの設定を行います。
OpenBSDなどのUnix系OSでは、システム管理者のことを「スーパ...
スーパーユーザには、あらかじめ「root」というユーザ名が割...
Changing password for root.
New password: ← パスワー...
Retype new password: ← 確認のた...
>''【メモ】''~
''⇒''OpenBSDでは入力したパスワードが短かすぎたり単純過ぎ...
設定するパスワードには以下のようなものが推奨されています;
-半角6文字以上
-アルファベットの大文字と小文字を混在させる
-数字や記号文字、制御文字なども混ぜる
**ネットワーク関連の設定 [#r0b7d6e7]
次に、ネットワーク関連の設定を入力します。
>&color(red){''【ご注意】''};~
&color(red){''!!''ネットワークの設定内容は接続するネッ...
***ホスト名の設定 [#c96987b8]
最初に、河豚板を走らせるPCに名前(ホスト名: host name)を付...
ホスト名は、ドメイン付き(FQDN: Fully Qualified Domain Nam...
閉じたネットワーク内で使用する場合など、ドメイン無しで構...
この例ではホスト名として「fugu-demo.localnet」という名前...
Hostname with domain part (FQDN):
only host name without domain part is also OK.
-> fugu-demo.localnet
>''【メモ】''~
''⇒''家庭内のネットワークなどでは、ドメイン名は正式に登録...
組織によって管理されているネットワークの場合は、そのネッ...
***IPプロトコルバージョンの選択 [#b1fe3bbb]
次は使用するIPプロトコルバージョンの設定です。
IP protocol version(s) to be enabled: 4, 6, 46, 64 or "n...
4: enable only IPv4
6: enable only IPv6
46: give priority to IPv4 name resolution
64: give priority to IPv6 name resolution
none: operate as standalone
[64] ->
IPv4プロトコルだけを使用して通信を行う場合は「4」を、IPv6...
「none」を入力するとIPネットワークに関する設定は行なわれ...
~<Enter>キーのみを入力した場合は、「64」を入力したものと...
通常は<Enter>キーのみの入力で問題ありません。
>''【メモ】''~
''⇒''IPv4、IPv6両方を使用する場合は「46」と「64」のどちら...
「46」ではIPv4を優先してアドレスの問合せを行い、逆に「64...
***ネットワークインターフェースの設定 [#rf0db1af]
続いてネットワークインターフェースの設定を行います。
まず、このPCに接続されているネットワークインターフェース...
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge1 ether Broadcom BCM57766
ure0 ether Realtek USB 10/100/1000 LAN
run0 wifi Ralink 802.11 n WLAN
[bge1] ->
>''【メモ】''~
「bge」はBroadcom社製のギガビットイーサネットインターフェ...
bge以外のイーサネットインターフェースやWi-Fiインターフェ...
個々のネットワークインターフェースについてはOpenBSDに内蔵...
#aname(wifi-set)
***Wi-Fiの設定 [#uc1e3dd5]
このあと、ネットワークインターフェースとしてWi-Fiデバイス...
Wi-Fi settings:
SSID -> my-wifinet ← 接続したいWi-FiのSSID...
WPA Key -> my-wpa-secrect-key ← WPAの鍵を入力
なお、WPAの鍵をENTERのみ入力し、設定を行わなかった時にWEP...
WEP方式は現在では簡単に暗号を解読されてしまうため、WEPは...
SSID -> my-wifinet
WPA Key ->
WEP Key -> my-wep-unsecured-key
>''【メモ】''~
''⇒''Wi-Fiデバイスには、デバイスメーカーが供給するファー...
この場合は有線LANを設定してインターネットに接続した後、[[...
''⇒''WEP鍵の入力に対してENTERのみを入力した場合はWPA・WEP...
***IPv6の設定 [#me426305]
IPv6を有効にした場合は、以下の設定入力が表れます。
説明にあるように、"auto"、あるいは手動によりアドレスを設...
多くの場合、"auto"で対応可能です。
IPv6 - address and routing:
Enter "auto" or "IPv6_address[/prefixlen] [default_gat...
"auto" is an automatic setting by SLAAC.
The "/prefixlen" part can be an integer between 0 and ...
If there is no default gateway, set the second field t...
[auto] ->
>''【メモ】''~
''⇒''"/prefixlen"を省略した場合、"/64"を指定したと見做さ...
***IPv4の設定 [#mae50aaa]
IPv4を有効にした場合は、以下の設定入力が表れます。
説明にあるように、アドレス自動設定を行う場合は"auto"を指...
下記の例ではアドレスの入力を行うことで、手動によるアドレ...
IPv4 - address and routing:
Enter "auto" or "IPv4_address[/mask] [default_gateway]"
"auto" is an automatic setting by DHCP.
The "/mask" part can be specified in either format, su...
If there is no default gateway, set the second field t...
[auto] -> 192.168.1.147/24 192.168.1.254
>''【メモ】''~
''⇒''"/mask"を省略した場合は、適切と思われるネットマスク...
''⇒''IPv4アドレスの自動設定を使用するには、そのネットワー...
家庭用のネットワーク機器や公共のWi-FiスポットではDHCPサー...
***DNSサーバの設定 [#z6a5674c]
IPv4やIPv6の設定で手動によるアドレス設定を行った場合、DNS...
DNSサーバのIPアドレスを最大3つまで、スペースで区切って入...
DNS servers: up to 3 IP addresses, separated by spaces
-> 192.168.1.253
>''【メモ】''~
''⇒''DNS (Domain Name System)とは、「fuguita.org」のよう...
''⇒''IPアドレスを直接指定して通信する場合はDNSサーバは必...
***設定値の書込み [#k69e671b]
最後に、今まで入力した設定値を反映した設定ファイルが「/et...
writing configured values to:
/etc/fuguita/netconfs/default/myname
/etc/fuguita/netconfs/default/mygate
/etc/fuguita/netconfs/default/hosts
/etc/fuguita/netconfs/default/hostname.bge1
/etc/fuguita/netconfs/default/resolv.conf
**ログイン方法の選択 [#ue53afbc]
最後に、どのような方法でログインするかを指定します。~
ログイン方法には、このままコンソール画面から行う方法と、X...
以下の例では<Enter>キーのみを入力して、デフォルトのコンソ...
Do you login with C)onsole or X) Window System?
[default: C] ->
X Window Systemからのログインを行うには、「x」を入力しま...
起動時の設定は以上です。残った初期化処理を行った後は[[ロ...
____________________________________________...
/ Setup for FuguIta ends. /
/ OpenBSD's boot sequence will follow. /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Automatic boot in progress: starting file system checks.
kbd: keyboard mapping set to us
pf enabled
machdep.allowaperture: 0 -> 2
machdep.lidaction: 1 -> 0
〜略〜
starting network daemons: sshd smtpd sndiod.
running rc.firsttime
Path to firmware: http://firmware.openbsd.org/firmware/6...
Installing: vmm-firmware
starting local daemons: cron.
fuguita: disabled KARL because of read-only media
Thu Jul 2 06:51:57 UTC 2020
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
ログインプロンプト「login:」が表示されると、このPCはユー...
以降は [[河豚板を使う>#v7ad37bc]] にて説明を致します。
*河豚板を使う【一般編】 [#h70740c9]
[[河豚板を起動する>#i322b9ad]] では起動及びその設定方法に...
この章ではシステムが起動完了し、実際に使用する時の基本的...
また、Unix系OSになじみのない人、そして他のUnix系OSを使用...
**システム管理者としてログイン・ログアウトする [#g0a4a925]
河豚板の起動が完了すると、OpenBSDオペレーティングシステム...
最初はスーパーユーザのアカウントのみがログインできる状態...
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: root
Password:
OpenBSD 6.7-stable (RDROOT.MP) #1: Fri Jun 5 09:41:45 J...
Welcome to OpenBSD: The proactively secure Unix-like ope...
Please use the sendbug(1) utility to report bugs in the ...
Before reporting a bug, please try to reproduce it with ...
version of the code. With bug reports, please try to en...
enough information to reproduce the problem is enclosed,...
known fix for it exists, include that as well.
You have new mail.
fugu-demo#
ログインに成功するとシェルのプロンプト「#」が表示され、コ...
例としてpsというコマンドを実行してみます。
fugu-demo# ps -aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED ...
root 68528 3.6 0.1 868 884 00 Sp 6:51AM ...
root 1 0.0 0.1 884 532 ?? I 6:40AM ...
root 14453 0.0 0.1 792 644 ?? Ip 6:43AM ...
_slaacd 53995 0.0 0.1 812 784 ?? Ip 6:43AM ...
_slaacd 33982 0.0 0.1 800 732 ?? Ip 6:43AM ...
root 55401 0.0 0.1 712 548 ?? IU 6:44AM ...
_dhcp 78950 0.0 0.1 840 700 ?? Ip 6:44AM ...
root 86344 0.0 0.2 520 2184 ?? IpU 6:46AM ...
_syslogd 45328 0.0 0.1 1128 1488 ?? Sp 6:46AM ...
root 73380 0.0 0.1 836 584 ?? IU 6:46AM ...
_pflogd 53476 0.0 0.1 876 540 ?? Sp 6:46AM ...
_ntp 63935 0.0 0.3 1016 2868 ?? S<p 6:47AM ...
_ntp 18769 0.0 0.2 820 2508 ?? Ip 6:47AM ...
root 34145 0.0 0.2 788 1568 ?? S<pU 6:47AM ...
root 63360 0.0 0.1 1324 1280 ?? I 6:47AM ...
root 61566 0.0 0.2 1680 2052 ?? Ip 6:48AM ...
_smtpd 19845 0.0 0.4 1448 3940 ?? Ip 6:48AM ...
_smtpd 66321 0.0 0.4 1716 4240 ?? Ip 6:48AM ...
_smtpd 91561 0.0 0.4 1552 4164 ?? Ip 6:48AM ...
_smtpd 90688 0.0 0.4 1844 4396 ?? Ip 6:48AM ...
_smtpq 16446 0.0 0.4 1640 4252 ?? Ip 6:48AM ...
_smtpd 82450 0.0 0.4 1440 3988 ?? Ip 6:48AM ...
_sndio 66682 0.0 0.1 516 744 ?? I<p 6:48AM ...
_sndiop 92235 0.0 0.1 504 920 ?? IpU 6:48AM ...
root 1376 0.0 0.1 672 1268 ?? Sp 6:51AM ...
root 6575 0.0 0.0 484 360 00 R+pU/0 7:32AM ...
root 13541 0.0 0.1 288 1296 C0 I+pU 6:51AM ...
root 70324 0.0 0.1 292 1308 C1 I+pU 6:51AM ...
root 10475 0.0 0.1 296 1312 C2 I+pU 6:51AM ...
root 81779 0.0 0.1 292 1304 C3 I+pU 6:51AM ...
root 45364 0.0 0.1 284 1280 C5 I+pU 6:51AM ...
fugu-demo#
psは、現在どのようなプログラム(プロセス)が動いているかを...
システムが起動直後、しかも画面表示上動きのない様子であっ...
ログアウトするにはシェルのプロンプト「#」が出ているときに...
>''【メモ】''~
''⇒''<Control>-Dは「<Control>キーを押したままの状態でアル...
# exit
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
ログアウトすると「login:」が表示され、再度ログインできる...
**一般ユーザを登録する [#w5c31fcf]
起動直後の河豚板は、スーパユーザ(システム管理者)用のアカ...
Unix系のOSでは、通常は一般ユーザとしてログインし、日常の...
システム管理の時には一般ユーザから一時的にスーパユーザに...
>&color(red){''【ご注意】''};~
&color(red){''!!''スーパユーザでログイン中はシステムを...
以下、一般ユーザとしてyoshiというアカウントを作成してみま...
ユーザアカウントの作成もシステム管理ですので、rootで行い...
ユーザアカウントを追加するにはadduserというコマンドを使用...
まず、ユーザアカウント追加時のデフォルト値を訊かれます。...
# adduser
Couldn't find /etc/adduser.conf: creating a new adduser ...
Reading /etc/shells
Enter your default shell: bash csh ksh nologin nsh sh [k...
Your default shell is: ksh -> /bin/ksh
Default login class: authpf bgpd daemon default pbuild s...
[default]: ...
Enter your default HOME partition: [/home]: ...
Copy dotfiles from: /etc/skel no [/etc/skel]: ...
Send welcome message?: /path/file default no [no]: ...
Do not send message(s)
Prompt for passwords by default (y/n) [y]: ...
Default encryption method for passwords: auto blowfish [...
Use option ``-silent'' if you don't want to see all warn...
Reading /etc/shells
Check /etc/master.passwd
Check /etc/group
以降は、一般ユーザのアカウント「yoshi」を作成してみます。~
最初に表示されているように、入力内容は最後に訂正でき(入...
Ok, let's go.
Don't worry about mistakes. There will be a chance later...
Enter username []: yoshi ←アカウ...
Enter full name []: Yoshihiro Kawamata ←ユーザ...
Enter shell bash csh ksh nologin nsh sh [ksh]: ←<Enter>...
Uid [1000]: ←<Enter>...
Login group yoshi [yoshi]: ←<Enter>...
Login group is ``yoshi''. Invite yoshi into other groups...
[no]: wheel ←(ログイ...
Login class authpf bgpd daemon default pbuild staff unbo...
[default]: ←<Enter>...
Enter password []: ←パスワ...
Enter password again []: ←確認の...
Name: yoshi
Password: ****
Fullname: Yoshihiro Kawamata
Uid: 1000
Gid: 1000 (yoshi)
Groups: yoshi wheel
Login Class: default
HOME: /home/yoshi
Shell: /bin/ksh
OK? (y/n) [y]: y ←入力内...
Added user ``yoshi''
Copy files from /etc/skel to /home/yoshi
Add another user? (y/n) [y]: n ←他にも...
Goodbye!
#
>''【メモ】''~
''⇒''この例ではアカウントyoshiをwheelというグループにも加...
wheelに加入しているユーザは、システム管理作業を行うために...
以上で、yoshiという一般ユーザアカウントが作成されましたの...
fugu-demo# exit
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: yoshi
Password:
OpenBSD 6.7-stable (RDROOT.MP) #1: Fri Jun 5 09:41:45 J...
Welcome to OpenBSD: The proactively secure Unix-like ope...
Please use the sendbug(1) utility to report bugs in the ...
Before reporting a bug, please try to reproduce it with ...
version of the code. With bug reports, please try to en...
enough information to reproduce the problem is enclosed,...
known fix for it exists, include that as well.
fugu-demo$ pwd
/ram/home/yoshi
fugu-demo$ ls
fugu-demo$ ls -a
. .Xdefaults .cvsrc .mailrc .ssh
.. .cshrc .login .profile
fugu-demo$ ^D
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
>''【メモ】''~
''⇒''rootでログインしたときのシェルのプロンプトは「#」に...
以降の例示箇所でもこの表記に従います。~
''⇒''OpenBSDではrootアカウントでのSSHによるログインは許可...
**X Window Systemを起動してみる。 [#i594f81d]
OpenBSDはX Window Systemというグラフィック環境を含んだ形...
>''【メモ】''~
''⇒''X Window Systemは「X」や「X11」などと略して呼んでも...
Xを使用するには、[[ログイン方法の選択>#a5fdbf53]] で説明...
Do you login with Console or X Window System?
[default: Console] -> x
Xが起動すると、以下のようなログイン画面が表示されますので...
#ref(xenodm-login.png,,50%)
ログインに成功すると以下のような画面になります。
#ref(startx.png)
画面左上の白いウィンドウは「端末エミュレータ」というもの...
右上には時計が表示されています。~
左下にあるものは「xconsole」といい、システムのログ情報を...
右下の表のようなものは、「仮想デスクトップ」といい、複数...
壁紙部分(Xでは、「ルートウィンドウ」と呼びます)でマウスの...
以下の画面は、実際にアプリを実行してみた例です。
#ref(various-xclt.png,wrap)
ルートウィンドウではマウスの中ボタンや右ボタンを押すこと...
>''【メモ】''~
''⇒''Xの操作は3ボタンマウスによる操作を想定して設計され...
中ボタンのないマウスの場合は、左右のボタンを両方同時に押...
Xを終了するには、マウスの左ボタンのメニュー中、「Exit」を...
#ref(quit-verify-win.png,wrap)
>''【メモ】''~
''⇒''OpenBSDには、X Windowを使うためのソフトウェア(デスク...
**河豚板を終了する [#lc2bbc96]
河豚板の運用を終了するにはrootでログインし、shutdownコマ...
fugu-demo# shutdown -h -p now
Shutdown NOW!
shutdown: [pid 4771]
fugu-demo#
*** FINAL System shutdown message from root@fugu-demo.lo...
System going down IMMEDIATELY
System shutdown time has arrived
fugu-demo# syncing disks... done
上の例では、shutdownコマンドへの指定として -h オプション...
また、-p オプションを指定しているので停止直後に電源が自動...
~ -h オプションや -p オプションの替わりに -r オプションを...
システムの停止や再起動を行うと、今回の起動後に行った設定...
>''【メモ】''~
''⇒''これら各種の設定やデータを保存・復帰させることもでき...
河豚板上で行った操作がシステムを停止すると消えてしまうと...
つまり、rootでファイルの消去やプロセスの停止などを行って...
#aname(usbfadm_sync)
**設定やファイルを保存する - usbfadm syncコマンド[#ufce06...
河豚板ではユーザが作成したファイル、設定の変更、追加され...
データの保存にはrootでログインし、usbfadmコマンドを実行し...
>''【メモ】''~
''⇒''usbfadmは(USB Flash drive ADMinistration tool)の略で...
# usbfadm
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.0/amd64 (FuguIta-6.0-amd64-201612291)
Boot mode: manual
Data stored in: not set
Data Saved as: not set
Type ? for help.
まず、targetコマンドを使用して保存先のパーティションを指...
保存用のデバイスが装着されていることを確認した後、ENTERを...
デバイス名の前に+記号がついているものが、保存に使用するこ...
? : ? --> target
Searching USB flash drives
Please make sure the device inserted.
Then press ENTER ->
cd0a sd0a +sd0d
targe device--> sd0d
次に、saveasコマンドを使用して保存するデータに名前を付け...
名前を省略した場合、ホスト名が保存名として使用されます。
sd0d : ? --> saveas
Name of saved data --> fugu-demo
Your data will be saved as ``fugu-demo''.
当初「?:?」だったプロンプトの文字列が変化していることにご...
今ほどのtargetコマンドとsaveasで設定した値がプロンプト内...
最後にsyncコマンドを実行し、データを実際に保存します。
/dev/sd0d : fugu-demo -> sync
Sync current mfs as fugu-demo, OK? -> y
building file list ... done
created directory /mnt/livecd-config/fugu-demo
./
etc/
etc/bgpd.conf
etc/boot.conf
:
:
var/yp/Makefile.yp
var/yp/Makefile.yp.dist
var/yp/README
sent 16455591 bytes received 232568 bytes 180412.53 by...
total size is 15492096 speedup is 0.93
infoコマンドで保存されたデータの情報を表示してみます。
/dev/sd0d : fugu-demo -> info
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0d 218M 18.9M 179M 9.6% /mnt
scanning...
18.9M 6.0/amd64/fugu-demo
データは問題なく保存されているようなのでusbfadmを終了しま...
/dev/sd0d : fugu-demo -> bye
#
>''【メモ】''~
usbfadmによる保存は、シェルのコマンドラインからも行うこと...
# usbfadm -r
========================================
= Sync current mfs as fugu-demo into /dev/sd0d
=
sending incremental file list
deleting etc/X11/xenodm/authdir/authfiles/A:0-G4H73h
:
var/spool/smtpd/purge/
var/spool/smtpd/temporary/
#
オプション -r は、usbfadmにファイル保存の再実行を指示しま...
~
また、cronを使用してバックグラウンドで定期的に実行するこ...
(crontabファイル)
# crontab file
#minute hour mday month wday command
〜 略 〜
#save session periodically
#0 */4 * * * PATH=$PATH:/usr...
これにより、usbfadmによる保存がバックグラウンドで4時間ご...
>''【メモ】''~
''⇒''usbfadmコマンドで作成したパーティションでなくとも、O...
#aname(boot_mode3)
**保存した設定やファイルを起動時に読み込む - 起動モード3...
[[設定やファイルを保存する>#k57e4ba1]] で説明した方法で保...
データを復帰させるには、ブートモード3を選択します。
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3
scanning partitions: sd0a sd0d sd0i cd0a
Device(s) found:
loadable from: sd0d
Which is FuguIta's storage device? [default: sd0d] -> sd0d
/dev/sd0d : available data;
fugu-demo
config name -> fugu-demo
Copying files from flash to ram ...
保存したデータ名を指定すると退避させていたデータを復帰し...
各種設定値もすべて復帰するため、最初に説明した起動モード...
ログイン後、さらにデータを保存することもできます。手順は ...
すでにLiveUSB上にファイルが保存されているため、変更したフ...
そして、保存デバイス名と保存名はすでに設定済みなので、い...
シャットダウン時、データの退避は自動的には行われないので...
これを自動化したい場合は [[終了時にデータが自動で保存され...
** Unix の使い方を調べる [#ta8d176b]
本ガイドの冒頭で説明したように、河豚板はUnix系OSの一種で...
Unixは約半世紀前の1969年に開発され、以降さまざまなコンピ...
Unix系OSはMicrosoft WindowsなどのOSとは操作方法が大きくこ...
Unix系OSの基本的な部分はコンシューマユーザ向けに作られて...
そんなUnix系OSを理解し、活用するにはどのようなアプローチ...
***書籍を用意しましょう [#vc93e2e8]
>Unix系OSに関する基本を解説している書籍を用意しましょう。~
様々な実装が存在するUnix系OSですが、それらには[[Unix哲学>...
書籍の内容としては特定の実装だけを対象とせず、基本的な概...
>「これ一冊読めばすべてOK」というような書籍はなかなかない...
-はじめてUNIXで仕事をする人が読む本 / 木本雅彦 他 著 / ...
-新 The Unix Super Text [上] / 山口和紀・古瀬一隆 著 /...
>以下のものは副読本として読むと、より理解が進むかもしれま...
-Unixという考え方−その設計思想と哲学 / Mike Gancarz著 芳...
-Linuxを「読む」 / こじまみつひろ著 / 毎日コミュニケー...
***とにかく自分でやってみましょう&br;オンライン・マニュア...
>やはり自分で手を動かすことが、効果的なスキル習得の基本に...
その際、やみくもにやってみるのではなく、オンラインマニュ...
>>''【メモ】''~
''⇒''Unixのマニュアルページは幾つかの章に別れています。~
同じ名前の項目が複数の章にある場合があります。例えば「sle...
$ man 1 sleep
C言語でプログラミングをしていて、sleep関数の使い方を知り...
$ man 3 sleep
として第3章にあるsleep関数の説明を表示します。
ですので、これ以降「ls(1)」のような表記が出てきますが、こ...
オンラインマニュアルとは別に、Unixのコマンドの多くは自分...
$ man
usage: man [-acfhklw] [-C file] [-I os=name] [-K encodin...
[-O option=value] [-S subsection] [-s section...
[section] name ...
$ cp -?
cp: unknown option -- ?
usage: cp [-fip] [-R [-H | -L | -P]] source target
cp [-fip] [-R [-H | -L | -P]] source ... directory
上の例ではmanコマンドとcpコマンドのヘルプメッセージを表示...
このようにコマンドのヘルプメッセージは非常に簡素な説明な...
***ネットは「参考情報」として活用しましょう [#u44b7f90]
>インターネットを活用するとUnix系OSに関連する情報も、簡単...
しかし、前項で説明したような弱点もあります。特に検索エン...
さらに、現在では多くのUnix系OSが開発コミュニティなどによ...
***この節のまとめ [#d05f1a8b]
以上述べたことを例えば「ファイルの属性」というトピックに...
-書籍で基礎事項を押さえる ~
→ファイルのオーナ・グループ・パーミッションとは何か、どの...
-オンラインマニュアル等で確認しながら実際に操作 ~
→実際にchown, chgrp, chmodコマンドなどを実行し、結果を確...
-ネットで関連情報・参考情報をゲット~
→ネットの検索などで注意点、はまりやすい点、色々な応用法な...
→公式サイトで関連情報を調べる ... 仕様の変更やセキュリテ...
河豚板は以上で述べたようなUnix系OSの習得にも向いています...
**OpenBSDの使い方を調べる [#vfe62224]
前節の [[Unix の使い方を調べる>#qd261f24]] ではUnix系OSの...
***導入 [#c6f8a51f]
rootでログインすると、OpenBSDプロジェクト開発リーダーTheo...
# mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 deraadt@do-not-re Sun Oct 18 07:58 86/4565 Wel...
& more 1
Message 1:
From deraadt@do-not-reply.openbsd.org Sun Oct 18 07:58:5...
Date: Oct 18 07:58:58 MST 2015
From: deraadt@do-not-reply.openbsd.org (Theo de Raadt)
To: root
Subject: Welcome to OpenBSD 5.8!
This message attempts to describe the most basic initial...
system administrator of an OpenBSD box might have. You ...
this message for later reference.
....(以下略)....
このメールでは、OpenBSDをインストールした人が最初に持つと...
以下このメールの内容と重複する部分もありますが、システム...
***オンラインドキュメント [#se0d8824]
[[Unixの使い方を調べる>#qd261f24]]で述べたようにマニュア...
そのことはインストール直後のroot宛てメールにおいても、以...
Again, PLEASE READ THE MANUAL PAGES. Our developers hav...
hours improving them so that they are clear and precise.
マニュアルページには、特に導入のためのエントリも幾つか用...
:help|Unix初心者向けのエントリです。コマンドラインで''hel...
:man|manコマンドの説明です。OpenBSDではmandocというプログ...
:afterboot|インストール直後にチェックを行ったほうがよい項...
:intro|マニュアルページはカテゴリごとに章に別れていますが...
man 1 intro
とすると、一般コマンドカテゴリについての説明が、
man 5 intro
では、ファイル形式のカテゴリ全般についての説明が表示され...
OpenBSDでは、マニュアルページの章立ては以下のようになって...
|1 |一般コマンド |
|2 |システムコールとエラー番号 |
|3 |ライブラリ |
|3f |Fortran言語のリファレンスガイド |
|3p |Perl言語のリファレンスガイド |
|4 |デバイスドライバ |
|5 |ファイル形式 |
|6 |ゲーム |
|7 |その他 |
|8 |システム保守・運用のためのコマンド |
|9 |カーネル内部情報 |
|X11 |X11R6と同じ |
|X11R6|X Window System |
|local|/usr/local配下にインストールされたコマンド|
|n |Tcl/Tk言語のコマンド |
各セクションのマニュアルの内容は現状のシステムに追従し続...
また他のUnix系OSでは4章(デバイスドライバ)などの章で、...
///|TO BE REVISED|
#ref(emacsinfo.png,around,right)
GNUプロジェクト由来のコマンドやEmacs上で動作するアプリケ...
Infoドキュメントを閲覧するには、infoコマンドを実行します。
>''【メモ】''~
''⇒''Emacsエディタを追加インストールしている環境では、Inf...
#clear;
マニュアルページやInfo以外にもアプリケーション固有のドキ...
それらは主に次に挙げるディレクトリの下にあります;
-/usr/share/doc
-/usr/X11R6/share/doc
-/usr/local/share/doc
-/usr/local/share/gtk-doc
***システム上のファイル [#d1f901c4]
サーバやアプリケーションソフトなどの設定ファイルはすべて/...
パッケージ管理ツールports/packagesで追加されたソフトウェ...
システムの動作ログは、/var/log以下にあります。唯一、cron...
[[河豚板を起動する>#i322b9ad]] で説明した起動時に表示され...
***インターネット上の情報 [#zc81ca57]
:http://www.openbsd.org/|プロジェクトによって運営されてい...
:http://undeadly.org/ 「OpenBSD Journal」|OpenBSD関連のニ...
:メーリングリスト|[[公式に管理・運営されているメーリング...
***書籍 [#j85fa616]
作者の知る限り、OpenBSDユーザ向けに書かれた日本語の書籍は...
BSD系のUnix向けの書籍の中には、
-BSD HACKS 〜 プロが使うテクニック&ツール100選 / Dru La...
など、部分的にOpenBSDについて言及されている書籍もあります。
英語の書籍に関しては[[公式サイトの記述>http://www.openbsd...
'''Absolute OpenBSD, 2nd Edition''' や '''The book of PF,...
*河豚板を使う【応用編】 [#vbb26034]
[[河豚板を使う【一般編】>#v7ad37bc]] では河豚板の基本的な...
この章では河豚板の特徴を活かした、さらに進んだ利用法につ...
>''【メモ】''~
''⇒''この章では以下のように、[[河豚板を使う【一般編】>#v7...
-ホスト名としてfugu-demo.localnetを想定
-インターネットにアクセスできる状態になっている
-一般ユーザyoshiが作成されている。yoshiはwheelグループに...
**アプリケーションを追加する [#ef4cc9a8]
河豚板はOpenBSDで提供されているソフトウェアに、その他日常...
更に、システム起動後にもユーザがアプリケーションを追加す...
アプリケーションを追加するにはOpenBSDのports/packagesシス...
packagesのソフトウェアを追加するには、pkg_addというコマン...
fugu-demo$ su -
Password:
fugu-demo# pkg_add firefox
quirks-4.53 signed on 2021-12-19T13:27:04Z
quirks-4.53:(ok)
firefox-95.0.1:libiconv-1.16p0:(ok)
firefox-95.0.1:gettext-runtime-0.21p1:(ok)
:
略
:
firefox-95.0.1:dconf-0.40.0:(ok)
firefox-95.0.1:gtk+3-3.24.30:(ok)
firefox-95.0.1:(ok)
Running tags:ok
The following new rcscripts were installed: /etc/rc.d/me...
See rcctl(8) for details.
New and changed readme(s):
/usr/local/share/doc/pkg-readmes/dbus
/usr/local/share/doc/pkg-readmes/firefox
/usr/local/share/doc/pkg-readmes/glib2
/usr/local/share/doc/pkg-readmes/gtk+3
fugu-demo# exit
fugu-demo$
上の例では、suコマンドを使用して一時的にrootになっていま...
pkg_addを実行すると目的のアプリケーションを実行するために...
ディレクトリ/usr/local/share/doc/pkg-readmes以下にインス...
以上の例のような方法で、アプリケーションを追加することが...
ports/packagesからどのようなソフトウェアがpkg_addできるか...
>''【メモ】'' ~
''⇒''ports/packagesシステムについてはhttp://www.openbsd.o...
''⇒''ports/packagesを利用せずソフトウェア開発元が公開して...
河豚板ではpkg_addで追加したソフトウェアもまた、usbfadmコ...
**一般ユーザが一時的にシステム管理者になれるようにする [#...
前節の [[アプリケーションを追加する>#af9dcfcb]] では、su...
doasは設定ファイルで動作を制御できる点、rootのパスワード...
doasを使うには、まず設定ファイル/etc/doas.confを編集する...
最初はdoas.confは存在していませんので以下のコマンドを実行...
# echo permit :wheel > /etc/doas.conf
# chmod 0640 /etc/doas.conf
この操作で、「permit :wheel」という内容1行だけが書かれた...
$ doas /usr/fuguita/sbin/usbfadm
Password:
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.0/amd64 (FuguIta-6.0-amd64-201612291)
Boot mode: usbflash
Data stored in: /dev/sd0d
Data Saved as: fugu-demo
Type ? for help.
/dev/sd0d : fugu-demo ->
先に説明したようにdoas.confの設定を行うと、doas実行時にパ...
パスワードを入力しないでdoasを実行することもできます。詳...
>''【メモ】'' ~
''⇒''doasはUnix系のOSで一般的に使われているsudoと置き換え...
**タイムゾーンを変更する [#hfd08245]
モード0で起動した直後の河豚板は、時間帯(time zone: タイム...
協定世界時に比べ日本標準時(Japan Standard Time: JST)は9...
$ date
Wed Dec 23 02:27:58 UTC 2015
河豚板の時間帯をJSTにするには以下のようにコマンドを投入し...
$ cd /etc
$ ls -l localtime
lrwxr-xr-x 1 root wheel 23 Dec 23 02:27 localtime -> ...
$ doas ln -s -f /usr/share/zoneinfo/Asia/Tokyo localtime
Password:
$ ls -l localtime
lrwxr-xr-x 1 root wheel 25 Dec 23 11:28 localtime -> ...
$ date
Wed Dec 23 11:28:53 JST 2015
$
>''【メモ】''~
''⇒''設定後のJSTが実時刻とずれている場合はdate(1)を使い、...
**サーバ設定の例 - 時刻を参照するNTPサーバを変更する [#z0...
NTP (Network Time Protocol)はコンピュータがネットワーク上...
OpenBSDはNTPを用いてインターネット上の時刻基準に自身の時...
OpenBSDはインストール時にNTPを使用するかどうかの設定を行...
NTPの機能はntpd(8)というプログラムによって実装されており...
>''【メモ】''~
''⇒''OpenBSDで使われているNTPのソフトウェアは「[[OpenNTPD...
LinuxやFreeBSDでは同じntpdでも、別の実装を用いています。
$ ntpctl -s status
4/4 peers valid, constraint offset 0s, clock synced, str...
上記の例のように「clock synced」と表示されていれば、ntpd...
$ ntpctl -s status
0/1 peers valid, clock unsynced
のように「clock unsynced」となっている場合は、何らかの原...
OpenBSDではインストール時にNTP機能を有効にすると、時刻基...
企業の社内LANなどではセキュリティの関係から、pool.ntp.org...
以下にNTPサーバの設定方法を示します;
ntpdはntpd.conf(5)というファイルにより動作が設定されます...
$ doas -s
Password:
# vi /etc/ntpd.conf
ntpd.conf内のこの3行を
↓
servers pool.ntp.org
sensor *
constraints from "https://www.google.com"
↓
以下の一行に変更
↓
server ntp.localnet
上の例では、「ntp.localnet」というNTPサーバを参照するよう...
設定ファイルの編集が終了したらntpdを再起動し、変更内容を...
バックグラウンドで走行しサービスを提供するntpdのようなプ...
# rcctl restart ntpd
ntpd(ok)
ntpd(ok)
#
以上で設定変更作業は完了したので、rootから一般ユーザに戻...
# exit
$ ntpctl -s status
1/1 peers valid, clock unsynced
上記のようになっていれば(まだ)同期はとれていませんが、...
$ ntpctl -s status
1/1 peers valid, clock synced, stratum 3
しばらく時間が経過すると、時刻同期が取れていることが確認...
ntpctlは更に詳しくntpdの状態を表示することもできます。ま...
詳しくは各コマンドや設定ファイルのマニュアルページを参照...
>''【メモ】'' ~
''⇒''ntpdは時刻のずれを非常にゆっくりと修正していきます。...
**OSの設定値を変更する [#b16abb7f]
前節では[[NTPサーバの設定変更方法について説明>#j453b186]]...
この節ではOpenBSDで動作しているサービスの設定について説明...
全ての設定方法について具体的な説明を行うことは現実的では...
***カーネルパラメータ [#jc369ad6]
OpenBSDカーネルの機能は色々な方法で制御できますがその一つ...
$ sysctl -a | less
kern.ostype=OpenBSD
kern.osrelease=5.8
kern.osrevision=201510
kern.version=OpenBSD 5.8-stable (RDROOT.MP) #2: Wed Nov ...
root@nimbus5.localnet:/opt/fi/5.8/sys/arch/i386/comp...
kern.maxvnodes=44152
kern.maxproc=1310
〜以下略〜
上の例では全てのカーネルパラメータを表示しています。~
表示内容が一画面に収まらないため、表示データをページャプ...
表示したいパラメータがあらかじめわかっている場合は、その...
以下の例ではファイルの入出力のバッファリングに割り当てる...
$ sysctl kern.bufcachepercent
kern.bufcachepercent=20
$
この表示から、最大でメモリ搭載量の20%までをバッファに割り...
この値を変更するには以下のようにします。設定の変更はroot...
$ doas sysctl kern.bufcachepercent=50
Password:
kern.bufcachepercent: 20 -> 50
$
sysctlコマンドの手動実行ではなく、システム起動時に自動的...
それには、設定したい内容をsysctl.conf(5)というファイルに...
>''【メモ】'' ~
''⇒''カーネルの設定を変更するにはその他にも
-configコマンドによるカーネルの書き換え
-UKC (User Kernel Config)による起動時での変更
-カーネルの再コンパイル
>などの方法がありますが、それぞれ設定できる内容や作業の難...
***ネットワークの基本設定 [#k477f8af]
これまでも説明したようにネットワーク関連の設定は河豚板の...
河豚板をサーバやネットワークのゲートウェイなどとして運用...
:インターフェース設定|IPアドレス、ネットマスクなどのネッ...
>''【メモ】'' ~
''⇒''使用しているPCにどのようなネットワークインターフェー...
:経路制御|デフォルトルートは/etc/mygateに記述します。それ...
:名前解決|/etc/resolv.conf(5)により設定を行います。
:パケットフィルタリング|PFはOpenBSDで開発されたパケット・...
***デーモンの起動・停止と設定 [#m3ae5186]
OpenBSDではデフォルトでは動作しないものも含めて、様々なデ...
[[時刻を参照するNTPサーバを変更する>#j453b186]] ではNTPデ...
OpenBSDでは、このようなデーモンの起動はrc.conf.local(8)が...
>''【メモ】'' ~
''⇒''実際にはrc.conf(8)で全てのデーモンについての指定がさ...
各種デーモンの挙動を制御するには rc.conf.local の内容を変...
ntpdがntpd.confによって設定されるように、他のデーモンもそ...
また、/etc/examples に各種デーモンの設定用サンプルファイ...
***その他の設定 [#k08546c1]
/etc/rc.localはシステム起動の最終段階で実行されるシェルス...
OpenBSDの起動時や終了時の処理についてはrc(8)を参照して下...
**起動時間を短縮する。使用メモリを少なくする - 起動モード...
河豚板の起動時にモード1を指定すると、それ以降の起動時間...
これ以降に入力する各種設定項目については、モード0と同じ...
Select boot mode;
0: fresh boot (normal)
1: fresh boot (lower memory, faster boot than mode 0)
2: fresh boot (works only on mfs)
3: retrieve user data from USB flash memory
4: retrieve user data from floppy disk
5: interactive shell for debugging
->1
起動後のメモリ使用量(mfsのサイズ)もモード0に比べ少なくな...
目安としては実装メモリ64MB程度のマシンからが動作可能とな...
ファイル使用量(モード0)
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/rd0a 1.6M 729K 833K 47% /
/dev/cd0a 697M 697M 0B 100% /sysmedia
/dev/vnd5a 676M 664M 11.9M 98% /fuguita
mfs 698M 25.5M 673M 4% /ram
ファイル使用量(モード1)
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/rd0a 1.6M 730K 832K 47% /
/dev/cd0a 697M 697M 0B 100% /sysmedia
/dev/vnd5a 676M 664M 11.9M 98% /fuguita
mfs 713M 6.8M 706M 1% /ram
ただし、起動モード1は標準の起動モードであるモード0に比...
起動モード1は河豚板に収録されているソフトウェアのみで運...
モード1で起動しusbfadmでファイル保存後、モード3で再起動...
>''【メモ】'' ~
''⇒''起動モード0と起動モード1のファイルシステムのレイア...
~
起動モード0と起動モード1とでは、ファイルシステムの構造...
#ref(FuguIta/BBS/11/fi-filesys-mode0.png,wrap,around,righ...
右の図は、起動モード0のときのファイル配置です(図をクリ...
例として、/bin/ed, /usr/bin/vi, pkg_added /usr/local/bin/...
~
ルートファイルシステムはRAM DISK, [[rd(4)>https://man.ope...
~
FuguItaデバイスの実体は、DVDやUSBメモリで、ブートローダー...
~
/sysmediaのファイルシステムイメージは/dev/vnd4にマッピン...
~
/ramは[[mfs(4)>https://man.openbsd.org/mfs.4]] (memory fi...
#clear
#ref(FuguIta/BBS/11/fi-filesys-mode1.png,wrap,around,righ...
次に起動モード1です。起動モード1では、/usrは/fuguita/us...
#clear
**河豚板を記録メディアを使用しないで動作させる - 起動モー...
起動モード2はファイルを全てmfs上に転送し、全てがオンメモ...
Select boot mode;
0: fresh boot (normal)
1: fresh boot (lower memory, faster boot than mode 0)
2: fresh boot (works only on mfs)
3: retrieve user data from USB flash memory
4: retrieve user data from floppy disk
5: interactive shell for debugging
->2
モード2ではシステムの起動が完了すると、DVDやUSBメモリは...
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/rd0a 1.6M 730K 832K 47% /
mfs 813M 736M 76.7M 91% /ram
ただし、冒頭で説明したように、このモード2ではDVDやUSBメ...
モード2においてもusbfadmでファイル保存後、モード3で再起...
>''【メモ】'' ~
''⇒''以下の場合には、デバイスを取り外すことはできませんの...
-仮想メモリの使用量が実メモりより大きく、スワップパーティ...
-[[暗号化パーティション>#f90fbf26]]を使用している場合 (警...
-そのデバイス内のパーティションを[[追加でマウントしている...
>''【メモ】'' ~
''⇒''起動モード2のファイルシステムのレイアウトについて~
~
#ref(FuguIta/BBS/11/fi-filesys-mode2.png,wrap,around,righ...
起動モード2のファイルレイアウトは右図のとおりです。これ...
#clear
#aname(usbfadm_expand)
**USBメモリの保存領域を拡張する - usbfadm expandコマンド ...
[[河豚板のLiveUSBを作る>#sa216e5d]] で説明したように、ダ...
しかし、このLiveUSB版河豚板はUSBメモリのサイズに関係なく2...
この内、河豚板のシステムが約1GBを占有していますので、usbf...
河豚板に付属のusbfadmユティリティには、指定したパーティシ...
以下にexpandの使用例を示します。
fugu-demo# usbfadm ← root権限でusbfadmユティリティを起...
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 7.0/i386 (FuguIta-7.0-i386-202112291)
Boot mode: manual
Target device: not set
Data saved as: not set
readline capability available
TAB to complete the reserved words
Type ? for help.
? : ? ->target ← targetコマンドで拡張するパーティション...
Searching storage device
Please make sure the device inserted.
Then press ENTER ->
sd0i sd0j sd0k sd1a +sd1d vnd5a ← 検出されたパーテショ...
target device ->sd1d 付いているのがデータ...
sd1d : ? ->info ← 指定したパーティションの容量を見てみる
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 1.1G 2.5K 1.1G 0% 5 1287065 0%...
scanning...
512B 7.0/i386/noasks
sd1d : ? ->expand ← expand機能を呼出し
Select the expansion method for sd1d:
1: growfs - expands the partition while retaining its...
2: newfs - expand and format the partition
3: [exit without expansion]
->2 ← "newfs"を使ってパーティションを拡張
パーティションの拡張方法には、「growfs」と「newfs」とがあ...
growfsではパーティション内に保存されているデータを保持し...
newfsでは、領域を拡張した後、パーティションをフォーマット...
newfsでは、保存されているファイル・ディレクトリは全て消え...
This makes sd1d as large as possible.
Note that all contents in sd1d will be removed
Do you proceed? [y/N] -> y
/dev/rsd1d: 3136.5MB in 6423488 sectors of 512 bytes
257 cylinder groups of 12.24MB, 3134 blocks, 6272 inodes...
super-block backups (for fsck -b #) at:
144, 25216, 50288, 75360, 100432, 125504, 150576, 17564...
:
6368432, 6393504, 6418576,
** /dev/rsd1d
** File system is already clean
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 5611214 free (14 frags, 701400 blocks, ...
sd1d : ? ->info ← 拡張後の容量を確認
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 2.7G 2.5K 2.7G 0% 5 1611897 0%...
scanning...
512B 7.0/i386/noasks
sd1d : ? ->quit
Bye bye...
fugu-demo#
>''【メモ】'' ~
''⇒''ファイルシステムのパラメータ(フォーマット形式、ブロ...
#aname(liveusb_remaster)
**USBメモリの容量に合わせてLiveUSBを作成する - usbfadm ne...
この節ではすでに稼動中の河豚板を使い、新たに別のUSBメモリ...
この方法を用いるとデータの保存領域を任意のサイズで割り当...
まず、河豚板をモード0、またはモード1で起動します。起動...
起動が完了したら、root権限でusbfadmコマンドを実行します。
$ doas usbfadm
doas (yoshi@fugu-demo.localnet) password:
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.4/amd64 (FuguIta-6.4-amd64-201902021)
Boot mode: usbflash
Data stored in: /dev/sd1d
Data Saved as: fugu-demo
Type ? for help.
? : ? ->newdrive ← LiveUSB作成を指示
Please make sure the device inserted.
Then press ENTER -> ← USBメモリの装着を確認したら<Ent...
認識したディスクデバイスの一覧が時系列で表示さ...
↓
==== disk(s) and vnode devices =========================...
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HTS72757, JF...
sd0: 715404MB, 512 bytes/sector, 1465149168 sectors
sd1 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G...
sd1: 29624MB, 512 bytes/sector, 60669952 sectors
sd2 at scsibus5 targ 1 lun 0: <BUFFALO, USB Flash Disk, ...
sd2: 7788MB, 512 bytes/sector, 15950592 sectors
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
vnd4: not in use
vnd5: covering /sysmedia/fuguita-6.4-amd64.ffsimg on sd1...
========================================================...
Enter the name of device which FuguIta will be installed...
...
Disk: sd2 geometry: 992/255/63 [15950592 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: s...
--------------------------------------------------------...
*0: 0C 0 130 3 - 2 140 10 [ 8192: 32768 ...
1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: A6 2 140 11 - 130 138 8 [ 40960: 2...
This disk seems to have been partitioned already.
Continue anyway? [y/N] -> y
Select boot method:
1: [Legacy BIOS]
2: UEFI
3: none (only for save data)
4: Hybrid
-> ← 起動方法を指定
このようにEnterのみ入力すると[]で囲まれたデフォ...
項目(この場合はLegacy BIOS)を指定したことになる。
Enter size for saving User Data.
You can add suffix K, M, G or T (otherwise considered ...
'*' implies 'all'
'0' doesn't make this partition.
6GB (14516928sectors) free
->3g ← データ保存用領域のサイズ
「3g」で3ギガバイトを割当て
「*」と入力すると、残り全てという意味になる
Create an extra FAT partition? [y/n] -> y ← 残りの領...
target disk: sd2
partition type=MBR
boot type=Legacy
-------------------- : ------
partition : size
-------------------- : ------
whole disk : 7GB
partition tables : 32KB
UEFI system : 0B
FuguIta system : 946MB
FuguIta user data : 3GB
MSDOS FAT : 3GB
-------------------- : ------
***THIS IS THE LAST CHANCE***
If you type 'Y' now, all the data on sd2 will be lost.
Are you sure to initialize sd2? [y/N] -> y ← 指定した...
どうか...
========================================
= Clearing MBR, GPT and BSD disklabel
=
21+0 records in
21+0 records out
22020096 bytes transferred in 5.693 secs (3867757 bytes/...
========================================
= Setting up fdisk partitions
=
〜〜省略〜〜
** /dev/rsd2d
** File system is already clean
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3 files, 3 used, 3663622 free (14 frags, 457951 blocks, ...
? : ? ->quit
Bye bye...
$
以上で、指定したデバイスに河豚板のシステムが書き込まれ、...
>&color(red){''【ご注意】''&br;''!!''書き込み先のデバイ...
#ref(fuguita-usb.png,around,right);
今まで説明した内容を図にすると、右のようになります。
「Select boot method:」に対し「Legacy BIOS」あるいは「UEF...
「Enter size for saving User Data」で入力したサイズの d ...
''a''パーティションと''d''パーティションの領域を確保した...
#clear
>''【メモ】''~
''⇒''この節で説明した河豚板のインストール方法は、USBメモ...
>''【メモ】''~
''⇒''現在のPCは、起動方法として「BIOS」と「UEFI」の2種類...
UEFI起動に対応したUSBメモリを作成するには、以下のように起...
Select boot method:
1: [Legacy BIOS]
2: UEFI
3: none (only for save data)
4: Hybrid
->2
Select partition type:
1: [GPT]
2: MBR
->1
また、起動方法「Hybrid」を指定すると、BIOS、UEFIのどちら...
だたし、「Hybrid」は規格に準拠していない作成方法です。加...
#aname(autorun)
**起動時の設定入力を省略できるようにする - noasksファイル...
河豚板ではどのモードで起動するかに関わらず、起動中に手動...
-どのデバイスを使用して運用を行うか? (Which is FuguIta's...
-実装メモリのどれくらいをmfsに割り当てるか? (Enter mfs s...
-どの起動モードを使用するか? (Boot modes)
-どの保存デバイスからファイルを復帰させるか?(モード3の...
-どの保存名からファイルを復帰させるか?(モード3のみ) (...
上記の5項目については入力を自動化する機能があります。~
それには、LiveUSB版河豚板の''d''パーティションにあるnoask...
$ doas -s
doas (yoshi@fugu-demo.localnet) password:
# mount /dev/sd0d /mnt
# cd /mnt
# ls -l
total 4
drwxr-xr-x 5 root wheel 512 Oct 23 19:29 livecd-config
# cd livecd-config/7.0/amd64 ...
# ls -l
drwxr-xr-x 11 root wheel 512 Nov 10 17:08 fugu-demo
-rw-r--r-- 1 root wheel 422 Nov 9 22:19 noasks
>''【メモ】''~
''⇒''ディレクトリlivecd-configは、usbfadmによるデータ保存...
noasksには、設定値の雛形がコメントの形で書かれていますの...
# vi noasks
#
# noasks - parameter settings for non-interactive boot
#
# Make statements uncommented
# to activate settings
#
#
# FuguIta system device
noask_rdev=sd0a
#
# mfs size in MB
noask_umem=0
#
# boot mode
noask_setup_rw_mode=3
#
# storage device
noask_confdev=sd0d
#
# data set name in USB flash drive
noask_confdir=fugu-demo
>''【メモ】''~
''⇒''設定値の代入文で、「=」の前後にはスペースを入れない...
編集が終了したら''d''パーティションをアンマウントしてシス...
# cd
# umount /mnt
# /sbin/shutdown -r now
#aname(noasks-intr)
noasksファイルによる値の設定がされている場合、次のような...
============================================
= ______ __ _
= / ____/ | |_| |__
= / /____ ______ __ _| /_ _/_____
= / ___/ / / / __ \/ / / | | | | / _ |
= / / / /_/ / /_/ / /_/ /| | | |_| (_) |__
=/_/ \____/\__ /\____/ |__| \___/____/__/
= __/ /
= /___/
=
= Welcome to FuguIta! - OpenBSD Live System
= http://fuguita.org/?FuguIta
=============================================
scanning partitions: wd0i wd0j sd0a sd0d
FuguIta's operating device(s): sd0a.
Press ^C to cancel non-interactive boot
この「Press ^C to cancel non-interactive boot」が表示され...
5秒以内に''<Control>-C''を入力するとnoasksファイルによる...
>''【メモ】''~
''⇒''noasksファイルの中に未設定の項目がある場合は、自動起...
>''【メモ】''~
''⇒''設定項目のうち、noask_rdevとnoask_confdevについてはs...
DUIDは、disklabelコマンドの出力から確認できます。
# disklabel sd0
# /dev/rsd0c:
type: ESDI
disk: ESDI/IDE disk
label: QEMU HARDDISK
duid: eac6323f6d34c465 ←DUID
flags:
〜略〜
例えば、河豚板の起動デバイスをnoasksファイル中で指定する...
noask_confdev=sd0d
と書く替わりに、
noask_confdev=eac6323f6d34c465.d
というように「DUID.パーティション」というように指定するこ...
通常のデバイス名による指定は、ディスクデバイスの接続状況...
#aname(autosave)
**終了時にデータが自動で保存されるようにする [#fe82e210]
前節の [[起動時の設定入力を省略できるようにする>#b493ab9a...
OpenBSDではシステム終了時に /etc/rc.shutdown というスクリ...
河豚板では、/etc/rc.shutdown内にデータ保存の処理が記述さ...
# usbfadm_r - perform re-sync of the usbfadm utility
#
...略...
# To re-sync on shutdown. uncomment the following line.
#usbfadm_r ← この行のコメントを外す
ファイルの最終行のコメントを外し、usbfadm_r関数が実行され...
>''【メモ】''~
''⇒''この処理では保存処理が繰返し失敗した場合、シェルが立...
>&color(red){''【ご注意】''&br;''!!''運用中に重要な処理...
#aname(encrypt)
**データの保存領域を暗号化する - usbfadm newdriveコマンド...
基本編の[[設定やファイルを保存する>#k57e4ba1]]で説明した...
保存領域を暗号化する機能を使うと、USBメモリに保存した情報...
[[usbfadmコマンドでLiveUSBを作成する>#ld36d7ec]]時には、u...
以下のように指定を行うと、暗号化パーティションを作成する...
# usbfadm
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.7/amd64 (FuguIta-6.7-amd64-202006142)
Boot mode: manual
Data stored in: not set
Data Saved as: not set
Type ? for help.
? : ? ->newdrive
〜〜 略 〜〜
Enter sizes for swap, user data and extra FAT.
You can add suffix K, M, G or T (otherwise considered ...
'*' implies 'all'
'0' doesn't make this partition.
589MB (604128KB) (1208256sectors) free
swap->64m
525MB (538592KB) (1077184sectors) free
userrdata->*
user data encryption? [y/N] -> y ← 「y」を入力しデ...
Enter passphrase twice. They'll be not echoed.
//// CAUTION ////////////////////////////
//// If you lost this passphrase, ← パスフレーズを...
//// you'll never access sd0d. ← 取り出す方法は...
/////////////////////////////////////////
Passphrase: ← 暗号化のパスフレーズを入力します...
Passphrase: ← 確認のため、再度パスフレーズを入...
〜〜 続く 〜〜
暗号化されたパーティションにデータを保存するには以下のよ...
+usbfadmのtarget機能で暗号化されているパーティションを指...
~
+パスフレーズの入力が正しいと新たにディスクが現れるので、...
-usbfadmのsync機能でデータの保存を実行します。
? : ? ->target
Searching storage device
Please make sure the device inserted.
Then press ENTER ->
sd0a ?sd0d ← 「?」の付いてい...
パーティション...
target device->sd0d ← このパーティシ...
Passphrase: ← パスフレーズを...
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd1: 525MB, 512 bytes/sector, 1076656 sectors
softraid0: CRYPTO volume attached as sd1
sd0a ?sd0d +sd1d ← パスフレーズが...
sd1dが現れます。
target device->sd1d ← sd1dを保存先に...
以下、通常の手...
sd1d : ? ->saveas
Name of avedd ata->fugu-demo
Your data will be saved as ``fugu-demo''.
sd1d : fugu-demo ->sync
Sync current mfs as ``fugu-demo'' , OK? [y/N] -> y
copying /ram to /mnt/livecd-config/6.7/amd64/fugu-demo (...
25.0MiB 0:00:38 [9673KiB/s][[===========================...
waiting for pax to finish ... syncing ... done.
sd1d : fugu-demo ->bye
保存されたデータを以降の起動時に読み込む時も保存の場合と...
+起動モード3を指定し、暗号化されているパーティションを指...
~
+パスフレーズの入力が正しいと新たにディスクが現れるので、...
============================================
= ______ __ _
= / ____/ | |_| |__
= / /____ ______ __ _| /_ _/_____
= / ___/ / / / __ \/ / / | | | | / _ |
= / / / /_/ / /_/ / /_/ /| | | |_| (_) |__
=/_/ \____/\__ /\____/ |__| \___/____/__/
= __/ /
= /___/
=
= Welcome to FuguIta - OpenBSD Live System
= http://fuguita.org/
=============================================
scanning partitions: sd0a sd0b sd0d cd0a
FuguIta's operating device(s): sd0a cd0a.
Which is FuguIta's operating device? -> sd0a
activating swap partition: /dev/sd0b
user memory: 239 MB
Enter mfs size in MB. (0MB is auto)
[default: 0MB] ->
mfs size will be automatically allocated
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3 ← 起動モード3を...
scanning partitions: sd0a sd0b sd0d cd0a
Device(s) found:
encrypted: sd0d ← This is the encrypted volume.
Which is FuguIta's storage device? -> sd0d
Passphrase: ← パスフレーズを...
↓ パスフレーズが正しいと、新たにディスクが現れます。
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd1: 525MB, 512 bytes/sector, 1076656 sectors
softraid0: CRYPTO volume attached as sd1
Passphrase successful: Select boot mode again...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3 ← 再度起動モード...
scanning partitions: sd0a sd0b sd0d cd0a sd1d
Device(s) found:
loadable from: sd1d ← 新たに現れたデ...
encrypted: sd0d
Which is FuguIta's storage device? [default: sd1d] -> sd...
/dev/sd1d : available data;
fugu-demo
config name -> fugu-demo
Copying files from flash to ram ...
done
〜〜 続く 〜〜
このディスクは起動完了後も見えているので、データを保存す...
#aname(multidevice)
**複数の河豚板を併用する [#re6892dc]
いままではほとんどの場面で、LiveDVD版かLiveUSB版の河豚板...
河豚板はそのような場合にもうまく動作するように設計されて...
LiveDVDとLiveUSBの両方を装着して起動した場合について説明...
まず、電源を入れた直後にDVDとUSBのどちらが起動するかです...
次に、運用デバイス(ディレクトリ /fuguita にマウントされ...
scanning partitions: wd0i wd0j cd0a sd0a sd0d
FuguIta's operating device(s): cd0a sd0a.
Which is FuguIta's operating device? ->
のように使用可能なデバイスを列挙し、どれを使用するかユー...
>''【メモ】''~
''⇒''上の例ではwd0iとwd0jは内蔵ハードディスクという想定で...
保存されたデータを読み込む場合も同様に候補が複数ある場合...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3
scanning partitions: wd0i wd0j sd0a sd0d sd1a sd1d
Device(s) found:
loadable from: sd0d sd1d
Which is FuguIta's storage device? ->
usbfadmコマンドでデータを保存する場合も、[[設定やファイル...
以上のことを応用すると、以下に挙げるような運用が可能とな...
:SDカード版の河豚板で運用|[[USBメモリの容量に合わせてLive...
SDカードからの起動をサポートしているPCはほとんど存在しま...
:LiveDVD版河豚板をモード3で起動|LiveDVD版河豚板単体では...
>''【メモ】''~
''⇒''USBメモリはデータの保存時/復帰時にのみマウントされ...
この、河豚板の「起動と運用は別々のデバイスで行える」とい...
>''【メモ】''~
''⇒''なお、[[起動時の設定入力を省略できるようにする>#b493...
**OpenBSDと河豚板を共存させる [#e54e5ccf]
河豚板を実行しようとしているPCにすでにOpenBSDがインストー...
原理としては、既存のOpenBSDパーティションに河豚板のカーネ...
以下、設置と起動の方法を説明します。~
まず既存のOpenBSDを起動し、rootでログインします。
次に、ルートディレクトリ直下に「ISO」というディレクトリを...
この /ISO ディレクトリに河豚板のサイトからISOイメージをダ...
# mkdir /ISO
# cd /ISO
# ftp http://mirror.ginzado.ne.jp/pub/FuguIta/FuguIta-6....
Trying 110.92.1.251...
Requesting http://mirror.ginzado.ne.jp/pub/FuguIta/FuguI...
100% |**************************************************...
338634465 bytes received in 468.48 seconds (705.90 KB/s)
# ls -l
total 661632
-rw-r--r-- 1 root wheel 338634465 Dec 29 00:55 FuguIt...
# gunzip FuguIta-6.0-amd64-201612251.iso.gz
# ls -l
total 1427648
-rw-r--r-- 1 root wheel 730744832 Dec 29 00:55 FuguIt...
ISOイメージの中に含まれている河豚板のカーネルをルートディ...
vnconfig(8)はISOやUSBメモリのイメージファイルを記憶デバイ...
# vnconfig vnd0 FuguIta-6.0-amd64-201612251.iso
# vnconfig -l
vnd0: covering FuguIta-6.0-amd64-201612251.iso on wd0a, ...
vnd1: not in use
vnd2: not in use
vnd3: not in use
# mount -r /dev/vnd0a /mnt
# ls -l /mnt
total 1427119
-r-xr-xr-x 1 root bin 71452 Apr 4 2015 boot
-rwxr--r-- 1 root wheel 2048 Dec 27 11:59 boot.c...
-rw-r--r-- 1 root wheel 5569179 Dec 27 19:19 bsd-fi
-rw-r--r-- 1 root wheel 5577796 Dec 27 19:19 bsd-fi...
-r-xr-xr-x 1 root wheel 72328 Dec 27 19:19 cdboot
-r-xr-xr-x 1 root wheel 2048 Dec 27 19:19 cdbr
drwxr-xr-x 2 root wheel 2048 Apr 18 2014 etc
-rw-r--r-- 1 root wheel 719388672 Dec 27 19:19 fuguit...
# cp -p /mnt/bsd-fi /mnt/bsd-fi.mp /
# umount /mnt
# vnconfig -u vnd0
# vnconfig -l
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
#
以上で設置作業は完了です。
>''【メモ】''~
''⇒''データの保存と復帰を行いたい場合は livecd-config と...
次に起動方法ですが、PCが起動し、カーネルメッセージが表示...
ここで何もしないと既設のOpenBSDシステムが起動しますが、起...
boot> bsd-fi.mp
この「bsd-fi.mp」がマルチプロセッサ用の河豚板カーネルです。
シングルプロセッサ用の河豚板カーネルを起動したい場合は「b...
>''【メモ】''~
''⇒''以上の説明では ISO ディレクトリと livecd-config ディ...
**WindowsやLinuxと河豚板を共存させる [#pdb727a3]
河豚板ではWindowsのNTFSやFAT、LinuxのEXT-2, EXT-4ファイル...
この方法は [[OpenBSDと河豚板を共存させる>#d99117a6]] で説...
-運用デバイスとして用いるOSを起動させ、
-そのOS上のファイルシステム直下(WindowsならCドライブやD...
-そのフォルダ内に河豚板のISOイメージを置きます。
だたし、WindowsやLinuxのファイルシステムから河豚板を使用...
-現段階ではWindowsやLinuxのファイルシステムに置かれたOpen...
-WindowsやLinuxのファイルシステムは、データの保存・復帰も...
**スワップパーティションを有効にする [#m7f11a0c]
通常、河豚板はスワップを使用せずメインメモリだけで動作し...
Which is FuguIta's operating device? -> wd0a
activating swap partition: /dev/wd0b
activating swap partition: /dev/wd1b
この例では、/dev/wd0b と /dev/wd1b の2つのスワップパーテ...
スワップパーティションは検出と同時に有効化されます。これ...
>''【メモ】''~
''⇒''何らかの理由でスワップを使用したくない場合(例えば、...
選択後、シェルが立ち上がったらswapctl(8)コマンドを-dオプ...
シェルを抜けると再度起動モードの選択になりますので本来の...
**マウントするパーティションを追加する - /etc/fuguita/fst...
通常Unix系のOSでは、/etc/fstabというファイルでマウントす...
そのため、ユーザがマウントするパーティションを追加や変更...
ところが河豚板では、fstabファイルの内容を変更し再起動して...
河豚板では起動時の初期化中、PCに接続されている全てのディ...
最後に、その結果を受けてfstabが自動的に生成され、それを基...
そのため、ユーザがfstabを変更し保存を行っても、その内容は...
マウントするパーティションを追加したい場合は、/etc/fuguit...
例として、sd2というディスクのeパーティションを/ram/optと...
- /etc/fuguita/fstab.tail を作成します。このファイルの書...
/dev/sd2e /ram/opt ffs rw 0 1
- /ram/optディレクトリがない場合、あらかじめ作成しておき...
# mkdir /ram/opt
- usbfadmコマンドのsync機能を使い、ファイルを保存します。
- システムを最起動し起動モード3で起ち上げ、指定したパー...
/etc/fuguita/fstab.tailファイルの内容は自動生成された/etc...
>''【メモ】''~
''⇒''マウントポイントはmfs内(/ramディレクトリより下)に...
''⇒''/ramディレクトリ直下のディレクトリやファイルは、起動...
#aname(dtjsetup)
**X Window Systemに日本語デスクトップ環境を導入する - dtj...
河豚板では、dtjsetupというコマンドを実行すると、日本語の...
以下は、dtjsetupの実行例です。
# dtjsetup ← dtjsetup...
(root, 一...
#==========================================
# Welcome to dtjsetup
# Desktop (and Japanese) setup utility
#
# for FuguIta-6.6-amd64-202001171
#==========================================
Which desktop software will you install? ← デスクト...
1: no desktop (wm only)
2: [rox-filer]
3: xfce
4: mate
5: lumina
6: lxqt
-> ← [ENTER]の...
項目を選...
Which window manager will you install? ← 前項で1(...
1: cwm マネージ...
2: fvwm 選択した...
3: twm 選択しま...
4: [icewm]
5: fluxbox
6: jwm
->
Will you setup Japanese language environment? [y/N] -> y...
Which input method will you install? ← input met...
1: [scim-anthy] 選択
2: uim-gtk
3: fcitx-anthy
4: ibus-skk
->
*** You selected icewm as desktop software.
*** Installing Japanese environment is YES.
*** Japanese input method is scim-anthy.
*** Checking your root authorization...
*** OK.
*** Checking network accessibility...
*** OK.
*** Installing packages: rox-filer icewm ja-kterm ja-saz...
Will you continue? [y/N] -> y ← 続行する...
quirks-3.183 signed on 2020-01-31T18:21:51Z
rox-filer-2.11p3:libiconv-1.16p0:ok
rox-filer-2.11p3:xz-5.2.4:ok
:
icewm-1.6.1:libsndfile-1.0.28:ok
icewm-1.6.1:ok
Ambiguous: choose package for ja-kterm
a 0: <None>
1: ja-kterm-6.2.0p9
2: ja-kterm-6.2.0p9-xaw3d
Your choice: 1 ← kterm (漢...
ja-kterm-6.2.0p9:ok どちらを...
:
scim-anthy-1.2.7p11:ok
Running tags:
New and changed readme(s):
/usr/local/share/doc/pkg-readmes/glib2
/usr/local/share/doc/pkg-readmes/gtk+2
/usr/local/share/doc/pkg-readmes/scim
--- +ja-sazanami-ttf-20040629p3 -------------------
You may wish to update your font path for /usr/local/sha...
--- +mixfont-mplus-ipa-20060520p7 -------------------
You may wish to update your font path for /usr/local/sha...
--- +mplus-fonts-063 -------------------
You may wish to update your font path for /usr/local/sha...
*** /root/.xsession already exists. ← .xsession...
*** This will be replaced with a new file. ある場合...
*** and the old one will be renamed to /root/.xsession_2...
*** Rewrite .xsession configuration file. ← .xsession...
Will you continue? [y/N] -> y
Copy this .xsession file to /etc/skel ? [y/N] -> y ← ...
...
...
...
*** Japanese environment and related software have been ...
*** However, the time zone has not yet been set to JST.
Set timezone to JST? [Y/n] -> y ← ...
*** When you use this machine both running OpenBSD and W...
*** You may set the hardware clock to JST instead UTC.
Set hardware clock to JST? [Y/n] -> n ← ...
...
*** all installation and configuration completed.
*** Check your /root/.xsession and login to X if OK.
*** Note: You can save this configuration and addtionall...
*** by using usbfadm utility.
*** And can reload them at next boot time by selecting...
#ref(DeskTop.jpg,wrap,around,right,50%)
以上の設定を行った後でログアウトし、xenodmのログイン画面...
デスクトップ環境では pkg_add コマンドを使用して各種アプリ...
>''【メモ】''~
''⇒''河豚板の導入から各種アプリケーションのインストールま...
#clear
***Xのログイン画面を有効にする [#mabee881]
河豚板の起動時の設定で、[[ログイン方法の選択>#a5fdbf53]] ...
コンソール画面からのログインを選択した場合でも、X Window ...
それには [[OSの設定値を変更する>#g61850e9]] で説明したよ...
以下の例は、rcctl(8)を使用して xenodem を有効にする例です。
$ doas rcctl enable xenodm
$ doas rcctl ls on ...
check_quotas
cron
library_aslr
ntpd
pf
pflogd
slaacd
smtpd
sndiod
sshd
syslogd
xenodm
#
rcctlコマンドでxdmを有効にすると rc.conf.local に「xdm_fl...
$ cat /etc/rc.conf.local
xenodm_flags=
$
>''【メモ】''~
''⇒''テキストエディタで rc.conf.local を直接編集しても同...
OpenBSD 5.7以前はrcctlコマンドが開発されておらず、テキス...
設定変更後usbfadmで保存を行い、以降、モード3で起動すれば...
>''【メモ】''~
''⇒''xdmが表示されている状態で''<Control>''+''<Alt>''+''<...
#aname(fiupdate)
**河豚板をアップデートする - fiupdateコマンド [#lecc1f42]
OpenBSDは半年に一度、メジャーリリースが行われており、この...
そしてその半年にもセキュリティや安定性の向上などに関する...
河豚板もこの修正情報への追従を行っており、現行で公開され...
なお、河豚板で現在運用中のOSのバージョンを確認するには次...
$ uname -a ← OSの...
OpenBSD fugu-demo.localnet 5.8 RDROOT.MP#2 i386
$ sysctl kern.version ← カー...
kern.version=OpenBSD 5.8-stable (RDROOT.MP) #2: Wed Nov ...
root@nimbus5.localnet:/opt/fi/5.8/sys/arch/i386/comp...
$ cat /usr/fuguita/version ← 河豚...
5.8-201512272
この節では、現在お使いの河豚板を最新版にアップデートする...
***OpenBSDのメジャーリリースがバージョンアップした場合 [#...
これは、河豚板がベースとしているOpenBSDのメジャーリリース...
FuguIta-5.8-amd64-201504161
↓
FuguIta-5.9-amd64-201510255
ですが、これは河豚板のベースとなっているOSがOpenBSD 5.8か...
OpenBSDのメジャーリリースが変っている場合、システムのアッ...
その理由は、OpenBSDがバージョンアップすると、システムコー...
OpenBSDのメジャーリリースを跨いでの移行は、以下のような方...
+LiveDVDやLiveUSBを新規に作成する。
+新しいバージョンの河豚板を起動させ、古いバージョンの河豚...
***OpenBSDのメジャーリリースは変わっていない場合 [#o2e382...
これは、
FuguIta-6.0-amd64-201511297
↓
FuguIta-6.0-amd64-201512051
のようにOpenBSDのバージョンを表す「6.0」の部分が変ってい...
この場合はシステムの変更は部分的なものにとどまっています...
システムの移行は、以下の手順で行います。
''LiveDVDの移行手順''~
LiveDVDの場合はメディアの部分的な書き換えはできませんので...
USBメモリに保存したデータについては、そのまま起動モード3...
''LiveUSBの移行手順''~
LiveUSBの場合は、fiupdate (FuguIta update)というコマンド...
fiupdateを使うには、アップデート対象のLiveUSBをモード0、...
次に、配布サイトより新しいバージョンのISOイメージとMD5フ...
>''【メモ】''~
''⇒''LiveUSBをアップデートに使用するのはISOイメージファイ...
''⇒''MD5ファイルは、ダウンロードしたファイルの内容が壊れ...
total 606752
-rw-r--r-- 1 root wheel 310651490 Oct 7 01:12 FuguIt...
-rw-r--r-- 1 root wheel 562 Oct 8 06:25 MD5
fugu-demo# cat /usr/fuguita/version
6.7-amd64-20209041
fugu-demo# fiupdate 202010071
fiupdate - Live Updater for FuguIta LiveUSB
Version/Arch: 6.7/amd64 (FuguIta-6.7-amd64-20209041)
Checking...
environment: ok
Note: This software is currently in beta testing.
Use this at YOUR OWN RISK.
We recommend that you run this command in fresh bo...
0, 1, or 2).
Alternatively, you must quit all application softw...
all your data before updating this FuguIta device.
All daemons, including xenodm, will be stopped bef...
Please note that all X sessions will be aborted.
Do you proceed? [y/N] -> y
Checking...
checksum: (MD5) FuguIta-6.7-amd64-202010071.iso.gz: OK
file layout: liveusb
existing files: ok
decompressing FuguIta-6.7-amd64-202010071.iso.gz...
9296MiB 0:00:31 [9.51MiB/s] [===========================...
Now ready to update FuguIta-6.7-amd64-20209041 to FuguIt...
This machine will reboot immediately after update comple...
Do you proceed? [y/N] -> y
stopping all daemons...
cron(ok)
ntpd(ok)
pflogd(ok)
slaacd(ok)
smtpd(ok)
sndiod(ok)
sshd(ok)
syslogd(ok)
overwriting uniprocessor kernel...
8.66MiB 0:00:06 [1.37MiB/s] [===========================...
overwriting multiprocessor kernel...
8.69MiB 0:00:04 [1.84MiB/s] [===========================...
overwriting filesystem image...
9864MiB 0:05:30 [3.05MiB/s] [===========================...
update completed.
now rebooting...
syncing disks... done
アップデート完了後、PCは自動的に再起動します。~
LiveUSBアップデート後の運用は今までと変りなく、データの移...
>''【メモ】''~
''⇒''fiupdateをネットワーク経由、あるいはX Window System...
It seems you are running this script on X Window System,
via network or something like this.
In this situation, during update, corresponding processes
will be killed and then update may fail.
Running this on direct console device is highly recommen...
Continue anyway? [y/N] ->
fiupdateは、システムファイルを更新する前に全てのデーモン...
ですので、fiupdateはコンソールデバイス上で直接実行するよ...
**河豚板をモバイル環境で使う [#v8b338ea]
河豚板をモバイル環境の端末として使うためには、基本的な部...
しかしモバイル環境特有の事情を考慮し、設定を追加するとよ...
この節ではそのような設定項目としてノートPCの電源関連につ...
***電源関連の設定 [#g5ab7d09]
現在のPC、とりわけノートPCにはACPI (Advanced Configuratio...
OpenBSDではこれらの仕組みはacpi(4)、及びapm(4)として実装...
acpiやapmの管理は、apmd(8)というデーモンにより行います。~
apmdの状態確認と設定を行います;
$ doas -s
Password:
# rcctl get apmd
apmd_class=daemon
apmd_flags=NO ← apmdは無効(動作しない)設定になって...
apmd_timeout=30
apmd_user=root
apmdを有効にします。
# rcctl enable apmd
# rcctl set apmd flags -A ← CPU負荷に応じてCPUクロック...
# rcctl start apmd
# rcctl get apmd
apmd_class=daemon
apmd_flags=
apmd_timeout=30
apmd_user=root
#
設定が完了したら[[usbfadmコマンドを使用して保存>#k57e4ba1...
apmdが稼動している状態では、apm(8)というコマンドで状態の...
$ apm
Battery state: high, 89% remaining, 57 minutes life esti...
A/C adapter state: not connected
Performance adjustment mode: auto (1000 MHz)
以下の例では、apmコマンドに-Lフラグを与えて、CPUが常時低...
$ apm -L
$ apm
Battery state: high, 88% remaining, 42 minutes life esti...
A/C adapter state: not connected
Performance adjustment mode: manual (1000 MHz)
バッテリーなどハードウェアの状態は、sysctlコマンドやsysta...
$ sysctl hw.sensors
hw.sensors.acpitz0.temp0=55.50 degC (zone temperature)
hw.sensors.acpiac0.indicator0=Off (power supply)
hw.sensors.acpibat0.volt0=14.80 VDC (voltage)
hw.sensors.acpibat0.volt1=15.30 VDC (current voltage)
hw.sensors.acpibat0.current0=1.19 A (rate)
hw.sensors.acpibat0.amphour0=1.12 Ah (last full capacity)
hw.sensors.acpibat0.amphour1=0.21 Ah (warning capacity)
hw.sensors.acpibat0.amphour2=0.07 Ah (low capacity)
hw.sensors.acpibat0.amphour3=0.92 Ah (remaining capacity...
hw.sensors.acpibat0.amphour4=2.15 Ah (design capacity)
hw.sensors.acpibat0.raw0=1 (battery discharging), OK
hw.sensors.acpibtn0.indicator0=On (lid open)
hw.sensors.acpidock0.indicator0=Off (not docked), UNKNOWN
hw.sensors.cpu0.temp0=55.00 degC
$ systat sensors
3 users Load 0.40 0.42 0.37 W...
SENSOR VALUE STATUS DE...
acpitz0.temp0 56.50 degC zo...
acpiac0.indicator0 Off po...
acpibat0.volt0 14.80 V DC vo...
acpibat0.volt1 15.26 V DC cu...
acpibat0.current0 1.08 A rate
acpibat0.amphour0 1.12 Ah la...
acpibat0.amphour1 0.21 Ah wa...
acpibat0.amphour2 0.07 Ah lo...
acpibat0.amphour3 0.90 Ah OK re...
acpibat0.amphour4 2.15 Ah de...
acpibat0.raw0 1 raw OK ba...
acpibtn0.indicator0 On li...
acpidock0.indicator0 Off unknown no...
cpu0.temp0 56.00 degC
systatコマンドはデフォルトでは5秒おきに状態を更新し、表...
apmコマンドはまた、PCを休止状態にすることができます。~
休止状態にするにはapmコマンドの他、zzz(8)やZZZ(8)などのコ...
休止からの復帰方法は機種により異なりますが、電源ボタンを...
>&color(red){''【ご注意】''&br;''!!''スタンバイ、スリー...
Xを使用している時は、xsetコマンドでディスプレイを制御でき...
xset s on ← スクリーンセーバーを有効にする
xset s 180 ← スクリーンセーバーの動作開始時間(秒)
xset +dpms ← ディスプレイを省電力モードに移行
この例の設定をおこなうと、マウスやキーボードの操作が180秒...
#aname(netconf)
***複数のネットワーク設定を切り換えて使用する - gennetcon...
ネットワークの設定は[[ネットワークの基本設定>#pd55b21e]]...
また、ネットワークの設定は複数持つことができ、chnetconfと...
河豚板では、ネットワーク関連の設定ファイルは/etc/fuguita/...
初期ブートで行った設定は、/etc/fuguita/netconfs/defaultの...
例として、自宅用に「home」、職場用に「office」という2つ...
まず、officeから。これは、イーサネットに接続し、固定アド...
fugu-demo# gennetconfs office
===================================================
= gennetconfs: generate network configuration files
===================================================
Hostname with domain part (FQDN):
only host name without domain part is also OK.
-> fuguita.office.local
IP protocol version(s) to be enabled: 4, 6, 46, 64 or "n...
4: enable only IPv4
6: enable only IPv6
46: give priority to IPv4 name resolution
64: give priority to IPv6 name resolution
none: operate as standalone
[64] -> 4
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57765
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> bge0
IPv4 - address and routing:
Enter "auto" or "IPv4_address[/mask] [default_gateway]"
"auto" is an automatic setting by DHCP.
The "/mask" part can be specified in either format, su...
If there is no default gateway, set the second field t...
[auto] -> 192.168.20.115/24 192.168.20.254
DNS servers: up to 3 IP addresses, separated by spaces
-> 192.168.20.254
writing configured values to:
/etc/fuguita/netconfs/office/myname
/etc/fuguita/netconfs/office/mygate
/etc/fuguita/netconfs/office/hosts
/etc/fuguita/netconfs/office/hostname.bge0
/etc/fuguita/netconfs/office/resolv.conf
======================================================
= end of gennetconfs:
= Use chnetconf utility to activate this configuration
======================================================
gennetconfsによる設定が完了すると、「/etc/fuguita/netconf...
fugu-demo# cd /etc/fuguita/netconfs/
fugu-demo# ls -l
total 24
drwxr-xr-x 2 root wheel 144 Nov 25 05:46 default
drwxr-xr-x 2 root wheel 240 Nov 25 07:00 office
drwxr-xr-x 2 root wheel 96 Nov 18 05:49 templ.head
drwxr-xr-x 2 root wheel 0 Nov 18 05:49 templ.tail
fugu-demo# ls -l office
total 40
-rw-r----- 1 root wheel 23 Nov 25 07:00 hostname.bge0
-rw-r--r-- 1 root wheel 36 Nov 25 07:00 hosts
-rw-r--r-- 1 root wheel 15 Nov 25 07:00 mygate
-rw-r--r-- 1 root wheel 21 Nov 25 07:00 myname
-rw-r--r-- 1 root wheel 56 Nov 25 07:00 resolv.conf
fugu-demo# ls -l /etc/ | grep netconfs
lrwxr-xr-x 1 root wheel 28 Nov 25 06:56 myname -> /e...
drwxr-xr-x 6 root wheel 192 Nov 25 06:59 netconfs
これらの設定を実際に反映させるには、chnetconfユティリティ...
chnetconfを実行すると、指定された設定ファイルを、/etcにコ...
>''【メモ】'' ~
''⇒''設定ファイルのうち、mynameファイルだけはコピーではな...
fugu-demo# chnetconf -l ← 現在の設定を表示
*default ← この設定が有効
office
fugu-demo# chnetconf office
fuguita# chnetconf -l
default
*office ← この設定に変更された
fuguita# ifconfig ← インターフェース設定を確認
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>...
lladdr 10:9a:dd:6c:11:0c
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect (100baseTX full-duplex,rxpau...
status: active
inet 192.168.20.115 netmask 0xffffff00 broadcast 192.16...
urtwn0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:22:cf:46:6d:e6
index 4 priority 4 llprio 3
groups: wlan
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: no network
ieee80211: nwid ""
# ping www.google.com ← 疎通を確認
PING www.google.com (172.217.175.68): 56 data bytes
64 bytes from 172.217.175.68: icmp_seq=0 ttl=115 time=28...
64 bytes from 172.217.175.68: icmp_seq=1 ttl=115 time=25...
64 bytes from 172.217.175.68: icmp_seq=2 ttl=115 time=26...
^C
--- www.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet l...
round-trip min/avg/max/std-dev = 25.842/26.765/28.318/1....
引続き、同様に設定「home」を作成してみます。こちらはWi-Fi...
fuguita# gennetconfs home
===================================================
= gennetconfs: generate network configuration files
===================================================
Hostname with domain part (FQDN):
only host name without domain part is also OK.
-> fuguita.home.local
IP protocol version(s) to be enabled: 4, 6, 46, 64 or "n...
4: enable only IPv4
6: enable only IPv6
46: give priority to IPv4 name resolution
64: give priority to IPv6 name resolution
none: operate as standalone
[64] ->
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57765
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> urtwn0
Wi-Fi settings:
SSID -> my-wifinet
WPA Key -> my-wpa-secret-key
IPv6 - address and routing:
Enter "auto" or "IPv6_address[/prefixlen] [default_gat...
"auto" is an automatic setting by SLAAC.
The "/prefixlen" part can be an integer between 0 and ...
If there is no default gateway, set the second field t...
[auto] ->
IPv4 - address and routing:
Enter "auto" or "IPv4_address[/mask] [default_gateway]"
"auto" is an automatic setting by DHCP.
The "/mask" part can be specified in either format, su...
If there is no default gateway, set the second field t...
[auto] ->
writing configured values to:
/etc/fuguita/netconfs/home/myname
/etc/fuguita/netconfs/home/hostname.urtwn0
/etc/fuguita/netconfs/home/resolv.conf
======================================================
= end of gennetconfs:
= Use chnetconf utility to activate this configuration
======================================================
fuguita# chnetconf -l
default
home
*office
fuguita# chnetconf home
fuguita# chnetconf -l
default
*home
office
fuguita# ifconfig
bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr 10:9a:dd:6c:11:0c
index 1 priority 0 llprio 3
media: Ethernet autoselect (100baseTX full-duplex,rxpau...
status: active
urtwn0: flags=a48843<UP,BROADCAST,RUNNING,SIMPLEX,MULTIC...
lladdr 00:22:cf:46:6d:e6
index 4 priority 4 llprio 3
groups: wlan egress
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: active
ieee80211: nwid my-wpa-secret-key chan 10 bssid 1c:b1:7...
wpaakms psk wpaciphers ccmp wpagroupcipher ccmp
inet6 fe80::222:cfff:fe46:6de6%urtwn0 prefixlen 64 scop...
inet 192.168.10.113 netmask 0xffffff00 broadcast 192.16...
inet6 2409:........:8d47 prefixlen 64 autoconf pltime 6...
inet6 2409:........:1974 prefixlen 64 autoconf temporar...
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33136
index 5 priority 0 llprio 3
groups: pflog
これで、従来のdefaultを含め、3つのネットワーク設定が作成...
これらの設定はchnetconfユティリティを使用して、いつでも切...
***ファームウェアのダウンロードが必要なWi-Fiデバイスを使...
この項ではgennetconfs、chnetconfコマンドの応用としてWi-Fi...
OpenBSDでは様々なWi-Fiデバイスがサポートされていますが、...
>''【メモ】''~
''⇒''ファームウェアのダウンロードが必要な事情については、...
OpenBSD FAQ - Wireless Networking ~
https://www.openbsd.org/faq/faq6.html#Wireless ~
~
In order to use some wireless cards, you will need to acq...
(訳) 一部のワイヤレスカードを使用するには、fw_update(1)で...
このようなWi-Fiデバイスは、
-まずファームウェア不要のデバイスで設定を行い、インターネ...
-ファームウェアをダウンロードし、インストール
-ネットワークの設定を目的のWi-Fiデバイス用に変更
という手順で使用することができます。具体的な手順は以下の...
''1. ファームウェア不要のデバイスで設定を行い、インターネ...
起動時に、以下のようにファームウェア不要のデバイスを用い...
ほとんどの有線LAN(イーサネット)デバイスや、あるいは一部の...
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57766
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> bge0
''2. ファームウェアをダウンロードし、インストール''~
rootでログインし、fw_updateコマンドを実行。ファームウェア...
fugu-demo# fw_update -v
Path to firmware: http://firmware.openbsd.org/firmware/7...
Installing: inteldrm-firmware intel-firmware urtwn-firmw...
inteldrm-firmware-20201218:100%|OK
intel-firmware-20210608v0:100%|OK
urtwn-firmware-20180103p0:100%|OK
fugu-demo#
>''【メモ】'' ~
''⇒''fw_updateは、起動時に自動的に実行されていますが、念...
''3. 接続設定を使いたいWi-Fiデバイスに変更''~
ファームウェアがインストールされたら、接続設定をWi-Fiデバ...
fugu-demo# gennetconfs wifi ← 設定ファイルを生成
===================================================
= gennetconfs: generate network configuration files
===================================================
〜略〜
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57766
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> urtwn0 ← Wi-Fiデバイスを選択
Wi-Fi settings:
SSID -> my-wifinet ← Wi-FiのSSIDと
WPA Key -> my-wpa-secret-key ← パスワードを入力
〜略〜
======================================================
= end of gennetconfs:
= Use chnetconf utility to activate this configuration
======================================================
fugu-demo# chnetconf wifi ← ネットワークを今行った...
fugu-demo# ping www.google.com ← 接続を確認
PING www.google.com (216.58.220.100): 56 data bytes
64 bytes from 216.58.220.100: icmp_seq=0 ttl=114 time=33...
64 bytes from 216.58.220.100: icmp_seq=1 ttl=114 time=28...
64 bytes from 216.58.220.100: icmp_seq=2 ttl=114 time=26...
64 bytes from 216.58.220.100: icmp_seq=3 ttl=114 time=21...
^C
--- www.google.com ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet l...
round-trip min/avg/max/std-dev = 21.949/27.683/33.656/4....
以上でWi-Fiのファームウェアのインストール完了です。
最後に変更した内容を[[usbfadmコマンドを使用して保存>#k57e...
# usbfadm -r
========================================
= Sync current mfs as fugu-demo into /dev/sd1d
=
:
:
*河豚板を使う【開発編】 [#p36adf1a]
この章では河豚板の内部を理解したり、河豚板をベースに自分...
**河豚板の技術情報を調べる [#v1708a18]
河豚板はOpenBSDをベースにしているので、その構成物のほとん...
公式のOpenBSDとは異なる河豚板特有の部分については、このサ...
(過去の資料の中には、現状の河豚板と異っている部分もあり...
**河豚板をアプリケーションの専用マシンにする [#la740979]
河豚板は書込み可能なファイルをすべてメモリ上に持っている...
また稼動中にusbfadmによるファイルの保存を行わない限りは、...
このような特徴を利用して、河豚板をベースにして特定のアプ...
このようなシステムを構築するためには、今までに説明してき...
-まず運用環境を整える。~
起動モード0で立ち上げて、各種設定やアプリケーションのイ...
-[[構築した環境をusbfadmにてUSBメモリなどに保存する>#k57e...
-[[モード3で起動し、保存した環境で立ち上がるようにnoasks...
-ログイン操作なしでアプリケーションが立ち上がるように tty...
これらの詳細な手順は、このサイトにある [[EBUG勉強会/20140...
#aname(livedvd_remaster)
**動作中の河豚板から河豚板のISOイメージを作る [#uc7ff81e]
[[USBメモリの容量に合わせてLiveUSBを作成する>#ld36d7ec]]...
>''【メモ】''~
''⇒''この作業は大きなサイズのファイルを扱うので、mfsのサ...
mfsでは足りない場合、他の記録デバイスをマウントしてそちら...
このmaster_dvd.shは、動作中のFuguIta LiveDVD、あるいはFug...
以下にremaster_dvd.shの使用例を示します。
まず、作業用ディレクトリを作成し、sysmedia以下にあるLiveD...
# mkdir work
# cd work
# cp -av /sysmedia .
/sysmedia -> ./sysmedia
/sysmedia/boot -> ./sysmedia/boot
/sysmedia/bsd-fi -> ./sysmedia/bsd-fi
/sysmedia/bsd-fi.mp -> ./sysmedia/bsd-fi.mp
/sysmedia/boot.catalog -> ./sysmedia/boot.catalog
/sysmedia/cdboot -> ./sysmedia/cdboot
/sysmedia/cdbr -> ./sysmedia/cdbr
/sysmedia/etc -> ./sysmedia/etc
/sysmedia/etc/boot.conf -> ./sysmedia/etc/boot.conf
/sysmedia/etc/random.seed -> ./sysmedia/etc/random.seed
/sysmedia/fuguita-6.9-amd64.ffsimg -> ./sysmedia/fuguita...
# ls -l
total 8
drwxr-xr-x 3 root wheel 432 May 11 09:21 sysmedia
コピーされたsysmediaディレクトリ内でremaster_dvd.shを実行...
基本的にはこれだけです。
# cd sysmedia
# ls -l
total 2008728
-rw-r--r-- 1 root wheel 90496 May 10 20:57 boot
-rwxr--r-- 1 root wheel 2048 May 9 12:31 boot.catalog
-rw-r--r-- 1 root wheel 10273019 May 10 21:04 bsd-fi
-rw-r--r-- 1 root wheel 10302063 May 10 21:04 bsd-f...
-rw-r--r-- 1 root bin 91668 May 10 01:31 cdboot
-rw-r--r-- 1 root bin 2048 May 10 01:31 cdbr
drwxr-xr-x 2 root wheel 96 Apr 17 2014 etc
-rw-r--r-- 1 root wheel 1007681536 May 10 21:08 fugui...
# remaster_dvd.sh
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
Size of boot image is 4 sectors -> No-emulation CD boot ...
Total translation table size: 0
Total rockridge attributes bytes: 1111
Total directory bytes: 2048
Path table size(bytes): 22
502200 extents written (980 Mb)
remaster_dvd.shの実行が完了すると、作業用ディレクトリにIS...
# ls -l ..
total 2008808
-rw-r--r-- 1 root wheel 1028505600 May 14 02:34 FuguI...
drwxr-xr-x 3 root wheel 384 May 14 02:34 sysmedia
# ls -l
total 2008720
-rw-r--r-- 1 root wheel 90496 May 10 20:57 boot
-rwxr--r-- 1 root wheel 2048 May 14 02:34 boot.catalog
-rw-r--r-- 1 root wheel 10273019 May 10 21:04 bsd-fi
-rw-r--r-- 1 root wheel 10302063 May 10 21:04 bsd-f...
-rw-r--r-- 1 root bin 91668 May 10 01:31 cdboot
-rw-r--r-- 1 root bin 2048 May 10 01:31 cdbr
drwxr-xr-x 2 root wheel 96 Apr 17 2014 etc
-rw-r--r-- 1 root wheel 1007681536 May 10 21:08 fugui...
sysmedia中にfuguita-6.9-amd64.ffsimgというファイルがあり...
このファイルツリー内のファイルを修正することで、LiveDVDを...
# vnconfig vnd0 fuguita-6.9-amd64.ffsimg
# mount /dev/vnd0a /mnt
# ls -l /mnt
total 52
-rw-r--r-- 1 root wheel 578 May 7 17:43 .cshrc
-rw-r--r-- 1 root wheel 468 May 7 17:43 .profile
drwxr-xr-x 2 root wheel 512 May 7 17:43 altroot
drwxr-xr-x 2 root wheel 1024 May 7 17:46 bin
drwxr-xr-x 2 root wheel 512 May 8 04:16 dev
drwxr-xr-x 23 root wheel 1536 May 8 04:35 etc
drwxr-xr-x 2 root wheel 512 May 7 17:43 home
drwxr-xr-x 2 root wheel 512 May 7 17:43 mnt
drwx------ 3 root wheel 512 May 8 04:35 root
drwxr-xr-x 2 root wheel 1536 May 7 17:46 sbin
lrwxrwx--- 1 root wheel 11 May 7 17:43 sys -> usr...
drwxrwxrwt 2 root wheel 512 May 8 04:19 tmp
drwxr-xr-x 14 root wheel 512 May 8 04:09 usr
drwxr-xr-x 23 root wheel 512 May 7 17:43 var
.... (カスタマイズ作業) ...
カスタマイズが完了したら、ファイルシステムイメージを閉じ...
# umount /mnt
# vnconfig -u vnd0
# remaster_dvd.sh
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
:
:
#aname(build_fuguita)
**河豚板の開発ツールを使う - LiveDVDの作成 [#l691fd75]
河豚板は不定期ではありますが、ライブシステム構築のために...
この構築ツールを使用することで河豚板のISOイメージファイル...
この節ではLiveDVDの構築方法を説明します。
>''【メモ】''~
''⇒''この構築法は、河豚板7.1以降が対象です。
***作業の前に [#o52a2103]
-必要なもの
--作業用OS (OpenBSDまたは河豚板)
--OpenBSDカーネルのソースツリー
--rsync, rlwrap, pvのパッケージファイル
--河豚板の構築ツール
-作業条件
--前項の「必要なもの」で挙げたものはすべてOpenBSDの同じバ...
--全ての操作はroot権限で行います。
***作業手順 [#kfcd328f]
以降、作成手順について例を示しながら解説します。~
対象バージョンとしてOpenBSD 7.1、プラットフォームはamd64...
また、構築ツールを置くディレクトリを FIBLD と表記していま...
-OpenBSDカーネルのソースコードを取得・展開
# tar -xzp -C /usr/src -f sys.tar.gz
>''【メモ】''~
''⇒''カーネルのソースツリーを最新の状態にアップデートする...
-構築作業用ディレクトリFIBLDに河豚板の構築ツールを展開
# mkdir -p FIBLD
# cd FIBLD
# ftp https://FUGUITA-MIRROR-SITE/tools/tools-7.1-amd64....
# tar -xzp -C FIBLD -f tools-7.1.tar.gz
# mv tools-7.1-amd64
# rmdir tools-7.1-amd64
以下の作業は、全て作業用ディレクトリFIBLDで行います。
-河豚板用のOpenBSDカーネルを生成
# cd FIBLD
# make kernconfig
# make kernclean
# make kern
-OpenBSDのインストールセットを準備 ~
構築ツールのinstall_setsディレクトリにOpenBSDのインストー...
# ( cd install_sets
for f in base comp game man xbase xfont xserv xshare...
ftp $(cat /etc/installurl)/7.1/amd64/${f}71.tgz
done )
-河豚板に追加するパッケージをセットアップ ~
構築ツールのinstall_pkgsディレクトリにOpenBSDのpackagesか...
# PKG_CACHE=FIBLD/install_pkgs pkg_add -n rsync rlwrap pv
# pkg_add install_pkgs/rsync*.tgz install_pkgs/pv*.tgz
-河豚板のファイルツリーを生成し、FuguIta 用に修正
# make stage
FuguItaをカスタマイズする場合は、make stage実行後、FIBLD/...
-このファイルツリーの内容に、河豚板に内蔵させるイメージフ...
# make sync
-ISOイメージファイルの生成 ~
ルートファイルシステムのイメージとカーネルを統合し、ブー...
# make iso
-ISOファイルイメージをリリース文字列付きのファイル名でGZI...
# make gz
以上でFIBLD内にFuguIta-7.1-amd64-yyyymmddn.iso.gzが作成さ...
///***Makefile ターゲット一覧 [#hc3a48d2]
///河豚板のISOイメージ構築で用いられるmakeコマンドの引数(...
///これらは全てディレクトリFI_BUILD_PATH/tools-6.7-amd64...
///|make ターゲット|動作|h
///|open-rdroot |rdroot.img内のファイルシステムをrdroot...
///|open-media |media.img内のファイルシステムをmediaに...
///|open-fuguita |media/fuguita-*-*.ffsimg内のファイルシ...
///|close-rdroot |rdrootのマウントを解除します|
///|close-media |mediaのマウントを解除します&br;(予めma...
///|close-fuguita |fuguitaのマウントを解除します|
///|close-all |構築環境の全てのマウントを解除します|
///|boot |rdrootをカーネルに組込み、ISOコンテン...
///|hyb |ISOコンテンツをISOイメージファイルに変...
///|cdgz |ISOイメージファイルを圧縮します|
//>''【メモ】''~
//''⇒''nabekenさんという方が河豚板を基にして[[myFuguita>h...
**河豚板のディスクイメージを作る [#pb1213e7]
この節では、LiveUSBのディスクイメージファイルを作成する方...
usbfadm の newdrive を実行します;
? : ? ->newdrive
Please make sure the device inserted.
Then press ENTER ->
==== disk(s) and vnode devices =========================...
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HTS72757, JF...
sd0: 715404MB, 512 bytes/sector, 1465149168 sectors
sd1 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G...
sd1: 29624MB, 512 bytes/sector, 60669952 sectors
sd2 at scsibus5 targ 1 lun 0: <BUFFALO, USB Flash Disk, ...
sd2: 7788MB, 512 bytes/sector, 15950592 sectors
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
vnd4: not in use
vnd5: covering /sysmedia/fuguita-6.4-amd64.ffsimg on sd1...
========================================================...
Enter the name of device which FuguIta will be installed...
Enter size of a vnode device file.
You can add suffix K, M, G or T (otherwise considered 'b...
->2g ...
...
2048+0 records in
2048+0 records out
2147483648 bytes transferred in 3.076 secs (698129518 by...
Disk: vnd0 geometry: 41943/1/100 [4194304 Sectors]
Offset: 0 Signature: 0x0
Starting Ending LBA Info:
#: id C H S - C H S [ start: s...
--------------------------------------------------------...
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
Select partition type:
1: [MBR]
2: GPT
3: Hybrid (not recommended if you wish modify partiti...
->
〜 略 〜
** Phase 5 - Check Cyl groups
3 files, 3 used, 386996 free (20 frags, 48372 blocks, 0....
? : ? ->bye
Bye bye...
$
以上の操作でカレントディレクトリ上にディスクイメージファ...
*終わりに [#i1946bfd]
河豚板についての説明は以上です。
このガイドでは河豚板の導入から応用・開発までを紹介しまし...
河豚板は「ITにおけるアーミーナイフ」を目指しています。...
このガイドはそんな河豚板に関する取扱説明書のようなものと...
>''【メモ】''~
''⇒''作者は若い頃貧乏学生だったので、ハンダゴテとスイスア...
そして、アーミーナイフの性能が高品質なステンレス鋼の製造...
長年にわたりOpenBSDの改良を進めてこられたTheo de Raadt氏...
さらに、河豚板に同梱させて頂いている種々のフリーソフトウ...
これらなしには10年以上もの間、開発を続けることは到底不...
今後とも、河豚板をどうぞよろしくお願い致します。
2015年12月30日 ~
川俣 吉広
----
作成 2015年12月30日 ~
改訂 2017年1月15日、2018年8月1日、2018年8月8日、2019年1月...
End:
*河豚板とは [#s592cdf8]
RIGHT:川俣 吉広~
kaw@on.rim.or.jp
河豚板(ふぐいた)はOpenBSDというオペレーティングシステム...
河豚板は無償で入手・利用することができ、DVDやUSBメモリに...
さらに、河豚板はバラエティに富んだ起動方法をサポートして...
この河豚板ガイドでは、記録メディアへの河豚板の書込み方法...
>Unix系OSの使用経験があまりなく、Unixの基本的な事柄につい...
LinuxやFreeBSDなど他のUnix系OSの使用経験がありOpenBSDにつ...
----
''【河豚板ガイド 目次】''
#contents
----
>''【おことわり】'' ~
''⇒''この文書は無保証です。~
この文書を作成するにあたり著者は正確な内容と明確な表現を...
なおこの文書に関して、不明瞭な表現、不足している部分、事...
*河豚板を作る [#w5465a04]
この章では、河豚板が起動するDVDやUSBメモリを作成する方法...
河豚板を使うには、主に2つの方法があります。
1つはDVD-RやDVD-RWに河豚板を書込み、これを起動する方法で...
もう1つはUSBメモリに書込んだものを起動する方法で、こちら...
河豚板はLiveDVD版とLiveUSB版のどちらを使用しても同じよう...
-一般的にはUSBメモリの方がDVDよりデータの読み出し速度が早...
-古いPCのなかにはUSBメモリからうまく起動できないものや起...
対してDVDのドライブは標準化された規格に準拠して製造されて...
-河豚板などの「ライブシステム」は、ハードディスクなどにイ...
LiveUSB版の河豚板にはデータの保存領域が確保されており、こ...
-記録メディアの単価はUSBメモリに比べDVD-Rなどの光学メディ...
総じて「動作の確実性や経済性を求めるのであればLiveDVD版が...
>''【メモ】'' ~
''⇒''[[LiveDVD版とLiveUSB版の両方を同時に使う>#o7bfa547]]...
このテクニックを使うと、例えば「USB起動に対応していないPC...
最初に河豚板を使い始めるには、以下の手順を踏みます;
+河豚板の配布サイトからファイルをダウンロードする
+ダウンロードしたファイルは圧縮されているので、それを展開...
+展開したファイルをDVD-RやUSBメモリに書き込む
以下、それぞれの手順について説明をします。
**河豚板をダウンロードする [#vd7f3e84]
#ref(dlsite.png,around,right)
河豚板はフリーソフトウェアです。河豚板の最新版を始めとし...
河豚板のダウンロードサイトは4つあります。
-https://jp1.dl.fuguita.org/
-https://jp2.dl.fuguita.org/
-https://de.dl.fuguita.org/
-https://fr.dl.fuguita.org/
サイトの内容は同じなので、どちらのサイトからでも同じよう...
日本国内からは、jp1.dl.fuguita.org または jp2.dl.fuguita....
これらのサイトにアクセスすると、右図のような内容が表示さ...
このうち、「FuguIta-」で始まる名前のファイルが河豚板の配...
#clear
このファイル名の意味は、次のようになっています。
FuguIta-6.7-amd64-202006244.iso.gz
--- ----- --------- --- --+->ファイルの圧縮形式...
| | | | ・gz ... gzipコマン...
| | | | ・xz ... xzコマンド...
| | | | (現在はgzip形式での...
| | | +->ファイルの種類です
| | | ・iso ... DVD-R/DVD-RW書...
| | | ・img ... USBメモリ書込...
| | | ・tar ... 複数のファイル...
| | |
| | +->河豚板のリリース(バージョン)...
| | ・「年月日」「一連番号」 の形式...
| | ・一連番号は、一日のうち2つ以...
| | 一つづつ増えて行きます
| |
| +->対応プラットフォームです。
| 河豚板は現在、i386, amd64, arm64の3種...
| しています。お使いのPCのCPU型式に対応し...
|
+->この河豚板の元となっているOpenBSDのバージョ...
作成するのがLiveDVDか、あるいはLiveUSBか、PCのがインテル...
>''【メモ: 対応アーキテクチャについて】'' ~
''⇒''上で説明したように、使用しているPCのCPUの種類によっ...
arm64はシングルボードコンピュータ「Raspberry Pi 3」版の河...
ダウンロードが完了したら、圧縮されているファイルを展開し...
以下は、Unix系のOSでシェルのコマンドラインからDVD-R/DVD-R...
gzip -d FuguIta-6.0-amd64-201612251.iso.gz
展開が完了するとファイルサイズが約1ギガバイトになり、フ...
>''【ご注意】'' ~
''⇒''「Raspberry Pi 3」版の河豚板は、tar形式のアーカイブ...
tar xzvf FuguIta-6.7-arm64-202006244.tar.gz
Raspberry Pi 3版河豚板の作成方法、および起動方法について...
**河豚板のLiveDVDを作る [#f68a63fc]
LiveDVD版の河豚板を作るにはDVD-RやDVD-RWなどの書込み可能...
以下は、OpenBSD上で書き込みを行う場合の例です;
pkg_add dvd+rw-tools ←DVDの書込みソフ...
growisofs --dvd-compat -Z /dev/rcd0c=FuguIta-6.7-amd64-2...
>''【メモ】'' ~
''⇒''他のOSでも[[ISOイメージ書き込みソフトが公開されてい...
**河豚板のLiveUSBを作る [#i222ed0b]
LiveUSB版の河豚板を作るには2ギガバイト以上のサイズのUSB...
以下は、OpenBSDを使用して書き込みを行う場合の例です;
dd if=FuguIta-6.7-amd64-202006244.img of=/dev/rsd0c
>&color(red){''【ご注意】''};~
&color(red){''!!''上の例の「/dev/rsd0c」の部分は書き込...
>''【メモ】''~
''⇒''ISOイメージ書込みソフト同様、[[生イメージ書き込み用...
''⇒''2ギガバイト以上のUSBメモリを使用しても、2ギガバイ...
USBメモリのサイズに合ったLiveUSB版河豚板を作成したい場合...
*河豚板を起動する [#z10a837d]
この章では河豚板の起動方法、およびその途中で行う設定値の...
**起動デバイスの選択 [#g59fd44e]
河豚板を書き込んだDVDやUSBメモリをPCにセットして起動する...
>''【メモ】''~
''⇒''DVDやUSBメモリをセットして起動しても、すでにインスト...
河豚板を起動できるようにするにはPCのBIOSメニューの設定を...
PCのBIOSメニューは機種により異なりますので、お使いのPCの...
河豚板が起動すると、以下のようなメッセージが表示されます;
>> OpenBSD/amd64 CDBOOT 3.46
boot>
booting cd0a:/bsd-fi.mp: 12997960+2769928+2277408+0+7086...
entry point at 0xffffffff81001000
[ using 2587528 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. Al...
Copyright (c) 1995-2020 OpenBSD. All rights reserved. h...
OpenBSD 6.7-stable (RDROOT.MP) #1: Fri Jun 5 09:41:45 J...
root@nimbus9.localnet:/opt/fi/6.7/sys/arch/amd64/com...
real mem = 1056825344 (1007MB)
avail mem = 1010286592 (963MB)
mpath0 at root
〜略〜
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
uhub1: illegal enable change, port 1
root on rd0a swap on wd0b dump on rd0b
>''【メモ】''~
''⇒''実際には画面表示が途中から&color(white,blue){青地に...
このメッセージはカーネル(オペレーティングシステム本体)が...
#ref(fuguboot.png,wrap)
これらの表示にはPCのメモリや周辺機器の接続状態などの認識...
OpenBSDカーネルの起動が完了すると、河豚板のバナーが表示さ...
============================================
= ______ __ _
= / ____/ | |_| |__
= / /____ ______ __ _| /_ _/_____
= / ___/ / / / __ \/ / / | | | | / _ |
= / / / /_/ / /_/ / /_/ /| | | |_| (_) |__
=/_/ \____/\__ /\____/ |__| \___/____/__/
= __/ /
= /___/
=
= Welcome to FuguIta - OpenBSD Live System!
= http://fuguita.org/
=============================================
河豚板のバナー表示に続きこのPCに接続されているディスク機...
以下の例では「FuguIta's operating device(s): cd0a.」とあ...
よって、「Which is FuguIta's operating device?」(河豚板...
>''【メモ】''~
''⇒''これ以降、様々な値を入力してゆきますが、それらのプロ...
scanning partitions: cd0a sd1d
FuguIta's operating device(s): cd0a.
Which is FuguIta's operating device? [default: cd0a] -> ...
>''【メモ】''~
''⇒''OpenBSDオペレーティングシステムでは、ディスク機器に...
-最初のアルファベット数文字 ... 機器の種類
--cd ... CD, DVDやBlu-Rayなどの光学ドライブ
--wd ... ハードディスク(IDE, SATA接続)
--sd ... USBメモリ、SDカード、メモリスティック、SATA接続...
--fd ... フロッピーディスク
-それに続く数字 ... その種類の機器が複数接続されてる場合...
-最後のアルファベット ... その機器内の区画(パーティション)~
パーティションは概ね、以下のように使用されています;
--c ... その機器全体を表します
--b ... その機器内のOpenBSDスワップパーティションを表します
--a, d〜h ... OpenBSDのファイルが格納されるパーティション...
--i, j など ... WindowsやLinux用のパーティションはこのi, ...
-注)cパーティション、bパーティション以外は慣習的にそのよ...
**mfsサイズの設定 [#lab8d0b5]
続いて、メモリに関する設定を行います。
以下の例ではまず、このPCでは1007メガバイトのメモリが使用...
そして、その1007MBのメモリの内、何メガバイトをmfsに割り当...
河豚板は通常、PCに内蔵されたハードディスクを使用しないた...
設定値の入力箇所には「default: 755M」と表示されており、<E...
通常は<Enter>キーだけの入力で問題ありません。
activating swap partition: /dev/sd0b
available memory: 1007M
total swap size: 16M
Enter mfs size.
You can add suffix K, M, or G.
% is a percentage of memory size.
and %% is a percentage of the total memory and swap.
otherwise considered "megabytes"
[default: 755M] -> ← <Enter>のみ入力
set mfs size to 755MB
''【メモ】''~
''⇒''表示で説明されているように、入力値には「K」「M」「G...
何も付けず数字だけの場合はメガバイトと見なされます。
''【メモ】''~
''⇒''mfsの最大容量には、アーキテクチャ毎に最大値が決って...
///>''【メモ】''~
///''⇒''0ではない数値を入力した場合はその値がmfsが保持で...
**起動モードの選択 [#ve0c5d62]
続いて起動モードの選択に移ります。
起動モードにはモード0からモード5までの6種類がありますが、...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->0
Running manual setup.
Copying system files to /ram ... done
Extracting symlinks from /ram to /fuguita ... done
>''【メモ】''~
''⇒''他のモードについては [[河豚板を使う【一般編】>#v7ad3...
**キーボードレイアウトの設定 [#l7dd451d]
次はキーボードの言語設定です。
日本語キーボードの場合は「jp」又は「jp.swapctrlcaps」を入...
「jp.swapctrlcaps」を入力すると、<Control>キーと<Caps>キ...
EmacsエディタやBashシェルなどのキー割り付けに慣れている方...
Enter keyboard type.
pc-xt/pc-at keyboard:
us de de.nodead fr fr.dvorak dk dk.nodead it uk jp sv sv...
declk us.dvorak us.colemak us.swapctrlcaps us.iopener uk...
lcaps fr.swapctrlcaps fr.swapctrlcaps.dvorak be.swapctrl...
rak us.swapctrlcaps.colemak us.swapctrlcaps.iopener es b...
sf.nodead pt lt la br tr tr.nodead pl hu si cf cf.nodead...
odead ee ee.nodead
keyboard type -> jp
**管理者パスワードの設定 [#s2ae4507]
キーボード設定に続き、管理者パスワードの設定を行います。
OpenBSDなどのUnix系OSでは、システム管理者のことを「スーパ...
スーパーユーザには、あらかじめ「root」というユーザ名が割...
Changing password for root.
New password: ← パスワー...
Retype new password: ← 確認のた...
>''【メモ】''~
''⇒''OpenBSDでは入力したパスワードが短かすぎたり単純過ぎ...
設定するパスワードには以下のようなものが推奨されています;
-半角6文字以上
-アルファベットの大文字と小文字を混在させる
-数字や記号文字、制御文字なども混ぜる
**ネットワーク関連の設定 [#r0b7d6e7]
次に、ネットワーク関連の設定を入力します。
>&color(red){''【ご注意】''};~
&color(red){''!!''ネットワークの設定内容は接続するネッ...
***ホスト名の設定 [#c96987b8]
最初に、河豚板を走らせるPCに名前(ホスト名: host name)を付...
ホスト名は、ドメイン付き(FQDN: Fully Qualified Domain Nam...
閉じたネットワーク内で使用する場合など、ドメイン無しで構...
この例ではホスト名として「fugu-demo.localnet」という名前...
Hostname with domain part (FQDN):
only host name without domain part is also OK.
-> fugu-demo.localnet
>''【メモ】''~
''⇒''家庭内のネットワークなどでは、ドメイン名は正式に登録...
組織によって管理されているネットワークの場合は、そのネッ...
***IPプロトコルバージョンの選択 [#b1fe3bbb]
次は使用するIPプロトコルバージョンの設定です。
IP protocol version(s) to be enabled: 4, 6, 46, 64 or "n...
4: enable only IPv4
6: enable only IPv6
46: give priority to IPv4 name resolution
64: give priority to IPv6 name resolution
none: operate as standalone
[64] ->
IPv4プロトコルだけを使用して通信を行う場合は「4」を、IPv6...
「none」を入力するとIPネットワークに関する設定は行なわれ...
~<Enter>キーのみを入力した場合は、「64」を入力したものと...
通常は<Enter>キーのみの入力で問題ありません。
>''【メモ】''~
''⇒''IPv4、IPv6両方を使用する場合は「46」と「64」のどちら...
「46」ではIPv4を優先してアドレスの問合せを行い、逆に「64...
***ネットワークインターフェースの設定 [#rf0db1af]
続いてネットワークインターフェースの設定を行います。
まず、このPCに接続されているネットワークインターフェース...
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge1 ether Broadcom BCM57766
ure0 ether Realtek USB 10/100/1000 LAN
run0 wifi Ralink 802.11 n WLAN
[bge1] ->
>''【メモ】''~
「bge」はBroadcom社製のギガビットイーサネットインターフェ...
bge以外のイーサネットインターフェースやWi-Fiインターフェ...
個々のネットワークインターフェースについてはOpenBSDに内蔵...
#aname(wifi-set)
***Wi-Fiの設定 [#uc1e3dd5]
このあと、ネットワークインターフェースとしてWi-Fiデバイス...
Wi-Fi settings:
SSID -> my-wifinet ← 接続したいWi-FiのSSID...
WPA Key -> my-wpa-secrect-key ← WPAの鍵を入力
なお、WPAの鍵をENTERのみ入力し、設定を行わなかった時にWEP...
WEP方式は現在では簡単に暗号を解読されてしまうため、WEPは...
SSID -> my-wifinet
WPA Key ->
WEP Key -> my-wep-unsecured-key
>''【メモ】''~
''⇒''Wi-Fiデバイスには、デバイスメーカーが供給するファー...
この場合は有線LANを設定してインターネットに接続した後、[[...
''⇒''WEP鍵の入力に対してENTERのみを入力した場合はWPA・WEP...
***IPv6の設定 [#me426305]
IPv6を有効にした場合は、以下の設定入力が表れます。
説明にあるように、"auto"、あるいは手動によりアドレスを設...
多くの場合、"auto"で対応可能です。
IPv6 - address and routing:
Enter "auto" or "IPv6_address[/prefixlen] [default_gat...
"auto" is an automatic setting by SLAAC.
The "/prefixlen" part can be an integer between 0 and ...
If there is no default gateway, set the second field t...
[auto] ->
>''【メモ】''~
''⇒''"/prefixlen"を省略した場合、"/64"を指定したと見做さ...
***IPv4の設定 [#mae50aaa]
IPv4を有効にした場合は、以下の設定入力が表れます。
説明にあるように、アドレス自動設定を行う場合は"auto"を指...
下記の例ではアドレスの入力を行うことで、手動によるアドレ...
IPv4 - address and routing:
Enter "auto" or "IPv4_address[/mask] [default_gateway]"
"auto" is an automatic setting by DHCP.
The "/mask" part can be specified in either format, su...
If there is no default gateway, set the second field t...
[auto] -> 192.168.1.147/24 192.168.1.254
>''【メモ】''~
''⇒''"/mask"を省略した場合は、適切と思われるネットマスク...
''⇒''IPv4アドレスの自動設定を使用するには、そのネットワー...
家庭用のネットワーク機器や公共のWi-FiスポットではDHCPサー...
***DNSサーバの設定 [#z6a5674c]
IPv4やIPv6の設定で手動によるアドレス設定を行った場合、DNS...
DNSサーバのIPアドレスを最大3つまで、スペースで区切って入...
DNS servers: up to 3 IP addresses, separated by spaces
-> 192.168.1.253
>''【メモ】''~
''⇒''DNS (Domain Name System)とは、「fuguita.org」のよう...
''⇒''IPアドレスを直接指定して通信する場合はDNSサーバは必...
***設定値の書込み [#k69e671b]
最後に、今まで入力した設定値を反映した設定ファイルが「/et...
writing configured values to:
/etc/fuguita/netconfs/default/myname
/etc/fuguita/netconfs/default/mygate
/etc/fuguita/netconfs/default/hosts
/etc/fuguita/netconfs/default/hostname.bge1
/etc/fuguita/netconfs/default/resolv.conf
**ログイン方法の選択 [#ue53afbc]
最後に、どのような方法でログインするかを指定します。~
ログイン方法には、このままコンソール画面から行う方法と、X...
以下の例では<Enter>キーのみを入力して、デフォルトのコンソ...
Do you login with C)onsole or X) Window System?
[default: C] ->
X Window Systemからのログインを行うには、「x」を入力しま...
起動時の設定は以上です。残った初期化処理を行った後は[[ロ...
____________________________________________...
/ Setup for FuguIta ends. /
/ OpenBSD's boot sequence will follow. /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Automatic boot in progress: starting file system checks.
kbd: keyboard mapping set to us
pf enabled
machdep.allowaperture: 0 -> 2
machdep.lidaction: 1 -> 0
〜略〜
starting network daemons: sshd smtpd sndiod.
running rc.firsttime
Path to firmware: http://firmware.openbsd.org/firmware/6...
Installing: vmm-firmware
starting local daemons: cron.
fuguita: disabled KARL because of read-only media
Thu Jul 2 06:51:57 UTC 2020
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
ログインプロンプト「login:」が表示されると、このPCはユー...
以降は [[河豚板を使う>#v7ad37bc]] にて説明を致します。
*河豚板を使う【一般編】 [#h70740c9]
[[河豚板を起動する>#i322b9ad]] では起動及びその設定方法に...
この章ではシステムが起動完了し、実際に使用する時の基本的...
また、Unix系OSになじみのない人、そして他のUnix系OSを使用...
**システム管理者としてログイン・ログアウトする [#g0a4a925]
河豚板の起動が完了すると、OpenBSDオペレーティングシステム...
最初はスーパーユーザのアカウントのみがログインできる状態...
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: root
Password:
OpenBSD 6.7-stable (RDROOT.MP) #1: Fri Jun 5 09:41:45 J...
Welcome to OpenBSD: The proactively secure Unix-like ope...
Please use the sendbug(1) utility to report bugs in the ...
Before reporting a bug, please try to reproduce it with ...
version of the code. With bug reports, please try to en...
enough information to reproduce the problem is enclosed,...
known fix for it exists, include that as well.
You have new mail.
fugu-demo#
ログインに成功するとシェルのプロンプト「#」が表示され、コ...
例としてpsというコマンドを実行してみます。
fugu-demo# ps -aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED ...
root 68528 3.6 0.1 868 884 00 Sp 6:51AM ...
root 1 0.0 0.1 884 532 ?? I 6:40AM ...
root 14453 0.0 0.1 792 644 ?? Ip 6:43AM ...
_slaacd 53995 0.0 0.1 812 784 ?? Ip 6:43AM ...
_slaacd 33982 0.0 0.1 800 732 ?? Ip 6:43AM ...
root 55401 0.0 0.1 712 548 ?? IU 6:44AM ...
_dhcp 78950 0.0 0.1 840 700 ?? Ip 6:44AM ...
root 86344 0.0 0.2 520 2184 ?? IpU 6:46AM ...
_syslogd 45328 0.0 0.1 1128 1488 ?? Sp 6:46AM ...
root 73380 0.0 0.1 836 584 ?? IU 6:46AM ...
_pflogd 53476 0.0 0.1 876 540 ?? Sp 6:46AM ...
_ntp 63935 0.0 0.3 1016 2868 ?? S<p 6:47AM ...
_ntp 18769 0.0 0.2 820 2508 ?? Ip 6:47AM ...
root 34145 0.0 0.2 788 1568 ?? S<pU 6:47AM ...
root 63360 0.0 0.1 1324 1280 ?? I 6:47AM ...
root 61566 0.0 0.2 1680 2052 ?? Ip 6:48AM ...
_smtpd 19845 0.0 0.4 1448 3940 ?? Ip 6:48AM ...
_smtpd 66321 0.0 0.4 1716 4240 ?? Ip 6:48AM ...
_smtpd 91561 0.0 0.4 1552 4164 ?? Ip 6:48AM ...
_smtpd 90688 0.0 0.4 1844 4396 ?? Ip 6:48AM ...
_smtpq 16446 0.0 0.4 1640 4252 ?? Ip 6:48AM ...
_smtpd 82450 0.0 0.4 1440 3988 ?? Ip 6:48AM ...
_sndio 66682 0.0 0.1 516 744 ?? I<p 6:48AM ...
_sndiop 92235 0.0 0.1 504 920 ?? IpU 6:48AM ...
root 1376 0.0 0.1 672 1268 ?? Sp 6:51AM ...
root 6575 0.0 0.0 484 360 00 R+pU/0 7:32AM ...
root 13541 0.0 0.1 288 1296 C0 I+pU 6:51AM ...
root 70324 0.0 0.1 292 1308 C1 I+pU 6:51AM ...
root 10475 0.0 0.1 296 1312 C2 I+pU 6:51AM ...
root 81779 0.0 0.1 292 1304 C3 I+pU 6:51AM ...
root 45364 0.0 0.1 284 1280 C5 I+pU 6:51AM ...
fugu-demo#
psは、現在どのようなプログラム(プロセス)が動いているかを...
システムが起動直後、しかも画面表示上動きのない様子であっ...
ログアウトするにはシェルのプロンプト「#」が出ているときに...
>''【メモ】''~
''⇒''<Control>-Dは「<Control>キーを押したままの状態でアル...
# exit
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
ログアウトすると「login:」が表示され、再度ログインできる...
**一般ユーザを登録する [#w5c31fcf]
起動直後の河豚板は、スーパユーザ(システム管理者)用のアカ...
Unix系のOSでは、通常は一般ユーザとしてログインし、日常の...
システム管理の時には一般ユーザから一時的にスーパユーザに...
>&color(red){''【ご注意】''};~
&color(red){''!!''スーパユーザでログイン中はシステムを...
以下、一般ユーザとしてyoshiというアカウントを作成してみま...
ユーザアカウントの作成もシステム管理ですので、rootで行い...
ユーザアカウントを追加するにはadduserというコマンドを使用...
まず、ユーザアカウント追加時のデフォルト値を訊かれます。...
# adduser
Couldn't find /etc/adduser.conf: creating a new adduser ...
Reading /etc/shells
Enter your default shell: bash csh ksh nologin nsh sh [k...
Your default shell is: ksh -> /bin/ksh
Default login class: authpf bgpd daemon default pbuild s...
[default]: ...
Enter your default HOME partition: [/home]: ...
Copy dotfiles from: /etc/skel no [/etc/skel]: ...
Send welcome message?: /path/file default no [no]: ...
Do not send message(s)
Prompt for passwords by default (y/n) [y]: ...
Default encryption method for passwords: auto blowfish [...
Use option ``-silent'' if you don't want to see all warn...
Reading /etc/shells
Check /etc/master.passwd
Check /etc/group
以降は、一般ユーザのアカウント「yoshi」を作成してみます。~
最初に表示されているように、入力内容は最後に訂正でき(入...
Ok, let's go.
Don't worry about mistakes. There will be a chance later...
Enter username []: yoshi ←アカウ...
Enter full name []: Yoshihiro Kawamata ←ユーザ...
Enter shell bash csh ksh nologin nsh sh [ksh]: ←<Enter>...
Uid [1000]: ←<Enter>...
Login group yoshi [yoshi]: ←<Enter>...
Login group is ``yoshi''. Invite yoshi into other groups...
[no]: wheel ←(ログイ...
Login class authpf bgpd daemon default pbuild staff unbo...
[default]: ←<Enter>...
Enter password []: ←パスワ...
Enter password again []: ←確認の...
Name: yoshi
Password: ****
Fullname: Yoshihiro Kawamata
Uid: 1000
Gid: 1000 (yoshi)
Groups: yoshi wheel
Login Class: default
HOME: /home/yoshi
Shell: /bin/ksh
OK? (y/n) [y]: y ←入力内...
Added user ``yoshi''
Copy files from /etc/skel to /home/yoshi
Add another user? (y/n) [y]: n ←他にも...
Goodbye!
#
>''【メモ】''~
''⇒''この例ではアカウントyoshiをwheelというグループにも加...
wheelに加入しているユーザは、システム管理作業を行うために...
以上で、yoshiという一般ユーザアカウントが作成されましたの...
fugu-demo# exit
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: yoshi
Password:
OpenBSD 6.7-stable (RDROOT.MP) #1: Fri Jun 5 09:41:45 J...
Welcome to OpenBSD: The proactively secure Unix-like ope...
Please use the sendbug(1) utility to report bugs in the ...
Before reporting a bug, please try to reproduce it with ...
version of the code. With bug reports, please try to en...
enough information to reproduce the problem is enclosed,...
known fix for it exists, include that as well.
fugu-demo$ pwd
/ram/home/yoshi
fugu-demo$ ls
fugu-demo$ ls -a
. .Xdefaults .cvsrc .mailrc .ssh
.. .cshrc .login .profile
fugu-demo$ ^D
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
>''【メモ】''~
''⇒''rootでログインしたときのシェルのプロンプトは「#」に...
以降の例示箇所でもこの表記に従います。~
''⇒''OpenBSDではrootアカウントでのSSHによるログインは許可...
**X Window Systemを起動してみる。 [#i594f81d]
OpenBSDはX Window Systemというグラフィック環境を含んだ形...
>''【メモ】''~
''⇒''X Window Systemは「X」や「X11」などと略して呼んでも...
Xを使用するには、[[ログイン方法の選択>#a5fdbf53]] で説明...
Do you login with Console or X Window System?
[default: Console] -> x
Xが起動すると、以下のようなログイン画面が表示されますので...
#ref(xenodm-login.png,,50%)
ログインに成功すると以下のような画面になります。
#ref(startx.png)
画面左上の白いウィンドウは「端末エミュレータ」というもの...
右上には時計が表示されています。~
左下にあるものは「xconsole」といい、システムのログ情報を...
右下の表のようなものは、「仮想デスクトップ」といい、複数...
壁紙部分(Xでは、「ルートウィンドウ」と呼びます)でマウスの...
以下の画面は、実際にアプリを実行してみた例です。
#ref(various-xclt.png,wrap)
ルートウィンドウではマウスの中ボタンや右ボタンを押すこと...
>''【メモ】''~
''⇒''Xの操作は3ボタンマウスによる操作を想定して設計され...
中ボタンのないマウスの場合は、左右のボタンを両方同時に押...
Xを終了するには、マウスの左ボタンのメニュー中、「Exit」を...
#ref(quit-verify-win.png,wrap)
>''【メモ】''~
''⇒''OpenBSDには、X Windowを使うためのソフトウェア(デスク...
**河豚板を終了する [#lc2bbc96]
河豚板の運用を終了するにはrootでログインし、shutdownコマ...
fugu-demo# shutdown -h -p now
Shutdown NOW!
shutdown: [pid 4771]
fugu-demo#
*** FINAL System shutdown message from root@fugu-demo.lo...
System going down IMMEDIATELY
System shutdown time has arrived
fugu-demo# syncing disks... done
上の例では、shutdownコマンドへの指定として -h オプション...
また、-p オプションを指定しているので停止直後に電源が自動...
~ -h オプションや -p オプションの替わりに -r オプションを...
システムの停止や再起動を行うと、今回の起動後に行った設定...
>''【メモ】''~
''⇒''これら各種の設定やデータを保存・復帰させることもでき...
河豚板上で行った操作がシステムを停止すると消えてしまうと...
つまり、rootでファイルの消去やプロセスの停止などを行って...
#aname(usbfadm_sync)
**設定やファイルを保存する - usbfadm syncコマンド[#ufce06...
河豚板ではユーザが作成したファイル、設定の変更、追加され...
データの保存にはrootでログインし、usbfadmコマンドを実行し...
>''【メモ】''~
''⇒''usbfadmは(USB Flash drive ADMinistration tool)の略で...
# usbfadm
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.0/amd64 (FuguIta-6.0-amd64-201612291)
Boot mode: manual
Data stored in: not set
Data Saved as: not set
Type ? for help.
まず、targetコマンドを使用して保存先のパーティションを指...
保存用のデバイスが装着されていることを確認した後、ENTERを...
デバイス名の前に+記号がついているものが、保存に使用するこ...
? : ? --> target
Searching USB flash drives
Please make sure the device inserted.
Then press ENTER ->
cd0a sd0a +sd0d
targe device--> sd0d
次に、saveasコマンドを使用して保存するデータに名前を付け...
名前を省略した場合、ホスト名が保存名として使用されます。
sd0d : ? --> saveas
Name of saved data --> fugu-demo
Your data will be saved as ``fugu-demo''.
当初「?:?」だったプロンプトの文字列が変化していることにご...
今ほどのtargetコマンドとsaveasで設定した値がプロンプト内...
最後にsyncコマンドを実行し、データを実際に保存します。
/dev/sd0d : fugu-demo -> sync
Sync current mfs as fugu-demo, OK? -> y
building file list ... done
created directory /mnt/livecd-config/fugu-demo
./
etc/
etc/bgpd.conf
etc/boot.conf
:
:
var/yp/Makefile.yp
var/yp/Makefile.yp.dist
var/yp/README
sent 16455591 bytes received 232568 bytes 180412.53 by...
total size is 15492096 speedup is 0.93
infoコマンドで保存されたデータの情報を表示してみます。
/dev/sd0d : fugu-demo -> info
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0d 218M 18.9M 179M 9.6% /mnt
scanning...
18.9M 6.0/amd64/fugu-demo
データは問題なく保存されているようなのでusbfadmを終了しま...
/dev/sd0d : fugu-demo -> bye
#
>''【メモ】''~
usbfadmによる保存は、シェルのコマンドラインからも行うこと...
# usbfadm -r
========================================
= Sync current mfs as fugu-demo into /dev/sd0d
=
sending incremental file list
deleting etc/X11/xenodm/authdir/authfiles/A:0-G4H73h
:
var/spool/smtpd/purge/
var/spool/smtpd/temporary/
#
オプション -r は、usbfadmにファイル保存の再実行を指示しま...
~
また、cronを使用してバックグラウンドで定期的に実行するこ...
(crontabファイル)
# crontab file
#minute hour mday month wday command
〜 略 〜
#save session periodically
#0 */4 * * * PATH=$PATH:/usr...
これにより、usbfadmによる保存がバックグラウンドで4時間ご...
>''【メモ】''~
''⇒''usbfadmコマンドで作成したパーティションでなくとも、O...
#aname(boot_mode3)
**保存した設定やファイルを起動時に読み込む - 起動モード3...
[[設定やファイルを保存する>#k57e4ba1]] で説明した方法で保...
データを復帰させるには、ブートモード3を選択します。
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3
scanning partitions: sd0a sd0d sd0i cd0a
Device(s) found:
loadable from: sd0d
Which is FuguIta's storage device? [default: sd0d] -> sd0d
/dev/sd0d : available data;
fugu-demo
config name -> fugu-demo
Copying files from flash to ram ...
保存したデータ名を指定すると退避させていたデータを復帰し...
各種設定値もすべて復帰するため、最初に説明した起動モード...
ログイン後、さらにデータを保存することもできます。手順は ...
すでにLiveUSB上にファイルが保存されているため、変更したフ...
そして、保存デバイス名と保存名はすでに設定済みなので、い...
シャットダウン時、データの退避は自動的には行われないので...
これを自動化したい場合は [[終了時にデータが自動で保存され...
** Unix の使い方を調べる [#ta8d176b]
本ガイドの冒頭で説明したように、河豚板はUnix系OSの一種で...
Unixは約半世紀前の1969年に開発され、以降さまざまなコンピ...
Unix系OSはMicrosoft WindowsなどのOSとは操作方法が大きくこ...
Unix系OSの基本的な部分はコンシューマユーザ向けに作られて...
そんなUnix系OSを理解し、活用するにはどのようなアプローチ...
***書籍を用意しましょう [#vc93e2e8]
>Unix系OSに関する基本を解説している書籍を用意しましょう。~
様々な実装が存在するUnix系OSですが、それらには[[Unix哲学>...
書籍の内容としては特定の実装だけを対象とせず、基本的な概...
>「これ一冊読めばすべてOK」というような書籍はなかなかない...
-はじめてUNIXで仕事をする人が読む本 / 木本雅彦 他 著 / ...
-新 The Unix Super Text [上] / 山口和紀・古瀬一隆 著 /...
>以下のものは副読本として読むと、より理解が進むかもしれま...
-Unixという考え方−その設計思想と哲学 / Mike Gancarz著 芳...
-Linuxを「読む」 / こじまみつひろ著 / 毎日コミュニケー...
***とにかく自分でやってみましょう&br;オンライン・マニュア...
>やはり自分で手を動かすことが、効果的なスキル習得の基本に...
その際、やみくもにやってみるのではなく、オンラインマニュ...
>>''【メモ】''~
''⇒''Unixのマニュアルページは幾つかの章に別れています。~
同じ名前の項目が複数の章にある場合があります。例えば「sle...
$ man 1 sleep
C言語でプログラミングをしていて、sleep関数の使い方を知り...
$ man 3 sleep
として第3章にあるsleep関数の説明を表示します。
ですので、これ以降「ls(1)」のような表記が出てきますが、こ...
オンラインマニュアルとは別に、Unixのコマンドの多くは自分...
$ man
usage: man [-acfhklw] [-C file] [-I os=name] [-K encodin...
[-O option=value] [-S subsection] [-s section...
[section] name ...
$ cp -?
cp: unknown option -- ?
usage: cp [-fip] [-R [-H | -L | -P]] source target
cp [-fip] [-R [-H | -L | -P]] source ... directory
上の例ではmanコマンドとcpコマンドのヘルプメッセージを表示...
このようにコマンドのヘルプメッセージは非常に簡素な説明な...
***ネットは「参考情報」として活用しましょう [#u44b7f90]
>インターネットを活用するとUnix系OSに関連する情報も、簡単...
しかし、前項で説明したような弱点もあります。特に検索エン...
さらに、現在では多くのUnix系OSが開発コミュニティなどによ...
***この節のまとめ [#d05f1a8b]
以上述べたことを例えば「ファイルの属性」というトピックに...
-書籍で基礎事項を押さえる ~
→ファイルのオーナ・グループ・パーミッションとは何か、どの...
-オンラインマニュアル等で確認しながら実際に操作 ~
→実際にchown, chgrp, chmodコマンドなどを実行し、結果を確...
-ネットで関連情報・参考情報をゲット~
→ネットの検索などで注意点、はまりやすい点、色々な応用法な...
→公式サイトで関連情報を調べる ... 仕様の変更やセキュリテ...
河豚板は以上で述べたようなUnix系OSの習得にも向いています...
**OpenBSDの使い方を調べる [#vfe62224]
前節の [[Unix の使い方を調べる>#qd261f24]] ではUnix系OSの...
***導入 [#c6f8a51f]
rootでログインすると、OpenBSDプロジェクト開発リーダーTheo...
# mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 deraadt@do-not-re Sun Oct 18 07:58 86/4565 Wel...
& more 1
Message 1:
From deraadt@do-not-reply.openbsd.org Sun Oct 18 07:58:5...
Date: Oct 18 07:58:58 MST 2015
From: deraadt@do-not-reply.openbsd.org (Theo de Raadt)
To: root
Subject: Welcome to OpenBSD 5.8!
This message attempts to describe the most basic initial...
system administrator of an OpenBSD box might have. You ...
this message for later reference.
....(以下略)....
このメールでは、OpenBSDをインストールした人が最初に持つと...
以下このメールの内容と重複する部分もありますが、システム...
***オンラインドキュメント [#se0d8824]
[[Unixの使い方を調べる>#qd261f24]]で述べたようにマニュア...
そのことはインストール直後のroot宛てメールにおいても、以...
Again, PLEASE READ THE MANUAL PAGES. Our developers hav...
hours improving them so that they are clear and precise.
マニュアルページには、特に導入のためのエントリも幾つか用...
:help|Unix初心者向けのエントリです。コマンドラインで''hel...
:man|manコマンドの説明です。OpenBSDではmandocというプログ...
:afterboot|インストール直後にチェックを行ったほうがよい項...
:intro|マニュアルページはカテゴリごとに章に別れていますが...
man 1 intro
とすると、一般コマンドカテゴリについての説明が、
man 5 intro
では、ファイル形式のカテゴリ全般についての説明が表示され...
OpenBSDでは、マニュアルページの章立ては以下のようになって...
|1 |一般コマンド |
|2 |システムコールとエラー番号 |
|3 |ライブラリ |
|3f |Fortran言語のリファレンスガイド |
|3p |Perl言語のリファレンスガイド |
|4 |デバイスドライバ |
|5 |ファイル形式 |
|6 |ゲーム |
|7 |その他 |
|8 |システム保守・運用のためのコマンド |
|9 |カーネル内部情報 |
|X11 |X11R6と同じ |
|X11R6|X Window System |
|local|/usr/local配下にインストールされたコマンド|
|n |Tcl/Tk言語のコマンド |
各セクションのマニュアルの内容は現状のシステムに追従し続...
また他のUnix系OSでは4章(デバイスドライバ)などの章で、...
///|TO BE REVISED|
#ref(emacsinfo.png,around,right)
GNUプロジェクト由来のコマンドやEmacs上で動作するアプリケ...
Infoドキュメントを閲覧するには、infoコマンドを実行します。
>''【メモ】''~
''⇒''Emacsエディタを追加インストールしている環境では、Inf...
#clear;
マニュアルページやInfo以外にもアプリケーション固有のドキ...
それらは主に次に挙げるディレクトリの下にあります;
-/usr/share/doc
-/usr/X11R6/share/doc
-/usr/local/share/doc
-/usr/local/share/gtk-doc
***システム上のファイル [#d1f901c4]
サーバやアプリケーションソフトなどの設定ファイルはすべて/...
パッケージ管理ツールports/packagesで追加されたソフトウェ...
システムの動作ログは、/var/log以下にあります。唯一、cron...
[[河豚板を起動する>#i322b9ad]] で説明した起動時に表示され...
***インターネット上の情報 [#zc81ca57]
:http://www.openbsd.org/|プロジェクトによって運営されてい...
:http://undeadly.org/ 「OpenBSD Journal」|OpenBSD関連のニ...
:メーリングリスト|[[公式に管理・運営されているメーリング...
***書籍 [#j85fa616]
作者の知る限り、OpenBSDユーザ向けに書かれた日本語の書籍は...
BSD系のUnix向けの書籍の中には、
-BSD HACKS 〜 プロが使うテクニック&ツール100選 / Dru La...
など、部分的にOpenBSDについて言及されている書籍もあります。
英語の書籍に関しては[[公式サイトの記述>http://www.openbsd...
'''Absolute OpenBSD, 2nd Edition''' や '''The book of PF,...
*河豚板を使う【応用編】 [#vbb26034]
[[河豚板を使う【一般編】>#v7ad37bc]] では河豚板の基本的な...
この章では河豚板の特徴を活かした、さらに進んだ利用法につ...
>''【メモ】''~
''⇒''この章では以下のように、[[河豚板を使う【一般編】>#v7...
-ホスト名としてfugu-demo.localnetを想定
-インターネットにアクセスできる状態になっている
-一般ユーザyoshiが作成されている。yoshiはwheelグループに...
**アプリケーションを追加する [#ef4cc9a8]
河豚板はOpenBSDで提供されているソフトウェアに、その他日常...
更に、システム起動後にもユーザがアプリケーションを追加す...
アプリケーションを追加するにはOpenBSDのports/packagesシス...
packagesのソフトウェアを追加するには、pkg_addというコマン...
fugu-demo$ su -
Password:
fugu-demo# pkg_add firefox
quirks-4.53 signed on 2021-12-19T13:27:04Z
quirks-4.53:(ok)
firefox-95.0.1:libiconv-1.16p0:(ok)
firefox-95.0.1:gettext-runtime-0.21p1:(ok)
:
略
:
firefox-95.0.1:dconf-0.40.0:(ok)
firefox-95.0.1:gtk+3-3.24.30:(ok)
firefox-95.0.1:(ok)
Running tags:ok
The following new rcscripts were installed: /etc/rc.d/me...
See rcctl(8) for details.
New and changed readme(s):
/usr/local/share/doc/pkg-readmes/dbus
/usr/local/share/doc/pkg-readmes/firefox
/usr/local/share/doc/pkg-readmes/glib2
/usr/local/share/doc/pkg-readmes/gtk+3
fugu-demo# exit
fugu-demo$
上の例では、suコマンドを使用して一時的にrootになっていま...
pkg_addを実行すると目的のアプリケーションを実行するために...
ディレクトリ/usr/local/share/doc/pkg-readmes以下にインス...
以上の例のような方法で、アプリケーションを追加することが...
ports/packagesからどのようなソフトウェアがpkg_addできるか...
>''【メモ】'' ~
''⇒''ports/packagesシステムについてはhttp://www.openbsd.o...
''⇒''ports/packagesを利用せずソフトウェア開発元が公開して...
河豚板ではpkg_addで追加したソフトウェアもまた、usbfadmコ...
**一般ユーザが一時的にシステム管理者になれるようにする [#...
前節の [[アプリケーションを追加する>#af9dcfcb]] では、su...
doasは設定ファイルで動作を制御できる点、rootのパスワード...
doasを使うには、まず設定ファイル/etc/doas.confを編集する...
最初はdoas.confは存在していませんので以下のコマンドを実行...
# echo permit :wheel > /etc/doas.conf
# chmod 0640 /etc/doas.conf
この操作で、「permit :wheel」という内容1行だけが書かれた...
$ doas /usr/fuguita/sbin/usbfadm
Password:
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.0/amd64 (FuguIta-6.0-amd64-201612291)
Boot mode: usbflash
Data stored in: /dev/sd0d
Data Saved as: fugu-demo
Type ? for help.
/dev/sd0d : fugu-demo ->
先に説明したようにdoas.confの設定を行うと、doas実行時にパ...
パスワードを入力しないでdoasを実行することもできます。詳...
>''【メモ】'' ~
''⇒''doasはUnix系のOSで一般的に使われているsudoと置き換え...
**タイムゾーンを変更する [#hfd08245]
モード0で起動した直後の河豚板は、時間帯(time zone: タイム...
協定世界時に比べ日本標準時(Japan Standard Time: JST)は9...
$ date
Wed Dec 23 02:27:58 UTC 2015
河豚板の時間帯をJSTにするには以下のようにコマンドを投入し...
$ cd /etc
$ ls -l localtime
lrwxr-xr-x 1 root wheel 23 Dec 23 02:27 localtime -> ...
$ doas ln -s -f /usr/share/zoneinfo/Asia/Tokyo localtime
Password:
$ ls -l localtime
lrwxr-xr-x 1 root wheel 25 Dec 23 11:28 localtime -> ...
$ date
Wed Dec 23 11:28:53 JST 2015
$
>''【メモ】''~
''⇒''設定後のJSTが実時刻とずれている場合はdate(1)を使い、...
**サーバ設定の例 - 時刻を参照するNTPサーバを変更する [#z0...
NTP (Network Time Protocol)はコンピュータがネットワーク上...
OpenBSDはNTPを用いてインターネット上の時刻基準に自身の時...
OpenBSDはインストール時にNTPを使用するかどうかの設定を行...
NTPの機能はntpd(8)というプログラムによって実装されており...
>''【メモ】''~
''⇒''OpenBSDで使われているNTPのソフトウェアは「[[OpenNTPD...
LinuxやFreeBSDでは同じntpdでも、別の実装を用いています。
$ ntpctl -s status
4/4 peers valid, constraint offset 0s, clock synced, str...
上記の例のように「clock synced」と表示されていれば、ntpd...
$ ntpctl -s status
0/1 peers valid, clock unsynced
のように「clock unsynced」となっている場合は、何らかの原...
OpenBSDではインストール時にNTP機能を有効にすると、時刻基...
企業の社内LANなどではセキュリティの関係から、pool.ntp.org...
以下にNTPサーバの設定方法を示します;
ntpdはntpd.conf(5)というファイルにより動作が設定されます...
$ doas -s
Password:
# vi /etc/ntpd.conf
ntpd.conf内のこの3行を
↓
servers pool.ntp.org
sensor *
constraints from "https://www.google.com"
↓
以下の一行に変更
↓
server ntp.localnet
上の例では、「ntp.localnet」というNTPサーバを参照するよう...
設定ファイルの編集が終了したらntpdを再起動し、変更内容を...
バックグラウンドで走行しサービスを提供するntpdのようなプ...
# rcctl restart ntpd
ntpd(ok)
ntpd(ok)
#
以上で設定変更作業は完了したので、rootから一般ユーザに戻...
# exit
$ ntpctl -s status
1/1 peers valid, clock unsynced
上記のようになっていれば(まだ)同期はとれていませんが、...
$ ntpctl -s status
1/1 peers valid, clock synced, stratum 3
しばらく時間が経過すると、時刻同期が取れていることが確認...
ntpctlは更に詳しくntpdの状態を表示することもできます。ま...
詳しくは各コマンドや設定ファイルのマニュアルページを参照...
>''【メモ】'' ~
''⇒''ntpdは時刻のずれを非常にゆっくりと修正していきます。...
**OSの設定値を変更する [#b16abb7f]
前節では[[NTPサーバの設定変更方法について説明>#j453b186]]...
この節ではOpenBSDで動作しているサービスの設定について説明...
全ての設定方法について具体的な説明を行うことは現実的では...
***カーネルパラメータ [#jc369ad6]
OpenBSDカーネルの機能は色々な方法で制御できますがその一つ...
$ sysctl -a | less
kern.ostype=OpenBSD
kern.osrelease=5.8
kern.osrevision=201510
kern.version=OpenBSD 5.8-stable (RDROOT.MP) #2: Wed Nov ...
root@nimbus5.localnet:/opt/fi/5.8/sys/arch/i386/comp...
kern.maxvnodes=44152
kern.maxproc=1310
〜以下略〜
上の例では全てのカーネルパラメータを表示しています。~
表示内容が一画面に収まらないため、表示データをページャプ...
表示したいパラメータがあらかじめわかっている場合は、その...
以下の例ではファイルの入出力のバッファリングに割り当てる...
$ sysctl kern.bufcachepercent
kern.bufcachepercent=20
$
この表示から、最大でメモリ搭載量の20%までをバッファに割り...
この値を変更するには以下のようにします。設定の変更はroot...
$ doas sysctl kern.bufcachepercent=50
Password:
kern.bufcachepercent: 20 -> 50
$
sysctlコマンドの手動実行ではなく、システム起動時に自動的...
それには、設定したい内容をsysctl.conf(5)というファイルに...
>''【メモ】'' ~
''⇒''カーネルの設定を変更するにはその他にも
-configコマンドによるカーネルの書き換え
-UKC (User Kernel Config)による起動時での変更
-カーネルの再コンパイル
>などの方法がありますが、それぞれ設定できる内容や作業の難...
***ネットワークの基本設定 [#k477f8af]
これまでも説明したようにネットワーク関連の設定は河豚板の...
河豚板をサーバやネットワークのゲートウェイなどとして運用...
:インターフェース設定|IPアドレス、ネットマスクなどのネッ...
>''【メモ】'' ~
''⇒''使用しているPCにどのようなネットワークインターフェー...
:経路制御|デフォルトルートは/etc/mygateに記述します。それ...
:名前解決|/etc/resolv.conf(5)により設定を行います。
:パケットフィルタリング|PFはOpenBSDで開発されたパケット・...
***デーモンの起動・停止と設定 [#m3ae5186]
OpenBSDではデフォルトでは動作しないものも含めて、様々なデ...
[[時刻を参照するNTPサーバを変更する>#j453b186]] ではNTPデ...
OpenBSDでは、このようなデーモンの起動はrc.conf.local(8)が...
>''【メモ】'' ~
''⇒''実際にはrc.conf(8)で全てのデーモンについての指定がさ...
各種デーモンの挙動を制御するには rc.conf.local の内容を変...
ntpdがntpd.confによって設定されるように、他のデーモンもそ...
また、/etc/examples に各種デーモンの設定用サンプルファイ...
***その他の設定 [#k08546c1]
/etc/rc.localはシステム起動の最終段階で実行されるシェルス...
OpenBSDの起動時や終了時の処理についてはrc(8)を参照して下...
**起動時間を短縮する。使用メモリを少なくする - 起動モード...
河豚板の起動時にモード1を指定すると、それ以降の起動時間...
これ以降に入力する各種設定項目については、モード0と同じ...
Select boot mode;
0: fresh boot (normal)
1: fresh boot (lower memory, faster boot than mode 0)
2: fresh boot (works only on mfs)
3: retrieve user data from USB flash memory
4: retrieve user data from floppy disk
5: interactive shell for debugging
->1
起動後のメモリ使用量(mfsのサイズ)もモード0に比べ少なくな...
目安としては実装メモリ64MB程度のマシンからが動作可能とな...
ファイル使用量(モード0)
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/rd0a 1.6M 729K 833K 47% /
/dev/cd0a 697M 697M 0B 100% /sysmedia
/dev/vnd5a 676M 664M 11.9M 98% /fuguita
mfs 698M 25.5M 673M 4% /ram
ファイル使用量(モード1)
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/rd0a 1.6M 730K 832K 47% /
/dev/cd0a 697M 697M 0B 100% /sysmedia
/dev/vnd5a 676M 664M 11.9M 98% /fuguita
mfs 713M 6.8M 706M 1% /ram
ただし、起動モード1は標準の起動モードであるモード0に比...
起動モード1は河豚板に収録されているソフトウェアのみで運...
モード1で起動しusbfadmでファイル保存後、モード3で再起動...
>''【メモ】'' ~
''⇒''起動モード0と起動モード1のファイルシステムのレイア...
~
起動モード0と起動モード1とでは、ファイルシステムの構造...
#ref(FuguIta/BBS/11/fi-filesys-mode0.png,wrap,around,righ...
右の図は、起動モード0のときのファイル配置です(図をクリ...
例として、/bin/ed, /usr/bin/vi, pkg_added /usr/local/bin/...
~
ルートファイルシステムはRAM DISK, [[rd(4)>https://man.ope...
~
FuguItaデバイスの実体は、DVDやUSBメモリで、ブートローダー...
~
/sysmediaのファイルシステムイメージは/dev/vnd4にマッピン...
~
/ramは[[mfs(4)>https://man.openbsd.org/mfs.4]] (memory fi...
#clear
#ref(FuguIta/BBS/11/fi-filesys-mode1.png,wrap,around,righ...
次に起動モード1です。起動モード1では、/usrは/fuguita/us...
#clear
**河豚板を記録メディアを使用しないで動作させる - 起動モー...
起動モード2はファイルを全てmfs上に転送し、全てがオンメモ...
Select boot mode;
0: fresh boot (normal)
1: fresh boot (lower memory, faster boot than mode 0)
2: fresh boot (works only on mfs)
3: retrieve user data from USB flash memory
4: retrieve user data from floppy disk
5: interactive shell for debugging
->2
モード2ではシステムの起動が完了すると、DVDやUSBメモリは...
$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/rd0a 1.6M 730K 832K 47% /
mfs 813M 736M 76.7M 91% /ram
ただし、冒頭で説明したように、このモード2ではDVDやUSBメ...
モード2においてもusbfadmでファイル保存後、モード3で再起...
>''【メモ】'' ~
''⇒''以下の場合には、デバイスを取り外すことはできませんの...
-仮想メモリの使用量が実メモりより大きく、スワップパーティ...
-[[暗号化パーティション>#f90fbf26]]を使用している場合 (警...
-そのデバイス内のパーティションを[[追加でマウントしている...
>''【メモ】'' ~
''⇒''起動モード2のファイルシステムのレイアウトについて~
~
#ref(FuguIta/BBS/11/fi-filesys-mode2.png,wrap,around,righ...
起動モード2のファイルレイアウトは右図のとおりです。これ...
#clear
#aname(usbfadm_expand)
**USBメモリの保存領域を拡張する - usbfadm expandコマンド ...
[[河豚板のLiveUSBを作る>#sa216e5d]] で説明したように、ダ...
しかし、このLiveUSB版河豚板はUSBメモリのサイズに関係なく2...
この内、河豚板のシステムが約1GBを占有していますので、usbf...
河豚板に付属のusbfadmユティリティには、指定したパーティシ...
以下にexpandの使用例を示します。
fugu-demo# usbfadm ← root権限でusbfadmユティリティを起...
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 7.0/i386 (FuguIta-7.0-i386-202112291)
Boot mode: manual
Target device: not set
Data saved as: not set
readline capability available
TAB to complete the reserved words
Type ? for help.
? : ? ->target ← targetコマンドで拡張するパーティション...
Searching storage device
Please make sure the device inserted.
Then press ENTER ->
sd0i sd0j sd0k sd1a +sd1d vnd5a ← 検出されたパーテショ...
target device ->sd1d 付いているのがデータ...
sd1d : ? ->info ← 指定したパーティションの容量を見てみる
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 1.1G 2.5K 1.1G 0% 5 1287065 0%...
scanning...
512B 7.0/i386/noasks
sd1d : ? ->expand ← expand機能を呼出し
Select the expansion method for sd1d:
1: growfs - expands the partition while retaining its...
2: newfs - expand and format the partition
3: [exit without expansion]
->2 ← "newfs"を使ってパーティションを拡張
パーティションの拡張方法には、「growfs」と「newfs」とがあ...
growfsではパーティション内に保存されているデータを保持し...
newfsでは、領域を拡張した後、パーティションをフォーマット...
newfsでは、保存されているファイル・ディレクトリは全て消え...
This makes sd1d as large as possible.
Note that all contents in sd1d will be removed
Do you proceed? [y/N] -> y
/dev/rsd1d: 3136.5MB in 6423488 sectors of 512 bytes
257 cylinder groups of 12.24MB, 3134 blocks, 6272 inodes...
super-block backups (for fsck -b #) at:
144, 25216, 50288, 75360, 100432, 125504, 150576, 17564...
:
6368432, 6393504, 6418576,
** /dev/rsd1d
** File system is already clean
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 5611214 free (14 frags, 701400 blocks, ...
sd1d : ? ->info ← 拡張後の容量を確認
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 2.7G 2.5K 2.7G 0% 5 1611897 0%...
scanning...
512B 7.0/i386/noasks
sd1d : ? ->quit
Bye bye...
fugu-demo#
>''【メモ】'' ~
''⇒''ファイルシステムのパラメータ(フォーマット形式、ブロ...
#aname(liveusb_remaster)
**USBメモリの容量に合わせてLiveUSBを作成する - usbfadm ne...
この節ではすでに稼動中の河豚板を使い、新たに別のUSBメモリ...
この方法を用いるとデータの保存領域を任意のサイズで割り当...
まず、河豚板をモード0、またはモード1で起動します。起動...
起動が完了したら、root権限でusbfadmコマンドを実行します。
$ doas usbfadm
doas (yoshi@fugu-demo.localnet) password:
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.4/amd64 (FuguIta-6.4-amd64-201902021)
Boot mode: usbflash
Data stored in: /dev/sd1d
Data Saved as: fugu-demo
Type ? for help.
? : ? ->newdrive ← LiveUSB作成を指示
Please make sure the device inserted.
Then press ENTER -> ← USBメモリの装着を確認したら<Ent...
認識したディスクデバイスの一覧が時系列で表示さ...
↓
==== disk(s) and vnode devices =========================...
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HTS72757, JF...
sd0: 715404MB, 512 bytes/sector, 1465149168 sectors
sd1 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G...
sd1: 29624MB, 512 bytes/sector, 60669952 sectors
sd2 at scsibus5 targ 1 lun 0: <BUFFALO, USB Flash Disk, ...
sd2: 7788MB, 512 bytes/sector, 15950592 sectors
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
vnd4: not in use
vnd5: covering /sysmedia/fuguita-6.4-amd64.ffsimg on sd1...
========================================================...
Enter the name of device which FuguIta will be installed...
...
Disk: sd2 geometry: 992/255/63 [15950592 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: s...
--------------------------------------------------------...
*0: 0C 0 130 3 - 2 140 10 [ 8192: 32768 ...
1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: A6 2 140 11 - 130 138 8 [ 40960: 2...
This disk seems to have been partitioned already.
Continue anyway? [y/N] -> y
Select boot method:
1: [Legacy BIOS]
2: UEFI
3: none (only for save data)
4: Hybrid
-> ← 起動方法を指定
このようにEnterのみ入力すると[]で囲まれたデフォ...
項目(この場合はLegacy BIOS)を指定したことになる。
Enter size for saving User Data.
You can add suffix K, M, G or T (otherwise considered ...
'*' implies 'all'
'0' doesn't make this partition.
6GB (14516928sectors) free
->3g ← データ保存用領域のサイズ
「3g」で3ギガバイトを割当て
「*」と入力すると、残り全てという意味になる
Create an extra FAT partition? [y/n] -> y ← 残りの領...
target disk: sd2
partition type=MBR
boot type=Legacy
-------------------- : ------
partition : size
-------------------- : ------
whole disk : 7GB
partition tables : 32KB
UEFI system : 0B
FuguIta system : 946MB
FuguIta user data : 3GB
MSDOS FAT : 3GB
-------------------- : ------
***THIS IS THE LAST CHANCE***
If you type 'Y' now, all the data on sd2 will be lost.
Are you sure to initialize sd2? [y/N] -> y ← 指定した...
どうか...
========================================
= Clearing MBR, GPT and BSD disklabel
=
21+0 records in
21+0 records out
22020096 bytes transferred in 5.693 secs (3867757 bytes/...
========================================
= Setting up fdisk partitions
=
〜〜省略〜〜
** /dev/rsd2d
** File system is already clean
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3 files, 3 used, 3663622 free (14 frags, 457951 blocks, ...
? : ? ->quit
Bye bye...
$
以上で、指定したデバイスに河豚板のシステムが書き込まれ、...
>&color(red){''【ご注意】''&br;''!!''書き込み先のデバイ...
#ref(fuguita-usb.png,around,right);
今まで説明した内容を図にすると、右のようになります。
「Select boot method:」に対し「Legacy BIOS」あるいは「UEF...
「Enter size for saving User Data」で入力したサイズの d ...
''a''パーティションと''d''パーティションの領域を確保した...
#clear
>''【メモ】''~
''⇒''この節で説明した河豚板のインストール方法は、USBメモ...
>''【メモ】''~
''⇒''現在のPCは、起動方法として「BIOS」と「UEFI」の2種類...
UEFI起動に対応したUSBメモリを作成するには、以下のように起...
Select boot method:
1: [Legacy BIOS]
2: UEFI
3: none (only for save data)
4: Hybrid
->2
Select partition type:
1: [GPT]
2: MBR
->1
また、起動方法「Hybrid」を指定すると、BIOS、UEFIのどちら...
だたし、「Hybrid」は規格に準拠していない作成方法です。加...
#aname(autorun)
**起動時の設定入力を省略できるようにする - noasksファイル...
河豚板ではどのモードで起動するかに関わらず、起動中に手動...
-どのデバイスを使用して運用を行うか? (Which is FuguIta's...
-実装メモリのどれくらいをmfsに割り当てるか? (Enter mfs s...
-どの起動モードを使用するか? (Boot modes)
-どの保存デバイスからファイルを復帰させるか?(モード3の...
-どの保存名からファイルを復帰させるか?(モード3のみ) (...
上記の5項目については入力を自動化する機能があります。~
それには、LiveUSB版河豚板の''d''パーティションにあるnoask...
$ doas -s
doas (yoshi@fugu-demo.localnet) password:
# mount /dev/sd0d /mnt
# cd /mnt
# ls -l
total 4
drwxr-xr-x 5 root wheel 512 Oct 23 19:29 livecd-config
# cd livecd-config/7.0/amd64 ...
# ls -l
drwxr-xr-x 11 root wheel 512 Nov 10 17:08 fugu-demo
-rw-r--r-- 1 root wheel 422 Nov 9 22:19 noasks
>''【メモ】''~
''⇒''ディレクトリlivecd-configは、usbfadmによるデータ保存...
noasksには、設定値の雛形がコメントの形で書かれていますの...
# vi noasks
#
# noasks - parameter settings for non-interactive boot
#
# Make statements uncommented
# to activate settings
#
#
# FuguIta system device
noask_rdev=sd0a
#
# mfs size in MB
noask_umem=0
#
# boot mode
noask_setup_rw_mode=3
#
# storage device
noask_confdev=sd0d
#
# data set name in USB flash drive
noask_confdir=fugu-demo
>''【メモ】''~
''⇒''設定値の代入文で、「=」の前後にはスペースを入れない...
編集が終了したら''d''パーティションをアンマウントしてシス...
# cd
# umount /mnt
# /sbin/shutdown -r now
#aname(noasks-intr)
noasksファイルによる値の設定がされている場合、次のような...
============================================
= ______ __ _
= / ____/ | |_| |__
= / /____ ______ __ _| /_ _/_____
= / ___/ / / / __ \/ / / | | | | / _ |
= / / / /_/ / /_/ / /_/ /| | | |_| (_) |__
=/_/ \____/\__ /\____/ |__| \___/____/__/
= __/ /
= /___/
=
= Welcome to FuguIta! - OpenBSD Live System
= http://fuguita.org/?FuguIta
=============================================
scanning partitions: wd0i wd0j sd0a sd0d
FuguIta's operating device(s): sd0a.
Press ^C to cancel non-interactive boot
この「Press ^C to cancel non-interactive boot」が表示され...
5秒以内に''<Control>-C''を入力するとnoasksファイルによる...
>''【メモ】''~
''⇒''noasksファイルの中に未設定の項目がある場合は、自動起...
>''【メモ】''~
''⇒''設定項目のうち、noask_rdevとnoask_confdevについてはs...
DUIDは、disklabelコマンドの出力から確認できます。
# disklabel sd0
# /dev/rsd0c:
type: ESDI
disk: ESDI/IDE disk
label: QEMU HARDDISK
duid: eac6323f6d34c465 ←DUID
flags:
〜略〜
例えば、河豚板の起動デバイスをnoasksファイル中で指定する...
noask_confdev=sd0d
と書く替わりに、
noask_confdev=eac6323f6d34c465.d
というように「DUID.パーティション」というように指定するこ...
通常のデバイス名による指定は、ディスクデバイスの接続状況...
#aname(autosave)
**終了時にデータが自動で保存されるようにする [#fe82e210]
前節の [[起動時の設定入力を省略できるようにする>#b493ab9a...
OpenBSDではシステム終了時に /etc/rc.shutdown というスクリ...
河豚板では、/etc/rc.shutdown内にデータ保存の処理が記述さ...
# usbfadm_r - perform re-sync of the usbfadm utility
#
...略...
# To re-sync on shutdown. uncomment the following line.
#usbfadm_r ← この行のコメントを外す
ファイルの最終行のコメントを外し、usbfadm_r関数が実行され...
>''【メモ】''~
''⇒''この処理では保存処理が繰返し失敗した場合、シェルが立...
>&color(red){''【ご注意】''&br;''!!''運用中に重要な処理...
#aname(encrypt)
**データの保存領域を暗号化する - usbfadm newdriveコマンド...
基本編の[[設定やファイルを保存する>#k57e4ba1]]で説明した...
保存領域を暗号化する機能を使うと、USBメモリに保存した情報...
[[usbfadmコマンドでLiveUSBを作成する>#ld36d7ec]]時には、u...
以下のように指定を行うと、暗号化パーティションを作成する...
# usbfadm
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 6.7/amd64 (FuguIta-6.7-amd64-202006142)
Boot mode: manual
Data stored in: not set
Data Saved as: not set
Type ? for help.
? : ? ->newdrive
〜〜 略 〜〜
Enter sizes for swap, user data and extra FAT.
You can add suffix K, M, G or T (otherwise considered ...
'*' implies 'all'
'0' doesn't make this partition.
589MB (604128KB) (1208256sectors) free
swap->64m
525MB (538592KB) (1077184sectors) free
userrdata->*
user data encryption? [y/N] -> y ← 「y」を入力しデ...
Enter passphrase twice. They'll be not echoed.
//// CAUTION ////////////////////////////
//// If you lost this passphrase, ← パスフレーズを...
//// you'll never access sd0d. ← 取り出す方法は...
/////////////////////////////////////////
Passphrase: ← 暗号化のパスフレーズを入力します...
Passphrase: ← 確認のため、再度パスフレーズを入...
〜〜 続く 〜〜
暗号化されたパーティションにデータを保存するには以下のよ...
+usbfadmのtarget機能で暗号化されているパーティションを指...
~
+パスフレーズの入力が正しいと新たにディスクが現れるので、...
-usbfadmのsync機能でデータの保存を実行します。
? : ? ->target
Searching storage device
Please make sure the device inserted.
Then press ENTER ->
sd0a ?sd0d ← 「?」の付いてい...
パーティション...
target device->sd0d ← このパーティシ...
Passphrase: ← パスフレーズを...
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd1: 525MB, 512 bytes/sector, 1076656 sectors
softraid0: CRYPTO volume attached as sd1
sd0a ?sd0d +sd1d ← パスフレーズが...
sd1dが現れます。
target device->sd1d ← sd1dを保存先に...
以下、通常の手...
sd1d : ? ->saveas
Name of avedd ata->fugu-demo
Your data will be saved as ``fugu-demo''.
sd1d : fugu-demo ->sync
Sync current mfs as ``fugu-demo'' , OK? [y/N] -> y
copying /ram to /mnt/livecd-config/6.7/amd64/fugu-demo (...
25.0MiB 0:00:38 [9673KiB/s][[===========================...
waiting for pax to finish ... syncing ... done.
sd1d : fugu-demo ->bye
保存されたデータを以降の起動時に読み込む時も保存の場合と...
+起動モード3を指定し、暗号化されているパーティションを指...
~
+パスフレーズの入力が正しいと新たにディスクが現れるので、...
============================================
= ______ __ _
= / ____/ | |_| |__
= / /____ ______ __ _| /_ _/_____
= / ___/ / / / __ \/ / / | | | | / _ |
= / / / /_/ / /_/ / /_/ /| | | |_| (_) |__
=/_/ \____/\__ /\____/ |__| \___/____/__/
= __/ /
= /___/
=
= Welcome to FuguIta - OpenBSD Live System
= http://fuguita.org/
=============================================
scanning partitions: sd0a sd0b sd0d cd0a
FuguIta's operating device(s): sd0a cd0a.
Which is FuguIta's operating device? -> sd0a
activating swap partition: /dev/sd0b
user memory: 239 MB
Enter mfs size in MB. (0MB is auto)
[default: 0MB] ->
mfs size will be automatically allocated
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3 ← 起動モード3を...
scanning partitions: sd0a sd0b sd0d cd0a
Device(s) found:
encrypted: sd0d ← This is the encrypted volume.
Which is FuguIta's storage device? -> sd0d
Passphrase: ← パスフレーズを...
↓ パスフレーズが正しいと、新たにディスクが現れます。
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd1: 525MB, 512 bytes/sector, 1076656 sectors
softraid0: CRYPTO volume attached as sd1
Passphrase successful: Select boot mode again...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3 ← 再度起動モード...
scanning partitions: sd0a sd0b sd0d cd0a sd1d
Device(s) found:
loadable from: sd1d ← 新たに現れたデ...
encrypted: sd0d
Which is FuguIta's storage device? [default: sd1d] -> sd...
/dev/sd1d : available data;
fugu-demo
config name -> fugu-demo
Copying files from flash to ram ...
done
〜〜 続く 〜〜
このディスクは起動完了後も見えているので、データを保存す...
#aname(multidevice)
**複数の河豚板を併用する [#re6892dc]
いままではほとんどの場面で、LiveDVD版かLiveUSB版の河豚板...
河豚板はそのような場合にもうまく動作するように設計されて...
LiveDVDとLiveUSBの両方を装着して起動した場合について説明...
まず、電源を入れた直後にDVDとUSBのどちらが起動するかです...
次に、運用デバイス(ディレクトリ /fuguita にマウントされ...
scanning partitions: wd0i wd0j cd0a sd0a sd0d
FuguIta's operating device(s): cd0a sd0a.
Which is FuguIta's operating device? ->
のように使用可能なデバイスを列挙し、どれを使用するかユー...
>''【メモ】''~
''⇒''上の例ではwd0iとwd0jは内蔵ハードディスクという想定で...
保存されたデータを読み込む場合も同様に候補が複数ある場合...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3
scanning partitions: wd0i wd0j sd0a sd0d sd1a sd1d
Device(s) found:
loadable from: sd0d sd1d
Which is FuguIta's storage device? ->
usbfadmコマンドでデータを保存する場合も、[[設定やファイル...
以上のことを応用すると、以下に挙げるような運用が可能とな...
:SDカード版の河豚板で運用|[[USBメモリの容量に合わせてLive...
SDカードからの起動をサポートしているPCはほとんど存在しま...
:LiveDVD版河豚板をモード3で起動|LiveDVD版河豚板単体では...
>''【メモ】''~
''⇒''USBメモリはデータの保存時/復帰時にのみマウントされ...
この、河豚板の「起動と運用は別々のデバイスで行える」とい...
>''【メモ】''~
''⇒''なお、[[起動時の設定入力を省略できるようにする>#b493...
**OpenBSDと河豚板を共存させる [#e54e5ccf]
河豚板を実行しようとしているPCにすでにOpenBSDがインストー...
原理としては、既存のOpenBSDパーティションに河豚板のカーネ...
以下、設置と起動の方法を説明します。~
まず既存のOpenBSDを起動し、rootでログインします。
次に、ルートディレクトリ直下に「ISO」というディレクトリを...
この /ISO ディレクトリに河豚板のサイトからISOイメージをダ...
# mkdir /ISO
# cd /ISO
# ftp http://mirror.ginzado.ne.jp/pub/FuguIta/FuguIta-6....
Trying 110.92.1.251...
Requesting http://mirror.ginzado.ne.jp/pub/FuguIta/FuguI...
100% |**************************************************...
338634465 bytes received in 468.48 seconds (705.90 KB/s)
# ls -l
total 661632
-rw-r--r-- 1 root wheel 338634465 Dec 29 00:55 FuguIt...
# gunzip FuguIta-6.0-amd64-201612251.iso.gz
# ls -l
total 1427648
-rw-r--r-- 1 root wheel 730744832 Dec 29 00:55 FuguIt...
ISOイメージの中に含まれている河豚板のカーネルをルートディ...
vnconfig(8)はISOやUSBメモリのイメージファイルを記憶デバイ...
# vnconfig vnd0 FuguIta-6.0-amd64-201612251.iso
# vnconfig -l
vnd0: covering FuguIta-6.0-amd64-201612251.iso on wd0a, ...
vnd1: not in use
vnd2: not in use
vnd3: not in use
# mount -r /dev/vnd0a /mnt
# ls -l /mnt
total 1427119
-r-xr-xr-x 1 root bin 71452 Apr 4 2015 boot
-rwxr--r-- 1 root wheel 2048 Dec 27 11:59 boot.c...
-rw-r--r-- 1 root wheel 5569179 Dec 27 19:19 bsd-fi
-rw-r--r-- 1 root wheel 5577796 Dec 27 19:19 bsd-fi...
-r-xr-xr-x 1 root wheel 72328 Dec 27 19:19 cdboot
-r-xr-xr-x 1 root wheel 2048 Dec 27 19:19 cdbr
drwxr-xr-x 2 root wheel 2048 Apr 18 2014 etc
-rw-r--r-- 1 root wheel 719388672 Dec 27 19:19 fuguit...
# cp -p /mnt/bsd-fi /mnt/bsd-fi.mp /
# umount /mnt
# vnconfig -u vnd0
# vnconfig -l
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
#
以上で設置作業は完了です。
>''【メモ】''~
''⇒''データの保存と復帰を行いたい場合は livecd-config と...
次に起動方法ですが、PCが起動し、カーネルメッセージが表示...
ここで何もしないと既設のOpenBSDシステムが起動しますが、起...
boot> bsd-fi.mp
この「bsd-fi.mp」がマルチプロセッサ用の河豚板カーネルです。
シングルプロセッサ用の河豚板カーネルを起動したい場合は「b...
>''【メモ】''~
''⇒''以上の説明では ISO ディレクトリと livecd-config ディ...
**WindowsやLinuxと河豚板を共存させる [#pdb727a3]
河豚板ではWindowsのNTFSやFAT、LinuxのEXT-2, EXT-4ファイル...
この方法は [[OpenBSDと河豚板を共存させる>#d99117a6]] で説...
-運用デバイスとして用いるOSを起動させ、
-そのOS上のファイルシステム直下(WindowsならCドライブやD...
-そのフォルダ内に河豚板のISOイメージを置きます。
だたし、WindowsやLinuxのファイルシステムから河豚板を使用...
-現段階ではWindowsやLinuxのファイルシステムに置かれたOpen...
-WindowsやLinuxのファイルシステムは、データの保存・復帰も...
**スワップパーティションを有効にする [#m7f11a0c]
通常、河豚板はスワップを使用せずメインメモリだけで動作し...
Which is FuguIta's operating device? -> wd0a
activating swap partition: /dev/wd0b
activating swap partition: /dev/wd1b
この例では、/dev/wd0b と /dev/wd1b の2つのスワップパーテ...
スワップパーティションは検出と同時に有効化されます。これ...
>''【メモ】''~
''⇒''何らかの理由でスワップを使用したくない場合(例えば、...
選択後、シェルが立ち上がったらswapctl(8)コマンドを-dオプ...
シェルを抜けると再度起動モードの選択になりますので本来の...
**マウントするパーティションを追加する - /etc/fuguita/fst...
通常Unix系のOSでは、/etc/fstabというファイルでマウントす...
そのため、ユーザがマウントするパーティションを追加や変更...
ところが河豚板では、fstabファイルの内容を変更し再起動して...
河豚板では起動時の初期化中、PCに接続されている全てのディ...
最後に、その結果を受けてfstabが自動的に生成され、それを基...
そのため、ユーザがfstabを変更し保存を行っても、その内容は...
マウントするパーティションを追加したい場合は、/etc/fuguit...
例として、sd2というディスクのeパーティションを/ram/optと...
- /etc/fuguita/fstab.tail を作成します。このファイルの書...
/dev/sd2e /ram/opt ffs rw 0 1
- /ram/optディレクトリがない場合、あらかじめ作成しておき...
# mkdir /ram/opt
- usbfadmコマンドのsync機能を使い、ファイルを保存します。
- システムを最起動し起動モード3で起ち上げ、指定したパー...
/etc/fuguita/fstab.tailファイルの内容は自動生成された/etc...
>''【メモ】''~
''⇒''マウントポイントはmfs内(/ramディレクトリより下)に...
''⇒''/ramディレクトリ直下のディレクトリやファイルは、起動...
#aname(dtjsetup)
**X Window Systemに日本語デスクトップ環境を導入する - dtj...
河豚板では、dtjsetupというコマンドを実行すると、日本語の...
以下は、dtjsetupの実行例です。
# dtjsetup ← dtjsetup...
(root, 一...
#==========================================
# Welcome to dtjsetup
# Desktop (and Japanese) setup utility
#
# for FuguIta-6.6-amd64-202001171
#==========================================
Which desktop software will you install? ← デスクト...
1: no desktop (wm only)
2: [rox-filer]
3: xfce
4: mate
5: lumina
6: lxqt
-> ← [ENTER]の...
項目を選...
Which window manager will you install? ← 前項で1(...
1: cwm マネージ...
2: fvwm 選択した...
3: twm 選択しま...
4: [icewm]
5: fluxbox
6: jwm
->
Will you setup Japanese language environment? [y/N] -> y...
Which input method will you install? ← input met...
1: [scim-anthy] 選択
2: uim-gtk
3: fcitx-anthy
4: ibus-skk
->
*** You selected icewm as desktop software.
*** Installing Japanese environment is YES.
*** Japanese input method is scim-anthy.
*** Checking your root authorization...
*** OK.
*** Checking network accessibility...
*** OK.
*** Installing packages: rox-filer icewm ja-kterm ja-saz...
Will you continue? [y/N] -> y ← 続行する...
quirks-3.183 signed on 2020-01-31T18:21:51Z
rox-filer-2.11p3:libiconv-1.16p0:ok
rox-filer-2.11p3:xz-5.2.4:ok
:
icewm-1.6.1:libsndfile-1.0.28:ok
icewm-1.6.1:ok
Ambiguous: choose package for ja-kterm
a 0: <None>
1: ja-kterm-6.2.0p9
2: ja-kterm-6.2.0p9-xaw3d
Your choice: 1 ← kterm (漢...
ja-kterm-6.2.0p9:ok どちらを...
:
scim-anthy-1.2.7p11:ok
Running tags:
New and changed readme(s):
/usr/local/share/doc/pkg-readmes/glib2
/usr/local/share/doc/pkg-readmes/gtk+2
/usr/local/share/doc/pkg-readmes/scim
--- +ja-sazanami-ttf-20040629p3 -------------------
You may wish to update your font path for /usr/local/sha...
--- +mixfont-mplus-ipa-20060520p7 -------------------
You may wish to update your font path for /usr/local/sha...
--- +mplus-fonts-063 -------------------
You may wish to update your font path for /usr/local/sha...
*** /root/.xsession already exists. ← .xsession...
*** This will be replaced with a new file. ある場合...
*** and the old one will be renamed to /root/.xsession_2...
*** Rewrite .xsession configuration file. ← .xsession...
Will you continue? [y/N] -> y
Copy this .xsession file to /etc/skel ? [y/N] -> y ← ...
...
...
...
*** Japanese environment and related software have been ...
*** However, the time zone has not yet been set to JST.
Set timezone to JST? [Y/n] -> y ← ...
*** When you use this machine both running OpenBSD and W...
*** You may set the hardware clock to JST instead UTC.
Set hardware clock to JST? [Y/n] -> n ← ...
...
*** all installation and configuration completed.
*** Check your /root/.xsession and login to X if OK.
*** Note: You can save this configuration and addtionall...
*** by using usbfadm utility.
*** And can reload them at next boot time by selecting...
#ref(DeskTop.jpg,wrap,around,right,50%)
以上の設定を行った後でログアウトし、xenodmのログイン画面...
デスクトップ環境では pkg_add コマンドを使用して各種アプリ...
>''【メモ】''~
''⇒''河豚板の導入から各種アプリケーションのインストールま...
#clear
***Xのログイン画面を有効にする [#mabee881]
河豚板の起動時の設定で、[[ログイン方法の選択>#a5fdbf53]] ...
コンソール画面からのログインを選択した場合でも、X Window ...
それには [[OSの設定値を変更する>#g61850e9]] で説明したよ...
以下の例は、rcctl(8)を使用して xenodem を有効にする例です。
$ doas rcctl enable xenodm
$ doas rcctl ls on ...
check_quotas
cron
library_aslr
ntpd
pf
pflogd
slaacd
smtpd
sndiod
sshd
syslogd
xenodm
#
rcctlコマンドでxdmを有効にすると rc.conf.local に「xdm_fl...
$ cat /etc/rc.conf.local
xenodm_flags=
$
>''【メモ】''~
''⇒''テキストエディタで rc.conf.local を直接編集しても同...
OpenBSD 5.7以前はrcctlコマンドが開発されておらず、テキス...
設定変更後usbfadmで保存を行い、以降、モード3で起動すれば...
>''【メモ】''~
''⇒''xdmが表示されている状態で''<Control>''+''<Alt>''+''<...
#aname(fiupdate)
**河豚板をアップデートする - fiupdateコマンド [#lecc1f42]
OpenBSDは半年に一度、メジャーリリースが行われており、この...
そしてその半年にもセキュリティや安定性の向上などに関する...
河豚板もこの修正情報への追従を行っており、現行で公開され...
なお、河豚板で現在運用中のOSのバージョンを確認するには次...
$ uname -a ← OSの...
OpenBSD fugu-demo.localnet 5.8 RDROOT.MP#2 i386
$ sysctl kern.version ← カー...
kern.version=OpenBSD 5.8-stable (RDROOT.MP) #2: Wed Nov ...
root@nimbus5.localnet:/opt/fi/5.8/sys/arch/i386/comp...
$ cat /usr/fuguita/version ← 河豚...
5.8-201512272
この節では、現在お使いの河豚板を最新版にアップデートする...
***OpenBSDのメジャーリリースがバージョンアップした場合 [#...
これは、河豚板がベースとしているOpenBSDのメジャーリリース...
FuguIta-5.8-amd64-201504161
↓
FuguIta-5.9-amd64-201510255
ですが、これは河豚板のベースとなっているOSがOpenBSD 5.8か...
OpenBSDのメジャーリリースが変っている場合、システムのアッ...
その理由は、OpenBSDがバージョンアップすると、システムコー...
OpenBSDのメジャーリリースを跨いでの移行は、以下のような方...
+LiveDVDやLiveUSBを新規に作成する。
+新しいバージョンの河豚板を起動させ、古いバージョンの河豚...
***OpenBSDのメジャーリリースは変わっていない場合 [#o2e382...
これは、
FuguIta-6.0-amd64-201511297
↓
FuguIta-6.0-amd64-201512051
のようにOpenBSDのバージョンを表す「6.0」の部分が変ってい...
この場合はシステムの変更は部分的なものにとどまっています...
システムの移行は、以下の手順で行います。
''LiveDVDの移行手順''~
LiveDVDの場合はメディアの部分的な書き換えはできませんので...
USBメモリに保存したデータについては、そのまま起動モード3...
''LiveUSBの移行手順''~
LiveUSBの場合は、fiupdate (FuguIta update)というコマンド...
fiupdateを使うには、アップデート対象のLiveUSBをモード0、...
次に、配布サイトより新しいバージョンのISOイメージとMD5フ...
>''【メモ】''~
''⇒''LiveUSBをアップデートに使用するのはISOイメージファイ...
''⇒''MD5ファイルは、ダウンロードしたファイルの内容が壊れ...
total 606752
-rw-r--r-- 1 root wheel 310651490 Oct 7 01:12 FuguIt...
-rw-r--r-- 1 root wheel 562 Oct 8 06:25 MD5
fugu-demo# cat /usr/fuguita/version
6.7-amd64-20209041
fugu-demo# fiupdate 202010071
fiupdate - Live Updater for FuguIta LiveUSB
Version/Arch: 6.7/amd64 (FuguIta-6.7-amd64-20209041)
Checking...
environment: ok
Note: This software is currently in beta testing.
Use this at YOUR OWN RISK.
We recommend that you run this command in fresh bo...
0, 1, or 2).
Alternatively, you must quit all application softw...
all your data before updating this FuguIta device.
All daemons, including xenodm, will be stopped bef...
Please note that all X sessions will be aborted.
Do you proceed? [y/N] -> y
Checking...
checksum: (MD5) FuguIta-6.7-amd64-202010071.iso.gz: OK
file layout: liveusb
existing files: ok
decompressing FuguIta-6.7-amd64-202010071.iso.gz...
9296MiB 0:00:31 [9.51MiB/s] [===========================...
Now ready to update FuguIta-6.7-amd64-20209041 to FuguIt...
This machine will reboot immediately after update comple...
Do you proceed? [y/N] -> y
stopping all daemons...
cron(ok)
ntpd(ok)
pflogd(ok)
slaacd(ok)
smtpd(ok)
sndiod(ok)
sshd(ok)
syslogd(ok)
overwriting uniprocessor kernel...
8.66MiB 0:00:06 [1.37MiB/s] [===========================...
overwriting multiprocessor kernel...
8.69MiB 0:00:04 [1.84MiB/s] [===========================...
overwriting filesystem image...
9864MiB 0:05:30 [3.05MiB/s] [===========================...
update completed.
now rebooting...
syncing disks... done
アップデート完了後、PCは自動的に再起動します。~
LiveUSBアップデート後の運用は今までと変りなく、データの移...
>''【メモ】''~
''⇒''fiupdateをネットワーク経由、あるいはX Window System...
It seems you are running this script on X Window System,
via network or something like this.
In this situation, during update, corresponding processes
will be killed and then update may fail.
Running this on direct console device is highly recommen...
Continue anyway? [y/N] ->
fiupdateは、システムファイルを更新する前に全てのデーモン...
ですので、fiupdateはコンソールデバイス上で直接実行するよ...
**河豚板をモバイル環境で使う [#v8b338ea]
河豚板をモバイル環境の端末として使うためには、基本的な部...
しかしモバイル環境特有の事情を考慮し、設定を追加するとよ...
この節ではそのような設定項目としてノートPCの電源関連につ...
***電源関連の設定 [#g5ab7d09]
現在のPC、とりわけノートPCにはACPI (Advanced Configuratio...
OpenBSDではこれらの仕組みはacpi(4)、及びapm(4)として実装...
acpiやapmの管理は、apmd(8)というデーモンにより行います。~
apmdの状態確認と設定を行います;
$ doas -s
Password:
# rcctl get apmd
apmd_class=daemon
apmd_flags=NO ← apmdは無効(動作しない)設定になって...
apmd_timeout=30
apmd_user=root
apmdを有効にします。
# rcctl enable apmd
# rcctl set apmd flags -A ← CPU負荷に応じてCPUクロック...
# rcctl start apmd
# rcctl get apmd
apmd_class=daemon
apmd_flags=
apmd_timeout=30
apmd_user=root
#
設定が完了したら[[usbfadmコマンドを使用して保存>#k57e4ba1...
apmdが稼動している状態では、apm(8)というコマンドで状態の...
$ apm
Battery state: high, 89% remaining, 57 minutes life esti...
A/C adapter state: not connected
Performance adjustment mode: auto (1000 MHz)
以下の例では、apmコマンドに-Lフラグを与えて、CPUが常時低...
$ apm -L
$ apm
Battery state: high, 88% remaining, 42 minutes life esti...
A/C adapter state: not connected
Performance adjustment mode: manual (1000 MHz)
バッテリーなどハードウェアの状態は、sysctlコマンドやsysta...
$ sysctl hw.sensors
hw.sensors.acpitz0.temp0=55.50 degC (zone temperature)
hw.sensors.acpiac0.indicator0=Off (power supply)
hw.sensors.acpibat0.volt0=14.80 VDC (voltage)
hw.sensors.acpibat0.volt1=15.30 VDC (current voltage)
hw.sensors.acpibat0.current0=1.19 A (rate)
hw.sensors.acpibat0.amphour0=1.12 Ah (last full capacity)
hw.sensors.acpibat0.amphour1=0.21 Ah (warning capacity)
hw.sensors.acpibat0.amphour2=0.07 Ah (low capacity)
hw.sensors.acpibat0.amphour3=0.92 Ah (remaining capacity...
hw.sensors.acpibat0.amphour4=2.15 Ah (design capacity)
hw.sensors.acpibat0.raw0=1 (battery discharging), OK
hw.sensors.acpibtn0.indicator0=On (lid open)
hw.sensors.acpidock0.indicator0=Off (not docked), UNKNOWN
hw.sensors.cpu0.temp0=55.00 degC
$ systat sensors
3 users Load 0.40 0.42 0.37 W...
SENSOR VALUE STATUS DE...
acpitz0.temp0 56.50 degC zo...
acpiac0.indicator0 Off po...
acpibat0.volt0 14.80 V DC vo...
acpibat0.volt1 15.26 V DC cu...
acpibat0.current0 1.08 A rate
acpibat0.amphour0 1.12 Ah la...
acpibat0.amphour1 0.21 Ah wa...
acpibat0.amphour2 0.07 Ah lo...
acpibat0.amphour3 0.90 Ah OK re...
acpibat0.amphour4 2.15 Ah de...
acpibat0.raw0 1 raw OK ba...
acpibtn0.indicator0 On li...
acpidock0.indicator0 Off unknown no...
cpu0.temp0 56.00 degC
systatコマンドはデフォルトでは5秒おきに状態を更新し、表...
apmコマンドはまた、PCを休止状態にすることができます。~
休止状態にするにはapmコマンドの他、zzz(8)やZZZ(8)などのコ...
休止からの復帰方法は機種により異なりますが、電源ボタンを...
>&color(red){''【ご注意】''&br;''!!''スタンバイ、スリー...
Xを使用している時は、xsetコマンドでディスプレイを制御でき...
xset s on ← スクリーンセーバーを有効にする
xset s 180 ← スクリーンセーバーの動作開始時間(秒)
xset +dpms ← ディスプレイを省電力モードに移行
この例の設定をおこなうと、マウスやキーボードの操作が180秒...
#aname(netconf)
***複数のネットワーク設定を切り換えて使用する - gennetcon...
ネットワークの設定は[[ネットワークの基本設定>#pd55b21e]]...
また、ネットワークの設定は複数持つことができ、chnetconfと...
河豚板では、ネットワーク関連の設定ファイルは/etc/fuguita/...
初期ブートで行った設定は、/etc/fuguita/netconfs/defaultの...
例として、自宅用に「home」、職場用に「office」という2つ...
まず、officeから。これは、イーサネットに接続し、固定アド...
fugu-demo# gennetconfs office
===================================================
= gennetconfs: generate network configuration files
===================================================
Hostname with domain part (FQDN):
only host name without domain part is also OK.
-> fuguita.office.local
IP protocol version(s) to be enabled: 4, 6, 46, 64 or "n...
4: enable only IPv4
6: enable only IPv6
46: give priority to IPv4 name resolution
64: give priority to IPv6 name resolution
none: operate as standalone
[64] -> 4
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57765
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> bge0
IPv4 - address and routing:
Enter "auto" or "IPv4_address[/mask] [default_gateway]"
"auto" is an automatic setting by DHCP.
The "/mask" part can be specified in either format, su...
If there is no default gateway, set the second field t...
[auto] -> 192.168.20.115/24 192.168.20.254
DNS servers: up to 3 IP addresses, separated by spaces
-> 192.168.20.254
writing configured values to:
/etc/fuguita/netconfs/office/myname
/etc/fuguita/netconfs/office/mygate
/etc/fuguita/netconfs/office/hosts
/etc/fuguita/netconfs/office/hostname.bge0
/etc/fuguita/netconfs/office/resolv.conf
======================================================
= end of gennetconfs:
= Use chnetconf utility to activate this configuration
======================================================
gennetconfsによる設定が完了すると、「/etc/fuguita/netconf...
fugu-demo# cd /etc/fuguita/netconfs/
fugu-demo# ls -l
total 24
drwxr-xr-x 2 root wheel 144 Nov 25 05:46 default
drwxr-xr-x 2 root wheel 240 Nov 25 07:00 office
drwxr-xr-x 2 root wheel 96 Nov 18 05:49 templ.head
drwxr-xr-x 2 root wheel 0 Nov 18 05:49 templ.tail
fugu-demo# ls -l office
total 40
-rw-r----- 1 root wheel 23 Nov 25 07:00 hostname.bge0
-rw-r--r-- 1 root wheel 36 Nov 25 07:00 hosts
-rw-r--r-- 1 root wheel 15 Nov 25 07:00 mygate
-rw-r--r-- 1 root wheel 21 Nov 25 07:00 myname
-rw-r--r-- 1 root wheel 56 Nov 25 07:00 resolv.conf
fugu-demo# ls -l /etc/ | grep netconfs
lrwxr-xr-x 1 root wheel 28 Nov 25 06:56 myname -> /e...
drwxr-xr-x 6 root wheel 192 Nov 25 06:59 netconfs
これらの設定を実際に反映させるには、chnetconfユティリティ...
chnetconfを実行すると、指定された設定ファイルを、/etcにコ...
>''【メモ】'' ~
''⇒''設定ファイルのうち、mynameファイルだけはコピーではな...
fugu-demo# chnetconf -l ← 現在の設定を表示
*default ← この設定が有効
office
fugu-demo# chnetconf office
fuguita# chnetconf -l
default
*office ← この設定に変更された
fuguita# ifconfig ← インターフェース設定を確認
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>...
lladdr 10:9a:dd:6c:11:0c
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect (100baseTX full-duplex,rxpau...
status: active
inet 192.168.20.115 netmask 0xffffff00 broadcast 192.16...
urtwn0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:22:cf:46:6d:e6
index 4 priority 4 llprio 3
groups: wlan
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: no network
ieee80211: nwid ""
# ping www.google.com ← 疎通を確認
PING www.google.com (172.217.175.68): 56 data bytes
64 bytes from 172.217.175.68: icmp_seq=0 ttl=115 time=28...
64 bytes from 172.217.175.68: icmp_seq=1 ttl=115 time=25...
64 bytes from 172.217.175.68: icmp_seq=2 ttl=115 time=26...
^C
--- www.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet l...
round-trip min/avg/max/std-dev = 25.842/26.765/28.318/1....
引続き、同様に設定「home」を作成してみます。こちらはWi-Fi...
fuguita# gennetconfs home
===================================================
= gennetconfs: generate network configuration files
===================================================
Hostname with domain part (FQDN):
only host name without domain part is also OK.
-> fuguita.home.local
IP protocol version(s) to be enabled: 4, 6, 46, 64 or "n...
4: enable only IPv4
6: enable only IPv6
46: give priority to IPv4 name resolution
64: give priority to IPv6 name resolution
none: operate as standalone
[64] ->
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57765
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> urtwn0
Wi-Fi settings:
SSID -> my-wifinet
WPA Key -> my-wpa-secret-key
IPv6 - address and routing:
Enter "auto" or "IPv6_address[/prefixlen] [default_gat...
"auto" is an automatic setting by SLAAC.
The "/prefixlen" part can be an integer between 0 and ...
If there is no default gateway, set the second field t...
[auto] ->
IPv4 - address and routing:
Enter "auto" or "IPv4_address[/mask] [default_gateway]"
"auto" is an automatic setting by DHCP.
The "/mask" part can be specified in either format, su...
If there is no default gateway, set the second field t...
[auto] ->
writing configured values to:
/etc/fuguita/netconfs/home/myname
/etc/fuguita/netconfs/home/hostname.urtwn0
/etc/fuguita/netconfs/home/resolv.conf
======================================================
= end of gennetconfs:
= Use chnetconf utility to activate this configuration
======================================================
fuguita# chnetconf -l
default
home
*office
fuguita# chnetconf home
fuguita# chnetconf -l
default
*home
office
fuguita# ifconfig
bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr 10:9a:dd:6c:11:0c
index 1 priority 0 llprio 3
media: Ethernet autoselect (100baseTX full-duplex,rxpau...
status: active
urtwn0: flags=a48843<UP,BROADCAST,RUNNING,SIMPLEX,MULTIC...
lladdr 00:22:cf:46:6d:e6
index 4 priority 4 llprio 3
groups: wlan egress
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: active
ieee80211: nwid my-wpa-secret-key chan 10 bssid 1c:b1:7...
wpaakms psk wpaciphers ccmp wpagroupcipher ccmp
inet6 fe80::222:cfff:fe46:6de6%urtwn0 prefixlen 64 scop...
inet 192.168.10.113 netmask 0xffffff00 broadcast 192.16...
inet6 2409:........:8d47 prefixlen 64 autoconf pltime 6...
inet6 2409:........:1974 prefixlen 64 autoconf temporar...
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33136
index 5 priority 0 llprio 3
groups: pflog
これで、従来のdefaultを含め、3つのネットワーク設定が作成...
これらの設定はchnetconfユティリティを使用して、いつでも切...
***ファームウェアのダウンロードが必要なWi-Fiデバイスを使...
この項ではgennetconfs、chnetconfコマンドの応用としてWi-Fi...
OpenBSDでは様々なWi-Fiデバイスがサポートされていますが、...
>''【メモ】''~
''⇒''ファームウェアのダウンロードが必要な事情については、...
OpenBSD FAQ - Wireless Networking ~
https://www.openbsd.org/faq/faq6.html#Wireless ~
~
In order to use some wireless cards, you will need to acq...
(訳) 一部のワイヤレスカードを使用するには、fw_update(1)で...
このようなWi-Fiデバイスは、
-まずファームウェア不要のデバイスで設定を行い、インターネ...
-ファームウェアをダウンロードし、インストール
-ネットワークの設定を目的のWi-Fiデバイス用に変更
という手順で使用することができます。具体的な手順は以下の...
''1. ファームウェア不要のデバイスで設定を行い、インターネ...
起動時に、以下のようにファームウェア不要のデバイスを用い...
ほとんどの有線LAN(イーサネット)デバイスや、あるいは一部の...
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57766
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> bge0
''2. ファームウェアをダウンロードし、インストール''~
rootでログインし、fw_updateコマンドを実行。ファームウェア...
fugu-demo# fw_update -v
Path to firmware: http://firmware.openbsd.org/firmware/7...
Installing: inteldrm-firmware intel-firmware urtwn-firmw...
inteldrm-firmware-20201218:100%|OK
intel-firmware-20210608v0:100%|OK
urtwn-firmware-20180103p0:100%|OK
fugu-demo#
>''【メモ】'' ~
''⇒''fw_updateは、起動時に自動的に実行されていますが、念...
''3. 接続設定を使いたいWi-Fiデバイスに変更''~
ファームウェアがインストールされたら、接続設定をWi-Fiデバ...
fugu-demo# gennetconfs wifi ← 設定ファイルを生成
===================================================
= gennetconfs: generate network configuration files
===================================================
〜略〜
Network Interfaces: Choose one
NIC type Name
-------- ----- ------------
bge0 ether Broadcom BCM57766
urtwn0 wifi GW-USValue-EZ GW-USValue-EZ
[bge0] -> urtwn0 ← Wi-Fiデバイスを選択
Wi-Fi settings:
SSID -> my-wifinet ← Wi-FiのSSIDと
WPA Key -> my-wpa-secret-key ← パスワードを入力
〜略〜
======================================================
= end of gennetconfs:
= Use chnetconf utility to activate this configuration
======================================================
fugu-demo# chnetconf wifi ← ネットワークを今行った...
fugu-demo# ping www.google.com ← 接続を確認
PING www.google.com (216.58.220.100): 56 data bytes
64 bytes from 216.58.220.100: icmp_seq=0 ttl=114 time=33...
64 bytes from 216.58.220.100: icmp_seq=1 ttl=114 time=28...
64 bytes from 216.58.220.100: icmp_seq=2 ttl=114 time=26...
64 bytes from 216.58.220.100: icmp_seq=3 ttl=114 time=21...
^C
--- www.google.com ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet l...
round-trip min/avg/max/std-dev = 21.949/27.683/33.656/4....
以上でWi-Fiのファームウェアのインストール完了です。
最後に変更した内容を[[usbfadmコマンドを使用して保存>#k57e...
# usbfadm -r
========================================
= Sync current mfs as fugu-demo into /dev/sd1d
=
:
:
*河豚板を使う【開発編】 [#p36adf1a]
この章では河豚板の内部を理解したり、河豚板をベースに自分...
**河豚板の技術情報を調べる [#v1708a18]
河豚板はOpenBSDをベースにしているので、その構成物のほとん...
公式のOpenBSDとは異なる河豚板特有の部分については、このサ...
(過去の資料の中には、現状の河豚板と異っている部分もあり...
**河豚板をアプリケーションの専用マシンにする [#la740979]
河豚板は書込み可能なファイルをすべてメモリ上に持っている...
また稼動中にusbfadmによるファイルの保存を行わない限りは、...
このような特徴を利用して、河豚板をベースにして特定のアプ...
このようなシステムを構築するためには、今までに説明してき...
-まず運用環境を整える。~
起動モード0で立ち上げて、各種設定やアプリケーションのイ...
-[[構築した環境をusbfadmにてUSBメモリなどに保存する>#k57e...
-[[モード3で起動し、保存した環境で立ち上がるようにnoasks...
-ログイン操作なしでアプリケーションが立ち上がるように tty...
これらの詳細な手順は、このサイトにある [[EBUG勉強会/20140...
#aname(livedvd_remaster)
**動作中の河豚板から河豚板のISOイメージを作る [#uc7ff81e]
[[USBメモリの容量に合わせてLiveUSBを作成する>#ld36d7ec]]...
>''【メモ】''~
''⇒''この作業は大きなサイズのファイルを扱うので、mfsのサ...
mfsでは足りない場合、他の記録デバイスをマウントしてそちら...
このmaster_dvd.shは、動作中のFuguIta LiveDVD、あるいはFug...
以下にremaster_dvd.shの使用例を示します。
まず、作業用ディレクトリを作成し、sysmedia以下にあるLiveD...
# mkdir work
# cd work
# cp -av /sysmedia .
/sysmedia -> ./sysmedia
/sysmedia/boot -> ./sysmedia/boot
/sysmedia/bsd-fi -> ./sysmedia/bsd-fi
/sysmedia/bsd-fi.mp -> ./sysmedia/bsd-fi.mp
/sysmedia/boot.catalog -> ./sysmedia/boot.catalog
/sysmedia/cdboot -> ./sysmedia/cdboot
/sysmedia/cdbr -> ./sysmedia/cdbr
/sysmedia/etc -> ./sysmedia/etc
/sysmedia/etc/boot.conf -> ./sysmedia/etc/boot.conf
/sysmedia/etc/random.seed -> ./sysmedia/etc/random.seed
/sysmedia/fuguita-6.9-amd64.ffsimg -> ./sysmedia/fuguita...
# ls -l
total 8
drwxr-xr-x 3 root wheel 432 May 11 09:21 sysmedia
コピーされたsysmediaディレクトリ内でremaster_dvd.shを実行...
基本的にはこれだけです。
# cd sysmedia
# ls -l
total 2008728
-rw-r--r-- 1 root wheel 90496 May 10 20:57 boot
-rwxr--r-- 1 root wheel 2048 May 9 12:31 boot.catalog
-rw-r--r-- 1 root wheel 10273019 May 10 21:04 bsd-fi
-rw-r--r-- 1 root wheel 10302063 May 10 21:04 bsd-f...
-rw-r--r-- 1 root bin 91668 May 10 01:31 cdboot
-rw-r--r-- 1 root bin 2048 May 10 01:31 cdbr
drwxr-xr-x 2 root wheel 96 Apr 17 2014 etc
-rw-r--r-- 1 root wheel 1007681536 May 10 21:08 fugui...
# remaster_dvd.sh
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
Size of boot image is 4 sectors -> No-emulation CD boot ...
Total translation table size: 0
Total rockridge attributes bytes: 1111
Total directory bytes: 2048
Path table size(bytes): 22
502200 extents written (980 Mb)
remaster_dvd.shの実行が完了すると、作業用ディレクトリにIS...
# ls -l ..
total 2008808
-rw-r--r-- 1 root wheel 1028505600 May 14 02:34 FuguI...
drwxr-xr-x 3 root wheel 384 May 14 02:34 sysmedia
# ls -l
total 2008720
-rw-r--r-- 1 root wheel 90496 May 10 20:57 boot
-rwxr--r-- 1 root wheel 2048 May 14 02:34 boot.catalog
-rw-r--r-- 1 root wheel 10273019 May 10 21:04 bsd-fi
-rw-r--r-- 1 root wheel 10302063 May 10 21:04 bsd-f...
-rw-r--r-- 1 root bin 91668 May 10 01:31 cdboot
-rw-r--r-- 1 root bin 2048 May 10 01:31 cdbr
drwxr-xr-x 2 root wheel 96 Apr 17 2014 etc
-rw-r--r-- 1 root wheel 1007681536 May 10 21:08 fugui...
sysmedia中にfuguita-6.9-amd64.ffsimgというファイルがあり...
このファイルツリー内のファイルを修正することで、LiveDVDを...
# vnconfig vnd0 fuguita-6.9-amd64.ffsimg
# mount /dev/vnd0a /mnt
# ls -l /mnt
total 52
-rw-r--r-- 1 root wheel 578 May 7 17:43 .cshrc
-rw-r--r-- 1 root wheel 468 May 7 17:43 .profile
drwxr-xr-x 2 root wheel 512 May 7 17:43 altroot
drwxr-xr-x 2 root wheel 1024 May 7 17:46 bin
drwxr-xr-x 2 root wheel 512 May 8 04:16 dev
drwxr-xr-x 23 root wheel 1536 May 8 04:35 etc
drwxr-xr-x 2 root wheel 512 May 7 17:43 home
drwxr-xr-x 2 root wheel 512 May 7 17:43 mnt
drwx------ 3 root wheel 512 May 8 04:35 root
drwxr-xr-x 2 root wheel 1536 May 7 17:46 sbin
lrwxrwx--- 1 root wheel 11 May 7 17:43 sys -> usr...
drwxrwxrwt 2 root wheel 512 May 8 04:19 tmp
drwxr-xr-x 14 root wheel 512 May 8 04:09 usr
drwxr-xr-x 23 root wheel 512 May 7 17:43 var
.... (カスタマイズ作業) ...
カスタマイズが完了したら、ファイルシステムイメージを閉じ...
# umount /mnt
# vnconfig -u vnd0
# remaster_dvd.sh
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
:
:
#aname(build_fuguita)
**河豚板の開発ツールを使う - LiveDVDの作成 [#l691fd75]
河豚板は不定期ではありますが、ライブシステム構築のために...
この構築ツールを使用することで河豚板のISOイメージファイル...
この節ではLiveDVDの構築方法を説明します。
>''【メモ】''~
''⇒''この構築法は、河豚板7.1以降が対象です。
***作業の前に [#o52a2103]
-必要なもの
--作業用OS (OpenBSDまたは河豚板)
--OpenBSDカーネルのソースツリー
--rsync, rlwrap, pvのパッケージファイル
--河豚板の構築ツール
-作業条件
--前項の「必要なもの」で挙げたものはすべてOpenBSDの同じバ...
--全ての操作はroot権限で行います。
***作業手順 [#kfcd328f]
以降、作成手順について例を示しながら解説します。~
対象バージョンとしてOpenBSD 7.1、プラットフォームはamd64...
また、構築ツールを置くディレクトリを FIBLD と表記していま...
-OpenBSDカーネルのソースコードを取得・展開
# tar -xzp -C /usr/src -f sys.tar.gz
>''【メモ】''~
''⇒''カーネルのソースツリーを最新の状態にアップデートする...
-構築作業用ディレクトリFIBLDに河豚板の構築ツールを展開
# mkdir -p FIBLD
# cd FIBLD
# ftp https://FUGUITA-MIRROR-SITE/tools/tools-7.1-amd64....
# tar -xzp -C FIBLD -f tools-7.1.tar.gz
# mv tools-7.1-amd64
# rmdir tools-7.1-amd64
以下の作業は、全て作業用ディレクトリFIBLDで行います。
-河豚板用のOpenBSDカーネルを生成
# cd FIBLD
# make kernconfig
# make kernclean
# make kern
-OpenBSDのインストールセットを準備 ~
構築ツールのinstall_setsディレクトリにOpenBSDのインストー...
# ( cd install_sets
for f in base comp game man xbase xfont xserv xshare...
ftp $(cat /etc/installurl)/7.1/amd64/${f}71.tgz
done )
-河豚板に追加するパッケージをセットアップ ~
構築ツールのinstall_pkgsディレクトリにOpenBSDのpackagesか...
# PKG_CACHE=FIBLD/install_pkgs pkg_add -n rsync rlwrap pv
# pkg_add install_pkgs/rsync*.tgz install_pkgs/pv*.tgz
-河豚板のファイルツリーを生成し、FuguIta 用に修正
# make stage
FuguItaをカスタマイズする場合は、make stage実行後、FIBLD/...
-このファイルツリーの内容に、河豚板に内蔵させるイメージフ...
# make sync
-ISOイメージファイルの生成 ~
ルートファイルシステムのイメージとカーネルを統合し、ブー...
# make iso
-ISOファイルイメージをリリース文字列付きのファイル名でGZI...
# make gz
以上でFIBLD内にFuguIta-7.1-amd64-yyyymmddn.iso.gzが作成さ...
///***Makefile ターゲット一覧 [#hc3a48d2]
///河豚板のISOイメージ構築で用いられるmakeコマンドの引数(...
///これらは全てディレクトリFI_BUILD_PATH/tools-6.7-amd64...
///|make ターゲット|動作|h
///|open-rdroot |rdroot.img内のファイルシステムをrdroot...
///|open-media |media.img内のファイルシステムをmediaに...
///|open-fuguita |media/fuguita-*-*.ffsimg内のファイルシ...
///|close-rdroot |rdrootのマウントを解除します|
///|close-media |mediaのマウントを解除します&br;(予めma...
///|close-fuguita |fuguitaのマウントを解除します|
///|close-all |構築環境の全てのマウントを解除します|
///|boot |rdrootをカーネルに組込み、ISOコンテン...
///|hyb |ISOコンテンツをISOイメージファイルに変...
///|cdgz |ISOイメージファイルを圧縮します|
//>''【メモ】''~
//''⇒''nabekenさんという方が河豚板を基にして[[myFuguita>h...
**河豚板のディスクイメージを作る [#pb1213e7]
この節では、LiveUSBのディスクイメージファイルを作成する方...
usbfadm の newdrive を実行します;
? : ? ->newdrive
Please make sure the device inserted.
Then press ENTER ->
==== disk(s) and vnode devices =========================...
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HTS72757, JF...
sd0: 715404MB, 512 bytes/sector, 1465149168 sectors
sd1 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G...
sd1: 29624MB, 512 bytes/sector, 60669952 sectors
sd2 at scsibus5 targ 1 lun 0: <BUFFALO, USB Flash Disk, ...
sd2: 7788MB, 512 bytes/sector, 15950592 sectors
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
vnd4: not in use
vnd5: covering /sysmedia/fuguita-6.4-amd64.ffsimg on sd1...
========================================================...
Enter the name of device which FuguIta will be installed...
Enter size of a vnode device file.
You can add suffix K, M, G or T (otherwise considered 'b...
->2g ...
...
2048+0 records in
2048+0 records out
2147483648 bytes transferred in 3.076 secs (698129518 by...
Disk: vnd0 geometry: 41943/1/100 [4194304 Sectors]
Offset: 0 Signature: 0x0
Starting Ending LBA Info:
#: id C H S - C H S [ start: s...
--------------------------------------------------------...
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
Select partition type:
1: [MBR]
2: GPT
3: Hybrid (not recommended if you wish modify partiti...
->
〜 略 〜
** Phase 5 - Check Cyl groups
3 files, 3 used, 386996 free (20 frags, 48372 blocks, 0....
? : ? ->bye
Bye bye...
$
以上の操作でカレントディレクトリ上にディスクイメージファ...
*終わりに [#i1946bfd]
河豚板についての説明は以上です。
このガイドでは河豚板の導入から応用・開発までを紹介しまし...
河豚板は「ITにおけるアーミーナイフ」を目指しています。...
このガイドはそんな河豚板に関する取扱説明書のようなものと...
>''【メモ】''~
''⇒''作者は若い頃貧乏学生だったので、ハンダゴテとスイスア...
そして、アーミーナイフの性能が高品質なステンレス鋼の製造...
長年にわたりOpenBSDの改良を進めてこられたTheo de Raadt氏...
さらに、河豚板に同梱させて頂いている種々のフリーソフトウ...
これらなしには10年以上もの間、開発を続けることは到底不...
今後とも、河豚板をどうぞよろしくお願い致します。
2015年12月30日 ~
川俣 吉広
----
作成 2015年12月30日 ~
改訂 2017年1月15日、2018年8月1日、2018年8月8日、2019年1月...
Page: