FuguItaGuide/4-Development
をテンプレートにして作成
Start:
#navi(FuguItaGuide)
This chapter provides information for understanding the i...
#contents
* FuguIta technical information [#s90159e2]
FuguIta is based on OpenBSD, so most of its components ar...
For the specific parts of FuguIta that are different from...
(Please note that some past materials may differ from the...
FuguIta source code can be found at https://github.com/yk...
* Make FuguIta a dedicated machine [#pbeaebe1]
FuguIta has all writable files in memory, so even if the ...
Unless you save files with usbfadm during operation, the ...
Using these characteristics, you can create a dedicated m...
To build such a system, we use a combination of the techn...
- First prepare the operational environment. ~
Start up with startup mode 0, perform various settings, i...
-[[Usbfadm saves the built environment to a USB memory et...
-[[Set the noasks file to start in mode 3 and start up in...
- Edit the [[/etc/ttys>man:ttys.5]] file to launch the ap...
These detailed procedures can be found on this site [[Cre...
#aname(livedvd_remaster)
///*LiveDVDのリマスタリング [#q529c858]
///[[USBメモリの容量に合わせてLiveUSBを作成する>fge3:live...
///>''【メモ】''~
///''⇒''この作業は大きなサイズのファイルを扱うので、mfsの...
///mfsでは足りない場合、他の記録デバイスをマウントしてそ...
///
///このmaster_dvd.shは、動作中のFuguIta LiveDVD、あるいは...
///以下にremaster_dvdの使用例を示します。
///
///まず、作業用ディレクトリを作成し、sysmedia以下にあるLi...
*LiveDVD remastering [#p3436b45]
[[Creating a LiveUSB according to the capacity of the USB...
>''[Memo]''~
''⇒''Since this operation deals with large size files, th...
If mfs isn't enough, mount another recording device and w...
This master_dvd.sh can be used with either a working Fugu...
Below is an example of using remaster_dvd.
First, create a working directory and copy the contents o...
fugu-demo# mkdir work
fugu-demo# cd work
fugu-demo# 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...
fugu-demo# ls -l
total 8
drwxr-xr-x 3 root wheel 432 May 11 09:21 sysmedia
Run remaster_dvd inside the copied sysmedia directory.
Basically that's all.
fugu-demo# cd sysmedia
fugu-demo# 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...
fugu-demo# remaster_dvd
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)
After executing remaster_dvd, an ISO image file will be c...
fugu-demo# 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
fugu-demo# 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というファイルがあ...
///このファイルツリー内のファイルを修正することで、LiveDV...
There is a file called fuguita-6.9-amd64.ffsimg in sysmed...
You can customize your LiveDVD by modifying the files in ...
fugu-demo# vnconfig vnd0 fuguita-6.9-amd64.ffsimg
fugu-demo# mount /dev/vnd0a /mnt
fugu-demo# 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
.... (Customization work) ...
Once customization is complete, close the filesystem imag...
fugu-demo# umount /mnt
fugu-demo# vnconfig -u vnd0
fugu-demo# remaster_dvd
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
:
:
* LiveUSB disk image remastering [#x2f9919d]
This section introduces how to create a LiveUSB disk imag...
Run 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
img: create FuguIta raw disk image on current directory
========================================================...
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...
$
A disk image file is created in the current directory by ...
#aname(build_fuguita)
//*河豚板の構築 [#t980ad46]
*Building FuguIta [#v4a134e4]
//河豚板は不定期ではありますが、ライブシステム構築のため...
//この構築ツールを使用することで河豚板の配布物と同じもの...
The FuguIta build tool is irregularly published.
By using this build tool, you can create the same thing a...
//この節では、構築ツールを用いたFuguItaの構築手順について...
This section explains the steps to build FuguIta using th...
//**構築環境 [#q0e90e43]
**Build environment [#xf96ef38]
//以下の説明では、次のような環境を想定しています。
The following explanation assumes the following environme...
//-作業環境: OpenBSD 7.6 (最小ストレージ容量: 40GB)
-Working environment: OpenBSD 7.6 (minimum storage capaci...
//-プラットフォーム: amd64 (推奨メモリ: 2GB以上)
-Platform: amd64 (recommended memory: 2GB or more)
//-インターネットへの接続が可能
-Availability for connection to the Internet
//-作業はすべてrootユーザで実施
-All operations are performed as root user
//>''【メモ】''~
//''⇒''この構築ツールでは、i386とamd64プラットフォームで...
//**OpenBSDのセットアップ [#t249f63d]
**OpenBSD setup [#x2828b7c]
//構築を行う前に、以下のような準備作業を行います。
Before starting build, perform the following preparations:
//-構築用PCに[[OpenBSD 7.6をインストール>https://www.open...
-[[Install OpenBSD 7.6>https://www.openbsd.org/faq/faq4.h...
//-このOpenBSD上で、オンラインマニュアル[[release(8)>man:...
-On this PC, build the entire OpenBSD according to the on...
//>''【メモ】''~
//''⇒''[[release(8)>man:release.8]]で説明されているように...
//このファイルシステムは、OpenBSDのインストール時に指定す...
>''[Memo]''~
''⇒''As explained in[[release(8)>man:release.8]], you wil...
Please specify this file system when installing OpenBSD. ...
//-[[ports(7)>man:ports.7]]システムについても、/usr/ports...
-For [[ports(7)>man:ports.7]] system, obtain and extract ...
//**FuguItaビルドツールのセットアップ [#qcaf55ec]
**FuguIta build tool setup [#i2fa906f]
//-FuguItaの構築には、OpenBSD本体の他に、rsyncコマンドとp...
-In addition to OpenBSD itself, the rsync and pv commands...
# pkg_add rsync pv
quirks-7.50:updatedb-0p0:(ok)
quirks-7.50:(ok)
Ambiguous: choose package for rsync
a 0: <None>
1: rsync-3.3.0p2
2: rsync-3.3.0p2-minimal
Your choice: 2
rsync-3.3.0p2-minimal:(ok)
pv-1.8.5:libiconv-1.17:(ok)
pv-1.8.5:gettext-runtime-0.22.5:(ok)
pv-1.8.5:(ok)
The following new rcscripts were installed: /etc/rc.d/rs...
See rcctl(8) for details.
//[[FuguIta配布サイト>FuguIta/Download]]のtoolsディレクト...
Download the build tool fuguita-buildtools-7.6.tar.gz fro...
# tar xvzpf fuguita-buildtools-7.6.tar.gz
//以下のコマンドを実行し、構築ツールの初期化を行います。
Execute the following command to initialize the construct...
# cd fuguita-buildtools-7.6
# make init
//これにより、構築に必要なディレクトリなどが作成されます。
This will create the directories needed for the build, etc.
//OpenBSDの構築で生成したインストールセット (*76.tgz) をF...
Copy the install set (*76.tgz) generated by building Open...
# cp RELDIR/*76.tgz install_sets
//''RELDIR''は、[[release(8)>man:release.8]]の中で説明さ...
//>''【メモ】''~
//''⇒''インストールセット*76.tgzはOpenBSDのオフィシャルミ...
//ただしこの場合、作成されるFuguItaはそのリリースが公開さ...
//また、この方法でFuguItaを作成する場合でも、/usr/srcや/u...
''RELDIR'' is the directory where generated release sets ...
>''[Memo]''~
'⇒'' Installation set *76.tgz can also be downloaded and ...
However, in this case, the FuguIta created will be based ...
Also, even if you create FuguIta using this method, you n...
//次に、FuguItaのユティリティから呼び出されるrsync, rlwra...
Next, build the rsync, rlwrap, and pv commands that will ...
//次に、FuguItaのユティリティから呼び出されるrsync, rlwra...
//このビルドには、以下の2つの方法があります:
//-A: ソースコードから独自にビルドし、/usr/fuguita 以下に...
//-B: portsシステムからビルドし、/usr/local 以下にインス...
//配布版のFuguItaでは、Aの方法を採用しています。
//以下にA、Bそれぞれのビルド手順を説明します。
//***A: コマンドを独自ビルド [#m81f29fc]
//まず、ソースコードの取得を行います(xxHashは高速なハッシ...
First, get the source code (xxHash is a high-speed hash c...
//>まず、ソースコードの取得を行います(xxHashは高速なハッ...
# cd /usr/ports/net/rsync && make fetch
# cd /usr/ports/sysutils/xxhash && make fetch
# cd /usr/ports/misc/rlwrap && make fetch
# cd /usr/ports/sysutils/pv && make fetch
//取得したソースコードは/usr/ports/distfiles下に配置され...
//このソースコードをビルド用の作業ディレクトリにリンク(又...
The obtained source code will be placed under /usr/ports/...
Link (or copy) this source code to the working directory ...
# pkg_add gmake (xxHashの構築に必要です)
# cd (FuguItaビルドツールの置き場所)/fuguita-buildtools-...
# ln -s fiopt.mk Makefile
# ln -s /usr/ports/distfiles/rsync-*.tar.gz .
# ln -s /usr/ports/distfiles/xxHash-*.tar.gz .
# ln -s /usr/ports/distfiles/rlwrap-*.tar.gz .
# ln -s /usr/ports/distfiles/pv-*.tar.gz .
# make RSYNC=rsync-3.3.0 XXHASH=xxHash-0.8.2 RLWRAP=rlwr...
//makeに与える引数には、実際に取得した各ソースコードのバ...
//ビルドが正常に完了すると、親ディレクトリにfiopt76.tar.g...
Please specify the version of each source code you have a...
obtained as an argument to make. ~
If the build completes successfully, fiopt76.tar.gz will ...
# cd ..
# ls -l
total 1736
drwxr-xr-x 2 root wheel 512 Nov 15 02:58 CVS
drwxr-xr-x 7 root wheel 512 Dec 12 23:53 build
-rw-r--r-- 1 root wheel 867970 Dec 12 23:53 fiopt76.tgz
//これをinstall_setsディレクトリにリンク(又はコピー)しま...
Link (or copy) this to the install_sets directory.
# cd ../install_sets
# ln -s ../fiopt/fiopt76.tgz .
# cd ..
//***B: portsを使用してコマンドをビルド [#jcd3682d]
//>この方法では、portsツリーから作成したrsync, rlwrap, pv...
// # cd install_pkgs
// # ln -s /usr/ports/packages/amd64/all/lz4-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/xz-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/zstd-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/libiconv-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/rsync-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/rlwrap-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/gettext-runtime-...
// # ln -s /usr/ports/packages/amd64/all/pv-*.tgz .
// # cd ..
//>>''【メモ】''~
//''⇒''これらのパッケージファイルも、OpenBSDのオフィシャ...
//この場合も、FuguItaのリリースが公開された時点でのものに...
//FuguItaの構築に必要となるファイルやコマンドを準備したら...
After preparing the files and commands required to build ...
# make setup
//>''【メモ】''~
//''⇒''install_setsの下にsite76.tgzというファイルを置いて...
//install.siteがsite76.tgzに含まれている場合、その内容が/...
//site76.tgzを加えてFuguItaを構築した結果、sysmedia/fugui...
>''[Memo]''~
''⇒'' You can customize FuguIta by placing a file called ...
If install.site is included in site76.tgz, its contents w...
As a result of building FuguIta by adding
site76.tgz, if the file sysmedia/fuguita-7.6-amd64.ffsimg...
//**FuguItaの構築 [#a9ad6923]
//最後に、FuguItaを構築します。~
//LiveDVDとLiveUSBの両方を構築するには、以下のようにしま...
**Building FuguIta [#a9ad6923]
Finally, build FuguIta. ~
To build both LiveDVD and LiveUSB, do the following:
# make all
//また、
Only LiveDVD is built with
# make livedvd
and this will only build LiveUSB.
//でLiveDVDのみが構築され、
# make liveusb
//ではLiveUSBのみが構築されます。
//**構築後の調整 [#wfda33a7]
**Post-build adjustments [#l88edffa]
//***mode0symlinks.cpio.gzの作成 [#hba46272]
***Create mode0symlinks.cpio.gz [#j552ff1e]
//このファイルは、LiveDVDをモード0で起動した場合の時間短...
This file is intended to save time when starting LiveDVD ...
//mode0symlinks.cpio.gzを作成するには、完成したLiveDVDを...
To create mode0symlinks.cpio.gz, boot the completed LiveD...
//このファイルをmode0symlinks.cpio.gz.amd64というファイル...
Place this file in the build tool's lib directory with th...
# cp mode0symlinks.cpio.gz lib/mode0symlinks.cpio.gz.amd64
# make clean
# make all
//***fuguita_sys_mbの調整 [#tfa3add4]
//FuguItaには、/etc/fuguita/global.confというファイルがあ...
***Fuguita_sys_mb adjustment [#tfa3add4]
FuguIta has a file called /etc/fuguita/global.conf, which...
fuguita_sys_mb=1122 # size of sysmedia.img
newdrive_defswap=16M # default swap size at usbfadm newd...
memfstype=mfs # 'mfs' or 'tmpfs'
mfs_max_mb=30720 # mfs hard limit - 30GB
//このうち、fuguita_sys_mbはFuguItaのシステムを格納するパ...
Among these, fuguita_sys_mb defines the size of the parti...
//fuguita_sys_mbの設定値は、LiveDVD構築時に生成されるlive...
The setting value of fuguita_sys_mb corresponds to the si...
# echo $(( $(wc -c < livecd.iso)/1024/1024+10 ))
//このコマンドで表示された値をlib/global.conf.amd64ファイ...
Write the values displayed by this command to the lib/g...
# vi lib/global.conf.amd64
# make clean
# make all
//**Makefileのターゲット [#y240b797]
//Makefile中の主なターゲットについて説明します。
**Makefile targets [#y240b797]
This section describes the main targets in the Makefile.
//:init|初期セットアップ: 構築に必要なディレクトリの作成...
:init|Initial setup: Create directories required for cons...
//:setup|構築環境の最終セットアップ: 構築の材料となるファ...
:setup|Final setup of the construction environment: Creat...
//:livedvd|LiveDVDのリリースファイル(FuguIta-*-*-*.iso.gz...
:livedvd|Generate LiveDVD release file (FuguIta-*-*-*.iso...
//:liveusb|LiveUSBのリリースファイル(FuguIta-*-*-*.usb.gz...
:liveusb|Generate LiveUSB release file (FuguIta-*-*-*.usb...
//:all|LiveDVDとLiveUSBの両方のリリースファイルを生成します
:all|Generates both LiveDVD and LiveUSB release files
//:kernclean|カーネルのオブジェクトファイルを削除します
:kernclean|Delete kernel object files
//:kernreset|カーネルのオブジェクトファイルの一部を削除し...
:kernreset|Remove some of the kernel's object files. Used...
//:kern|カーネルをコンパイルします
:kern|compile kernel
//:clean|リリースファイルやその中間生成物を削除します
:clean|Delete release files and their intermediate products
//:distclean|リリースファイル、中間生成物、構築材料を全て...
:distclean|Remove all release files, intermediate product...
//:dvd2usb|sysmedia-7.6-amd76.img.gzがない状態でLiveUSBを...
//このターゲットを使用するにはOpenBSDの仮想化システム [[v...
//make livedvdでLiveDVDのリリースファイルを作成後、このタ...
//LiveDVDのVMをシャットダウンすると、引き続き今作成したLi...
//LiveUSBのVMをシャットダウンすると、このLiveUSBのリリー...
//このLiveUSBのリリースファイルは[[sysmedia-7.6-amd76.img...
:dvd2usb|Used to generate LiveUSB without sysmedia-7.6-am...
To use this target, the OpenBSD virtualization system [[v...
After creating a LiveDVD release file with make livedvd, ...
When you shut down the LiveDVD VM, the LiveUSB VM you jus...
This LiveUSB release file is generated when you shut down...
This file is available as [[sysmedia-7.6-amd64.img.gz>EBU...
#navi(FuguItaGuide)
End:
#navi(FuguItaGuide)
This chapter provides information for understanding the i...
#contents
* FuguIta technical information [#s90159e2]
FuguIta is based on OpenBSD, so most of its components ar...
For the specific parts of FuguIta that are different from...
(Please note that some past materials may differ from the...
FuguIta source code can be found at https://github.com/yk...
* Make FuguIta a dedicated machine [#pbeaebe1]
FuguIta has all writable files in memory, so even if the ...
Unless you save files with usbfadm during operation, the ...
Using these characteristics, you can create a dedicated m...
To build such a system, we use a combination of the techn...
- First prepare the operational environment. ~
Start up with startup mode 0, perform various settings, i...
-[[Usbfadm saves the built environment to a USB memory et...
-[[Set the noasks file to start in mode 3 and start up in...
- Edit the [[/etc/ttys>man:ttys.5]] file to launch the ap...
These detailed procedures can be found on this site [[Cre...
#aname(livedvd_remaster)
///*LiveDVDのリマスタリング [#q529c858]
///[[USBメモリの容量に合わせてLiveUSBを作成する>fge3:live...
///>''【メモ】''~
///''⇒''この作業は大きなサイズのファイルを扱うので、mfsの...
///mfsでは足りない場合、他の記録デバイスをマウントしてそ...
///
///このmaster_dvd.shは、動作中のFuguIta LiveDVD、あるいは...
///以下にremaster_dvdの使用例を示します。
///
///まず、作業用ディレクトリを作成し、sysmedia以下にあるLi...
*LiveDVD remastering [#p3436b45]
[[Creating a LiveUSB according to the capacity of the USB...
>''[Memo]''~
''⇒''Since this operation deals with large size files, th...
If mfs isn't enough, mount another recording device and w...
This master_dvd.sh can be used with either a working Fugu...
Below is an example of using remaster_dvd.
First, create a working directory and copy the contents o...
fugu-demo# mkdir work
fugu-demo# cd work
fugu-demo# 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...
fugu-demo# ls -l
total 8
drwxr-xr-x 3 root wheel 432 May 11 09:21 sysmedia
Run remaster_dvd inside the copied sysmedia directory.
Basically that's all.
fugu-demo# cd sysmedia
fugu-demo# 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...
fugu-demo# remaster_dvd
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)
After executing remaster_dvd, an ISO image file will be c...
fugu-demo# 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
fugu-demo# 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というファイルがあ...
///このファイルツリー内のファイルを修正することで、LiveDV...
There is a file called fuguita-6.9-amd64.ffsimg in sysmed...
You can customize your LiveDVD by modifying the files in ...
fugu-demo# vnconfig vnd0 fuguita-6.9-amd64.ffsimg
fugu-demo# mount /dev/vnd0a /mnt
fugu-demo# 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
.... (Customization work) ...
Once customization is complete, close the filesystem imag...
fugu-demo# umount /mnt
fugu-demo# vnconfig -u vnd0
fugu-demo# remaster_dvd
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
:
:
* LiveUSB disk image remastering [#x2f9919d]
This section introduces how to create a LiveUSB disk imag...
Run 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
img: create FuguIta raw disk image on current directory
========================================================...
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...
$
A disk image file is created in the current directory by ...
#aname(build_fuguita)
//*河豚板の構築 [#t980ad46]
*Building FuguIta [#v4a134e4]
//河豚板は不定期ではありますが、ライブシステム構築のため...
//この構築ツールを使用することで河豚板の配布物と同じもの...
The FuguIta build tool is irregularly published.
By using this build tool, you can create the same thing a...
//この節では、構築ツールを用いたFuguItaの構築手順について...
This section explains the steps to build FuguIta using th...
//**構築環境 [#q0e90e43]
**Build environment [#xf96ef38]
//以下の説明では、次のような環境を想定しています。
The following explanation assumes the following environme...
//-作業環境: OpenBSD 7.6 (最小ストレージ容量: 40GB)
-Working environment: OpenBSD 7.6 (minimum storage capaci...
//-プラットフォーム: amd64 (推奨メモリ: 2GB以上)
-Platform: amd64 (recommended memory: 2GB or more)
//-インターネットへの接続が可能
-Availability for connection to the Internet
//-作業はすべてrootユーザで実施
-All operations are performed as root user
//>''【メモ】''~
//''⇒''この構築ツールでは、i386とamd64プラットフォームで...
//**OpenBSDのセットアップ [#t249f63d]
**OpenBSD setup [#x2828b7c]
//構築を行う前に、以下のような準備作業を行います。
Before starting build, perform the following preparations:
//-構築用PCに[[OpenBSD 7.6をインストール>https://www.open...
-[[Install OpenBSD 7.6>https://www.openbsd.org/faq/faq4.h...
//-このOpenBSD上で、オンラインマニュアル[[release(8)>man:...
-On this PC, build the entire OpenBSD according to the on...
//>''【メモ】''~
//''⇒''[[release(8)>man:release.8]]で説明されているように...
//このファイルシステムは、OpenBSDのインストール時に指定す...
>''[Memo]''~
''⇒''As explained in[[release(8)>man:release.8]], you wil...
Please specify this file system when installing OpenBSD. ...
//-[[ports(7)>man:ports.7]]システムについても、/usr/ports...
-For [[ports(7)>man:ports.7]] system, obtain and extract ...
//**FuguItaビルドツールのセットアップ [#qcaf55ec]
**FuguIta build tool setup [#i2fa906f]
//-FuguItaの構築には、OpenBSD本体の他に、rsyncコマンドとp...
-In addition to OpenBSD itself, the rsync and pv commands...
# pkg_add rsync pv
quirks-7.50:updatedb-0p0:(ok)
quirks-7.50:(ok)
Ambiguous: choose package for rsync
a 0: <None>
1: rsync-3.3.0p2
2: rsync-3.3.0p2-minimal
Your choice: 2
rsync-3.3.0p2-minimal:(ok)
pv-1.8.5:libiconv-1.17:(ok)
pv-1.8.5:gettext-runtime-0.22.5:(ok)
pv-1.8.5:(ok)
The following new rcscripts were installed: /etc/rc.d/rs...
See rcctl(8) for details.
//[[FuguIta配布サイト>FuguIta/Download]]のtoolsディレクト...
Download the build tool fuguita-buildtools-7.6.tar.gz fro...
# tar xvzpf fuguita-buildtools-7.6.tar.gz
//以下のコマンドを実行し、構築ツールの初期化を行います。
Execute the following command to initialize the construct...
# cd fuguita-buildtools-7.6
# make init
//これにより、構築に必要なディレクトリなどが作成されます。
This will create the directories needed for the build, etc.
//OpenBSDの構築で生成したインストールセット (*76.tgz) をF...
Copy the install set (*76.tgz) generated by building Open...
# cp RELDIR/*76.tgz install_sets
//''RELDIR''は、[[release(8)>man:release.8]]の中で説明さ...
//>''【メモ】''~
//''⇒''インストールセット*76.tgzはOpenBSDのオフィシャルミ...
//ただしこの場合、作成されるFuguItaはそのリリースが公開さ...
//また、この方法でFuguItaを作成する場合でも、/usr/srcや/u...
''RELDIR'' is the directory where generated release sets ...
>''[Memo]''~
'⇒'' Installation set *76.tgz can also be downloaded and ...
However, in this case, the FuguIta created will be based ...
Also, even if you create FuguIta using this method, you n...
//次に、FuguItaのユティリティから呼び出されるrsync, rlwra...
Next, build the rsync, rlwrap, and pv commands that will ...
//次に、FuguItaのユティリティから呼び出されるrsync, rlwra...
//このビルドには、以下の2つの方法があります:
//-A: ソースコードから独自にビルドし、/usr/fuguita 以下に...
//-B: portsシステムからビルドし、/usr/local 以下にインス...
//配布版のFuguItaでは、Aの方法を採用しています。
//以下にA、Bそれぞれのビルド手順を説明します。
//***A: コマンドを独自ビルド [#m81f29fc]
//まず、ソースコードの取得を行います(xxHashは高速なハッシ...
First, get the source code (xxHash is a high-speed hash c...
//>まず、ソースコードの取得を行います(xxHashは高速なハッ...
# cd /usr/ports/net/rsync && make fetch
# cd /usr/ports/sysutils/xxhash && make fetch
# cd /usr/ports/misc/rlwrap && make fetch
# cd /usr/ports/sysutils/pv && make fetch
//取得したソースコードは/usr/ports/distfiles下に配置され...
//このソースコードをビルド用の作業ディレクトリにリンク(又...
The obtained source code will be placed under /usr/ports/...
Link (or copy) this source code to the working directory ...
# pkg_add gmake (xxHashの構築に必要です)
# cd (FuguItaビルドツールの置き場所)/fuguita-buildtools-...
# ln -s fiopt.mk Makefile
# ln -s /usr/ports/distfiles/rsync-*.tar.gz .
# ln -s /usr/ports/distfiles/xxHash-*.tar.gz .
# ln -s /usr/ports/distfiles/rlwrap-*.tar.gz .
# ln -s /usr/ports/distfiles/pv-*.tar.gz .
# make RSYNC=rsync-3.3.0 XXHASH=xxHash-0.8.2 RLWRAP=rlwr...
//makeに与える引数には、実際に取得した各ソースコードのバ...
//ビルドが正常に完了すると、親ディレクトリにfiopt76.tar.g...
Please specify the version of each source code you have a...
obtained as an argument to make. ~
If the build completes successfully, fiopt76.tar.gz will ...
# cd ..
# ls -l
total 1736
drwxr-xr-x 2 root wheel 512 Nov 15 02:58 CVS
drwxr-xr-x 7 root wheel 512 Dec 12 23:53 build
-rw-r--r-- 1 root wheel 867970 Dec 12 23:53 fiopt76.tgz
//これをinstall_setsディレクトリにリンク(又はコピー)しま...
Link (or copy) this to the install_sets directory.
# cd ../install_sets
# ln -s ../fiopt/fiopt76.tgz .
# cd ..
//***B: portsを使用してコマンドをビルド [#jcd3682d]
//>この方法では、portsツリーから作成したrsync, rlwrap, pv...
// # cd install_pkgs
// # ln -s /usr/ports/packages/amd64/all/lz4-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/xz-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/zstd-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/libiconv-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/rsync-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/rlwrap-*.tgz .
// # ln -s /usr/ports/packages/amd64/all/gettext-runtime-...
// # ln -s /usr/ports/packages/amd64/all/pv-*.tgz .
// # cd ..
//>>''【メモ】''~
//''⇒''これらのパッケージファイルも、OpenBSDのオフィシャ...
//この場合も、FuguItaのリリースが公開された時点でのものに...
//FuguItaの構築に必要となるファイルやコマンドを準備したら...
After preparing the files and commands required to build ...
# make setup
//>''【メモ】''~
//''⇒''install_setsの下にsite76.tgzというファイルを置いて...
//install.siteがsite76.tgzに含まれている場合、その内容が/...
//site76.tgzを加えてFuguItaを構築した結果、sysmedia/fugui...
>''[Memo]''~
''⇒'' You can customize FuguIta by placing a file called ...
If install.site is included in site76.tgz, its contents w...
As a result of building FuguIta by adding
site76.tgz, if the file sysmedia/fuguita-7.6-amd64.ffsimg...
//**FuguItaの構築 [#a9ad6923]
//最後に、FuguItaを構築します。~
//LiveDVDとLiveUSBの両方を構築するには、以下のようにしま...
**Building FuguIta [#a9ad6923]
Finally, build FuguIta. ~
To build both LiveDVD and LiveUSB, do the following:
# make all
//また、
Only LiveDVD is built with
# make livedvd
and this will only build LiveUSB.
//でLiveDVDのみが構築され、
# make liveusb
//ではLiveUSBのみが構築されます。
//**構築後の調整 [#wfda33a7]
**Post-build adjustments [#l88edffa]
//***mode0symlinks.cpio.gzの作成 [#hba46272]
***Create mode0symlinks.cpio.gz [#j552ff1e]
//このファイルは、LiveDVDをモード0で起動した場合の時間短...
This file is intended to save time when starting LiveDVD ...
//mode0symlinks.cpio.gzを作成するには、完成したLiveDVDを...
To create mode0symlinks.cpio.gz, boot the completed LiveD...
//このファイルをmode0symlinks.cpio.gz.amd64というファイル...
Place this file in the build tool's lib directory with th...
# cp mode0symlinks.cpio.gz lib/mode0symlinks.cpio.gz.amd64
# make clean
# make all
//***fuguita_sys_mbの調整 [#tfa3add4]
//FuguItaには、/etc/fuguita/global.confというファイルがあ...
***Fuguita_sys_mb adjustment [#tfa3add4]
FuguIta has a file called /etc/fuguita/global.conf, which...
fuguita_sys_mb=1122 # size of sysmedia.img
newdrive_defswap=16M # default swap size at usbfadm newd...
memfstype=mfs # 'mfs' or 'tmpfs'
mfs_max_mb=30720 # mfs hard limit - 30GB
//このうち、fuguita_sys_mbはFuguItaのシステムを格納するパ...
Among these, fuguita_sys_mb defines the size of the parti...
//fuguita_sys_mbの設定値は、LiveDVD構築時に生成されるlive...
The setting value of fuguita_sys_mb corresponds to the si...
# echo $(( $(wc -c < livecd.iso)/1024/1024+10 ))
//このコマンドで表示された値をlib/global.conf.amd64ファイ...
Write the values displayed by this command to the lib/g...
# vi lib/global.conf.amd64
# make clean
# make all
//**Makefileのターゲット [#y240b797]
//Makefile中の主なターゲットについて説明します。
**Makefile targets [#y240b797]
This section describes the main targets in the Makefile.
//:init|初期セットアップ: 構築に必要なディレクトリの作成...
:init|Initial setup: Create directories required for cons...
//:setup|構築環境の最終セットアップ: 構築の材料となるファ...
:setup|Final setup of the construction environment: Creat...
//:livedvd|LiveDVDのリリースファイル(FuguIta-*-*-*.iso.gz...
:livedvd|Generate LiveDVD release file (FuguIta-*-*-*.iso...
//:liveusb|LiveUSBのリリースファイル(FuguIta-*-*-*.usb.gz...
:liveusb|Generate LiveUSB release file (FuguIta-*-*-*.usb...
//:all|LiveDVDとLiveUSBの両方のリリースファイルを生成します
:all|Generates both LiveDVD and LiveUSB release files
//:kernclean|カーネルのオブジェクトファイルを削除します
:kernclean|Delete kernel object files
//:kernreset|カーネルのオブジェクトファイルの一部を削除し...
:kernreset|Remove some of the kernel's object files. Used...
//:kern|カーネルをコンパイルします
:kern|compile kernel
//:clean|リリースファイルやその中間生成物を削除します
:clean|Delete release files and their intermediate products
//:distclean|リリースファイル、中間生成物、構築材料を全て...
:distclean|Remove all release files, intermediate product...
//:dvd2usb|sysmedia-7.6-amd76.img.gzがない状態でLiveUSBを...
//このターゲットを使用するにはOpenBSDの仮想化システム [[v...
//make livedvdでLiveDVDのリリースファイルを作成後、このタ...
//LiveDVDのVMをシャットダウンすると、引き続き今作成したLi...
//LiveUSBのVMをシャットダウンすると、このLiveUSBのリリー...
//このLiveUSBのリリースファイルは[[sysmedia-7.6-amd76.img...
:dvd2usb|Used to generate LiveUSB without sysmedia-7.6-am...
To use this target, the OpenBSD virtualization system [[v...
After creating a LiveDVD release file with make livedvd, ...
When you shut down the LiveDVD VM, the LiveUSB VM you jus...
This LiveUSB release file is generated when you shut down...
This file is available as [[sysmedia-7.6-amd64.img.gz>EBU...
#navi(FuguItaGuide)
Page: