- The added line is THIS COLOR.
- The deleted line is THIS COLOR.
#author("2023-02-22T23:42:58+09:00","default:kaw","kaw")
#author("2023-02-23T10:58:24+09:00","default:kaw","kaw")
#navi(FuguItaGuide)
This chapter provides information for understanding the internals of FuguIta and for doing your own development based on FuguIta.
#contents
///*FuguItaã®æŠ€è¡“æƒ…å ±
///FuguItaã¯OpenBSDをベースã«ã—ã¦ã„ã‚‹ã®ã§ã€ãã®æ§‹æˆç‰©ã®ã»ã¨ã‚“ã©ã¯OpenBSD関連ã®æƒ…å ±ãŒãã®ã¾ã¾åˆ©ç”¨ã§ãã¾ã™ã€‚~
///
///å…¬å¼ã®OpenBSDã¨ã¯ç•°ãªã‚‹FuguIta特有ã®éƒ¨åˆ†ã«ã¤ã„ã¦ã¯ã€ã“ã®ã‚µã‚¤ãƒˆã®æ—¥æœ¬å¾Œãƒˆãƒƒãƒ—ページã«[[公開資料ã®ä¸€è¦§>FuguIta#ebug_doc]]ãŒã‚ã‚Šã¾ã™ã®ã§ã€ãã¡ã‚‰ã‚’ã”å‚照下ã•ã„。~
///(éŽåŽ»ã®è³‡æ–™ã®ä¸ã«ã¯ã€ç¾çŠ¶ã®FuguItaã¨ç•°ã£ã¦ã„る部分もã‚ã‚Šã¾ã™ã®ã§ã€ã”注æ„下ã•ã„)
///
///FuguItaã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯ https://github.com/ykaw/FuguIta ã«ã¦å‚ç…§ã§ãã¾ã™ã€‚
///
///*FuguItaを専用マシンã«ã™ã‚‹ [#u1400b56]
///FuguItaã¯æ›¸è¾¼ã¿å¯èƒ½ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚’ã™ã¹ã¦ãƒ¡ãƒ¢ãƒªä¸Šã«æŒã£ã¦ã„ã‚‹ãŸã‚ã€ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³æ“作ç‰ã‚’è¡Œã‚ãšã„ããªã‚Šé›»æºã‚’æ–ã«ã—ãŸã‚Šã—ã¦ã‚‚ファイルシステムã«ä¸å…·åˆãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“。~
///ã¾ãŸç¨¼å‹•ä¸ã«usbfadmã«ã‚ˆã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã®ä¿å˜ã‚’è¡Œã‚ãªã„é™ã‚Šã¯ã€æ¯Žå›žåŒã˜çŠ¶æ…‹ã§ã‚·ã‚¹ãƒ†ãƒ ãŒç«‹ä¸Šã‚Šã¾ã™ã€‚
///
///ã“ã®ã‚ˆã†ãªç‰¹å¾´ã‚’利用ã—ã¦ã€FuguItaをベースã«ã—ã¦ç‰¹å®šã®ã‚¢ãƒ—リケーションを実行ã™ã‚‹ãŸã‚ã®å°‚用ã®ãƒžã‚·ãƒ³ï¼ˆã‚¿ãƒ¼ãƒ³ã‚ーシステム: Turn Key System)ãªã©ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
///
///ã“ã®ã‚ˆã†ãªã‚·ã‚¹ãƒ†ãƒ を構築ã™ã‚‹ãŸã‚ã«ã¯ã€ä»Šã¾ã§ã«èª¬æ˜Žã—ã¦ããŸãƒ†ã‚¯ãƒ‹ãƒƒã‚¯ã‚’組åˆã›ã¦ä½¿ã„ã¾ã™ï¼›
///
///-ã¾ãšé‹ç”¨ç’°å¢ƒã‚’æ•´ãˆã‚‹ã€‚~
///起動モードï¼ã§ç«‹ã¡ä¸Šã’ã¦ã€å„種è¨å®šã‚„アプリケーションã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ç‰ã‚’è¡Œã„ã€ç›®çš„ã®å‹•ä½œã‚’ã™ã‚‹ã‚ˆã†ã«ç’°å¢ƒæ§‹ç¯‰ã‚’ã™ã‚‹ã€‚
///
///-[[構築ã—ãŸç’°å¢ƒã‚’usbfadmã«ã¦USBメモリãªã©ã«ä¿å˜ã™ã‚‹>fg2:usbfadm_sync]]。
///
///-[[モード3ã§èµ·å‹•ã—ã€ä¿å˜ã—ãŸç’°å¢ƒã§ç«‹ã¡ä¸ŠãŒã‚‹ã‚ˆã†ã«noasksファイルをè¨å®šã™ã‚‹>fg3:autorun]]。
///
///-ãƒã‚°ã‚¤ãƒ³æ“作ãªã—ã§ã‚¢ãƒ—リケーションãŒç«‹ã¡ä¸ŠãŒã‚‹ã‚ˆã†ã« [[/etc/ttys>man:ttys.5]] ファイルを編集ã™ã‚‹ã€‚
///
///ã“れらã®è©³ç´°ãªæ‰‹é †ã¯ã€ã“ã®ã‚µã‚¤ãƒˆã«ã‚ã‚‹ [[FuguItaã§ãƒ«ãƒ¼ã‚¿ã‚’作る ~ アプライアンスã®è£½ä½œä¾‹>EBUG勉強会/20221126_NSHonFuguIta]] ã‚„ [[実用ã§ä½¿ã†FuguIta>EBUG勉強会/20140507_実用ã§ä½¿ã†FuguIta]] ã¨ã„ã£ãŸè³‡æ–™ã§èª¬æ˜Žã—ã¦ãŠã‚Šã¾ã™ã®ã§ã”å‚照下ã•ã„。
* Fuguita technical information [#s90159e2]
FuguIta is based on OpenBSD, so most of its components are openBSD-related information. ~
For the specific parts of FuguIta that are different from the official OpenBSD, please refer to [[List of published documents>FuguIta#ebug_doc]] on the Japan Post top page of this site. ~
(Please note that some past materials may differ from the current FuguIta.)
FuguIta source code can be found at https://github.com/ykaw/FuguIta.
* Make FuguIta a dedicated machine [#pbeaebe1]
FuguIta has all writable files in memory, so even if the power is suddenly turned off without performing a shutdown operation, etc., there will be no problem with the file system. ~
Unless you save files with usbfadm during operation, the system will start up in the same state each time.
Using these characteristics, you can create a dedicated machine (Turn Key System) to run a specific application based on FuguIta.
To build such a system, we use a combination of the techniques described so far;
- First prepare the operational environment. ~
Start up with startup mode 0, perform various settings, install applications, etc., and build the environment to perform the desired operation.
-[[Usbfadm saves the built environment to a USB memory etc.>fg2:usbfadm_sync]].
-[[Set the noasks file to start in mode 3 and start up in the saved environment>fg3:autorun]].
-[[Usbfadm saves the built environment to a USB memory etc.>fge2:usbfadm_sync]].
-[[Set the noasks file to start in mode 3 and start up in the saved environment>fge3:autorun]].
- Edit the [[/etc/ttys>man:ttys.5]] file to launch the application without login.
These detailed procedures can be found on this site [[Creating a router with Fuguita - Example of making an appliance>EBUG勉強会/20221126_NSHonFuguIta]] and [[Practically used FuguIta>EBUG勉強会/20140507_実用ã§ä½¿ã†æ²³è±šæ¿]] to use.
#aname(build_fuguita)
///*FuguItaã®ãƒ“ルド [#u95a4ec1]
///FuguItaã¯ä¸å®šæœŸã§ã¯ã‚ã‚Šã¾ã™ãŒã€ãƒ©ã‚¤ãƒ–システム構築ã®ãŸã‚ã«ä½¿ç”¨ã—ã¦ã„るツールを公開ã—ã¦ã„ã¾ã™ã€‚
///ã“ã®æ§‹ç¯‰ãƒ„ールを使用ã™ã‚‹ã“ã¨ã§FuguItaã®ISOイメージファイルを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
///ã“ã®ç¯€ã§ã¯LiveDVDã®æ§‹ç¯‰æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚
///>''ã€ãƒ¡ãƒ¢ã€‘''~
///''⇒''ã“ã®æ§‹ç¯‰æ³•ã¯ã€FuguIta7.1以é™ãŒå¯¾è±¡ã§ã™ã€‚
* Build Fuguita [#la4c0e2a]
FuguIta publishes the tools it uses to build the live system, albeit irregularly.
By using this build tool, you can create a FuguIta ISO image file.
This section describes how to build a LiveDVD.
>''[Memo]''~
''⇒''This construction method is for FuguIta 7.1 or later.
** Before work [#cc1a916c]
-Things necessary
--Working OS (OpenBSD or FuguIta)
-- OpenBSD kernel source tree
--rsync, rlwrap, pv package files
-- Building tools for Fuguita
-Process conditions
-- All the items listed in the "Requirements" section above must be for the same version of OpenBSD and for the same platform.
-- All operations are performed with root privileges.
** Work procedure [#add8da64]
From now on, the creation procedure will be explained with an example. ~
Assuming OpenBSD 7.1 as the target version and amd64 as the platform.
In addition, the directory where the build tools are placed is written as FIBLD. Replace this part with the actual directory name.
-Obtain and expand OpenBSD kernel source code
fugu-demo# tar -xzp -C /usr/src -f sys.tar.gz
>''[Memo]''~
''⇒''To update the kernel source tree to the latest state, please refer to "1. Update sources" in the online manual release(8).
-Expand FuguIta's building tools in the building work directory FIBLD
fugu-demo# mkdir -p FIBLD
fugu-demo# cd FIBLD
fugu-demo# ftp https://FUGUITA-MIRROR-SITE/tools/tools-7.1-amd64.tar.gz
fugu-demo# tar -xzp -C FIBLD -f tools-7.1.tar.gz
fugu-demo# mv tools-7.1-amd64
fugu-demo# rmdir tools-7.1-amd64
All the following operations are performed in the working directory FIBLD.
-Generate OpenBSD kernel for FuguIta
fugu-demo# cd FIBLD
fugu-demo# make kernconfig
fugu-demo# make kernclean
fugu-demo# make kern
-Prepare OpenBSD install set~
Place the OpenBSD install set in the build tools install_sets directory.
fugu-demo# ( cd install_sets
for f in base comp game man xbase xfont xserv xshare; do
ftp $(cat /etc/installurl)/7.1/amd64/${f}71.tgz
done )
-Set up packages to add to FuguIta ~
Place rsync, rlwrap, and pv from OpenBSD packages in the build tools install_pkgs directory. Also install rsync and pv on the build system itself.
fugu-demo# PKG_CACHE=FIBLD/install_pkgs pkg_add -n rsync rlwrap pv
fugu-demo# pkg_add install_pkgs/rsync*.tgz install_pkgs/pv*.tgz
-Generate FuguIta file tree and mofify it for FuguIta
fugu-demo# make stage
If you want to customize FuguIta, modify the file tree under the FIBLD/staging directory after running make stage.
-Synchronize the image file to be built into FuguIta with the contents of this file tree
fugu-demo# make sync
-Generating an ISO image file ~
Integrate the root filesystem image with the kernel and embed the bootloader to generate the ISO image file.
fugu-demo# make iso
-GZIP compress ISO file image with filename with release string
fugu-demo# make gz
FuguIta-7.1-amd64-yyyymmddn.iso.gz is created in FIBLD. n is the build count number, which is recorded in the file FIBLD/revcount_cdmaster.
///***Makefile ターゲット一覧
///FuguItaã®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内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’fuguitaã«ãƒžã‚¦ãƒ³ãƒˆã—ã¾ã™&br;(予ã‚make open-mediaã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™)|
///|close-rdroot |rdrootã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™|
///|close-media |mediaã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™&br;(予ã‚make close-fuguitaã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™)|
///|close-fuguita |fuguitaã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™|
///|close-all |構築環境ã®å…¨ã¦ã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™|
///|boot |rdrootをカーãƒãƒ«ã«çµ„è¾¼ã¿ã€ISOコンテンツ内ã«ã‚³ãƒ”ーã—ã¾ã™|
///|hyb |ISOコンテンツをISOイメージファイルã«å¤‰æ›ã—ã¾ã™|
///|cdgz |ISOイメージファイルを圧縮ã—ã¾ã™|
///
///**作æ¥ã®å‰ã« [#j67c3ef4]
///-å¿…è¦ãªã‚‚ã®
///--作æ¥ç”¨OS (OpenBSDã¾ãŸã¯FuguIta)
///
///--OpenBSDカーãƒãƒ«ã®ã‚½ãƒ¼ã‚¹ãƒ„リー
///
///--rsync, rlwrap, pvã®ãƒ‘ッケージファイル
///
///--FuguItaã®æ§‹ç¯‰ãƒ„ール
///
///-作æ¥æ¡ä»¶
///--å‰é …ã®ã€Œå¿…è¦ãªã‚‚ã®ã€ã§æŒ™ã’ãŸã‚‚ã®ã¯ã™ã¹ã¦OpenBSDã®åŒã˜ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒ»åŒä¸€ã®ãƒ—ラットフォーム用ã®ã‚‚ã®ã§ã‚ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚
///
///--å…¨ã¦ã®æ“作ã¯root権é™ã§è¡Œã„ã¾ã™ã€‚
///
///**作æ¥æ‰‹é † [#m7e38ed1]
///以é™ã€ä½œæˆæ‰‹é †ã«ã¤ã„ã¦ä¾‹ã‚’示ã—ãªãŒã‚‰è§£èª¬ã—ã¾ã™ã€‚~
///対象ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨ã—ã¦OpenBSD 7.1ã€ãƒ—ラットフォームã¯amd64を想定ã—ã¦ã„ã¾ã™ã€‚
///ã¾ãŸã€æ§‹ç¯‰ãƒ„ールを置ãディレクトリを FIBLD ã¨è¡¨è¨˜ã—ã¦ã„ã¾ã™ã€‚ã“ã®éƒ¨åˆ†ã¯å®Ÿéš›ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåã§ç½®ãæ›ãˆã¦ä¸‹ã•ã„。
///
///-OpenBSDカーãƒãƒ«ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’å–得・展開
/// # tar -xzp -C /usr/src -f sys.tar.gz
///>''ã€ãƒ¡ãƒ¢ã€‘''~
///''⇒''カーãƒãƒ«ã®ã‚½ãƒ¼ã‚¹ãƒ„リーを最新ã®çŠ¶æ…‹ã«ã‚¢ãƒƒãƒ—デートã™ã‚‹ã«ã¯ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ»ãƒžãƒ‹ãƒ¥ã‚¢ãƒ« release(8) ã®ã€Œ1. Update sourcesã€ã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„。
///
///-構築作æ¥ç”¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªFIBLDã«FuguItaã®æ§‹ç¯‰ãƒ„ールを展開
/// # mkdir -p FIBLD
/// # cd FIBLD
/// # ftp https://FUGUITA-MIRROR-SITE/tools/tools-7.1-amd64.tar.gz
/// # tar -xzp -C FIBLD -f tools-7.1.tar.gz
/// # mv tools-7.1-amd64
/// # rmdir tools-7.1-amd64
///
///以下ã®ä½œæ¥ã¯ã€å…¨ã¦ä½œæ¥ç”¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªFIBLDã§è¡Œã„ã¾ã™ã€‚
///
///-FuguIta用ã®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; do
/// ftp $(cat /etc/installurl)/7.1/amd64/${f}71.tgz
/// done )
///
///-FuguItaã«è¿½åŠ ã™ã‚‹ãƒ‘ッケージをセットアップ ~
///構築ツールã®install_pkgsディレクトリã«OpenBSDã®packagesã‹ã‚‰rsyncã€rlwrapã€pv ã‚’é…ç½®ã—ã¾ã™ã€‚ã¾ãŸã€rsyncã¨pvã¯ã€ãƒ“ルドを行ã†ã‚·ã‚¹ãƒ†ãƒ 自身ã«ã‚‚インストールã—ã¾ã™ã€‚
/// # PKG_CACHE=FIBLD/install_pkgs pkg_add -n rsync rlwrap pv
/// # pkg_add install_pkgs/rsync*.tgz install_pkgs/pv*.tgz
///
///-FuguItaã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ„リーを生æˆã—ã€FuguIta 用ã«ä¿®æ£
/// # make stage
///FuguItaをカスタマイズã™ã‚‹å ´åˆã¯ã€make stage実行後ã€FIBLD/stagingディレクトリã®ä¸‹ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ„リーã«æ”¹å¤‰ã‚’åŠ ãˆã¾ã™ã€‚
///
///-ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ„リーã®å†…容ã«ã€FuguItaã«å†…蔵ã•ã›ã‚‹ã‚¤ãƒ¡ãƒ¼ã‚¸ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç‰åŒ–
/// # make sync
///
///-ISOイメージファイルã®ç”Ÿæˆ ~
///ルートファイルシステムã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã¨ã‚«ãƒ¼ãƒãƒ«ã‚’çµ±åˆã—ã€ãƒ–ートãƒãƒ¼ãƒ€ã‚’組ã¿è¾¼ã¿ã‚“ã§ISOイメージファイルを生æˆã—ã¾ã™ã€‚
/// # make iso
///
///-ISOファイルイメージをリリース文å—列付ãã®ãƒ•ã‚¡ã‚¤ãƒ«åã§GZIP圧縮
/// # make gz
///
///以上ã§FIBLD内ã«FuguIta-7.1-amd64-yyyymmddn.iso.gzãŒä½œæˆã•ã‚Œã¾ã™ã€‚nã¯ãƒ“ルド回数を示ã™ç•ªå·ã§ã€FIBLD/revcount_cdmasterã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«å†…ã«è¨˜éŒ²ã•ã‚Œã¾ã™ã€‚
//////***Makefile ターゲット一覧
//////FuguItaã®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内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã‚’fuguitaã«ãƒžã‚¦ãƒ³ãƒˆã—ã¾ã™&br;(予ã‚make open-mediaã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™)|
//////|close-rdroot |rdrootã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™|
//////|close-media |mediaã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™&br;(予ã‚make close-fuguitaã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™)|
//////|close-fuguita |fuguitaã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™|
//////|close-all |構築環境ã®å…¨ã¦ã®ãƒžã‚¦ãƒ³ãƒˆã‚’解除ã—ã¾ã™|
//////|boot |rdrootをカーãƒãƒ«ã«çµ„è¾¼ã¿ã€ISOコンテンツ内ã«ã‚³ãƒ”ーã—ã¾ã™|
//////|hyb |ISOコンテンツをISOイメージファイルã«å¤‰æ›ã—ã¾ã™|
//////|cdgz |ISOイメージファイルを圧縮ã—ã¾ã™|
///
/////>''ã€ãƒ¡ãƒ¢ã€‘''~
/////''⇒''nabekenã•ã‚“ã¨ã„ã†æ–¹ãŒFuguItaを基ã«ã—ã¦[[myFuguita>https://github.com/nabeken/myfuguita]]ã¨ã„ã†ãƒ©ã‚¤ãƒ–システムを作æˆã•ã‚Œã¦ã„ã¾ã™ã€‚myFuguitaã¯ã€FuguItaã®æ§‹ç¯‰ç’°å¢ƒã‚’OpenBSDã®æ¨™æº–ビルドシステムã«çµ„ã¿è¾¼ã¿ã€amd64アーã‚テクãƒãƒ£ã§å‹•ä½œã™ã‚‹ã‚ˆã†ã«æ”¹è‰¯ã—ãŸã‚‚ã®ã§ã™ã€‚
///
///#aname(livedvd_remaster)
//>''ã€ãƒ¡ãƒ¢ã€‘''~
//''⇒''nabekenã•ã‚“ã¨ã„ã†æ–¹ãŒFuguItaを基ã«ã—ã¦[[myFuguita>https://github.com/nabeken/myfuguita]]ã¨ã„ã†ãƒ©ã‚¤ãƒ–システムを作æˆã•ã‚Œã¦ã„ã¾ã™ã€‚myFuguitaã¯ã€FuguItaã®æ§‹ç¯‰ç’°å¢ƒã‚’OpenBSDã®æ¨™æº–ビルドシステムã«çµ„ã¿è¾¼ã¿ã€amd64アーã‚テクãƒãƒ£ã§å‹•ä½œã™ã‚‹ã‚ˆã†ã«æ”¹è‰¯ã—ãŸã‚‚ã®ã§ã™ã€‚
#aname(livedvd_remaster)
///*LiveDVDã®ãƒªãƒžã‚¹ã‚¿ãƒªãƒ³ã‚° [#q529c858]
///[[USBメモリã®å®¹é‡ã«åˆã‚ã›ã¦LiveUSBを作æˆã™ã‚‹>fg3:liveusb_remaster]]ã§ã¯LiveUSBã®ã‚¤ãƒ¡ãƒ¼ã‚¸ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã¾ã—ãŸãŒã€ã“ã®ç¯€ã§ã¯remaster_dvd.shコマンドを用ã„ã¦ç¨¼å‹•ä¸ã®FuguItaã‹ã‚‰LiveDVDã®ISOイメージを作æˆã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚
///[[USBメモリã®å®¹é‡ã«åˆã‚ã›ã¦LiveUSBを作æˆã™ã‚‹>fge3:liveusb_remaster]]ã§ã¯LiveUSBã®ã‚¤ãƒ¡ãƒ¼ã‚¸ãƒ•ã‚¡ã‚¤ãƒ«ã‚’作æˆã—ã¾ã—ãŸãŒã€ã“ã®ç¯€ã§ã¯remaster_dvd.shコマンドを用ã„ã¦ç¨¼å‹•ä¸ã®FuguItaã‹ã‚‰LiveDVDã®ISOイメージを作æˆã™ã‚‹æ–¹æ³•ã‚’説明ã—ã¾ã™ã€‚
///>''ã€ãƒ¡ãƒ¢ã€‘''~
///''⇒''ã“ã®ä½œæ¥ã¯å¤§ããªã‚µã‚¤ã‚ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’扱ã†ã®ã§ã€mfsã®ã‚µã‚¤ã‚ºã¯ï¼’ギガãƒã‚¤ãƒˆä»¥ä¸Šå¿…è¦ã§ã™ã€‚~
///mfsã§ã¯è¶³ã‚Šãªã„å ´åˆã€ä»–ã®è¨˜éŒ²ãƒ‡ãƒã‚¤ã‚¹ã‚’マウントã—ã¦ãã¡ã‚‰ã§ä½œæ¥ã—ã¾ã™ã€‚
///
///ã“ã®master_dvd.shã¯ã€å‹•ä½œä¸ã®FuguIta LiveDVDã€ã‚ã‚‹ã„ã¯FuguIta LiveUSBã®ã©ã¡ã‚‰ã§ã‚‚使用å¯èƒ½ã§ã™ã€‚~
///以下ã«remaster_dvd.shã®ä½¿ç”¨ä¾‹ã‚’示ã—ã¾ã™ã€‚
///
///ã¾ãšã€ä½œæ¥ç”¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作æˆã—ã€sysmedia以下ã«ã‚ã‚‹LiveDVD/LiveUSBã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„をコピーã—ã¾ã™ã€‚
/// # 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-6.9-amd64.ffsimg
/// # 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-fi.mp
/// -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 fuguita-6.9-amd64.ffsimg
/// # remaster_dvd.sh
/// mkhybrid 1.12b5.1
/// Scanning .
/// Scanning ./etc
///
/// Size of boot image is 4 sectors -> No-emulation CD boot sector
/// 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ã®å®Ÿè¡ŒãŒå®Œäº†ã™ã‚‹ã¨ã€ä½œæ¥ç”¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ISOイメージファイルãŒä½œæˆã•ã‚Œã¦ã„ã¾ã™ã€‚
/// # ls -l ..
/// total 2008808
/// -rw-r--r-- 1 root wheel 1028505600 May 14 02:34 FuguIta-6.9-amd64-202105141.iso
/// 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-fi.mp
/// -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 fuguita-6.9-amd64.ffsimg
///
*LiveDVD remastering [#p3436b45]
[[Creating a LiveUSB according to the capacity of the USB memory>fge3:liveusb_remaster]] created a LiveUSB image file. Describes how to create an image.
>''[Memo]''~
''⇒''Since this operation deals with large size files, the size of mfs must be more than 2 gigabytes. ~
If mfs isn't enough, mount another recording device and work there.
This master_dvd.sh can be used with either a working FuguIta LiveDVD or FuguIta LiveUSB. ~
Below is an example of using remaster_dvd.sh.
First, create a working directory and copy the contents of LiveDVD/LiveUSB under sysmedia.
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-6.9-amd64.ffsimg
fugu-demo# ls -l
total 8
drwxr-xr-x 3 root wheel 432 May 11 09:21 sysmedia
Run remaster_dvd.sh 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-fi.mp
-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 fuguita-6.9-amd64.ffsimg
fugu-demo# remaster_dvd.sh
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
Size of boot image is 4 sectors -> No-emulation CD boot sector
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.sh, an ISO image file will be created in the working directory.
fugu-demo# ls -l ..
total 2008808
-rw-r--r-- 1 root wheel 1028505600 May 14 02:34 FuguIta-6.9-amd64-202105141.iso
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-fi.mp
-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 fuguita-6.9-amd64.ffsimg
///sysmediaä¸ã«fuguita-6.9-amd64.ffsimgã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ãŒã‚ã‚Šã¾ã™ãŒã€ã“ã®ä¸ã«FuguItaã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ„リーãŒæ ¼ç´ã•ã‚Œã¦ã„ã¾ã™ã€‚
///ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãƒ„リー内ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿®æ£ã™ã‚‹ã“ã¨ã§ã€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/src/sys
/// 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
/// :
/// :
///
///*LiveUSBディスクイメージã®ãƒªãƒžã‚¹ã‚¿ãƒªãƒ³ã‚° [#obdef877]
///ã“ã®ç¯€ã§ã¯ã€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, JF4O>
/// sd0: 715404MB, 512 bytes/sector, 1465149168 sectors
/// sd1 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G, 1.00>
/// sd1: 29624MB, 512 bytes/sector, 60669952 sectors
/// sd2 at scsibus5 targ 1 lun 0: <BUFFALO, USB Flash Disk, 4000>
/// 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 sd1a, inode 9
/// ============================================================
/// Enter the name of device which FuguIta will be installed->vnd0 â†æœªä½¿ç”¨ã®vnodeデãƒã‚¤ã‚¹ã‚’指定
///
/// Enter size of a vnode device file.
/// You can add suffix K, M, G or T (otherwise considered 'bytes').
/// ->2g â†ã‚¤ãƒ¡ãƒ¼ã‚¸ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µã‚¤ã‚ºã‚’
/// 指定
/// 2048+0 records in
/// 2048+0 records out
/// 2147483648 bytes transferred in 3.076 secs (698129518 bytes/sec)
///
/// Disk: vnd0 geometry: 41943/1/100 [4194304 Sectors]
/// Offset: 0 Signature: 0x0
/// Starting Ending LBA Info:
/// #: id C H S - C H S [ start: size ]
/// -------------------------------------------------------------------------------
/// 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
/// 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
/// 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
/// 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
///
/// Select partition type:
/// 1: [MBR]
/// 2: GPT
/// 3: Hybrid (not recommended if you wish modify partitioning later)
/// ->
/// ~ 略 ~
/// ** Phase 5 - Check Cyl groups
/// 3 files, 3 used, 386996 free (20 frags, 48372 blocks, 0.0% fragmentation)
///
/// ? : ? ->bye
///
/// Bye bye...
/// $
///以上ã®æ“作ã§ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä¸Šã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚¤ãƒ¡ãƒ¼ã‚¸ãƒ•ã‚¡ã‚¤ãƒ«ãŒä½œæˆã•ã‚Œã¾ã™ã€‚ファイルåã¯é…布ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ã€ã€ŒFuguIta-OpenBSDãƒãƒ¼ã‚¸ãƒ§ãƒ³-プラットフォーム-リリース.imgã€ã®å½¢å¼ã¨ãªã‚Šã¾ã™ã€‚
///
There is a file called fuguita-6.9-amd64.ffsimg in sysmedia, which contains the FuguIta file tree.
You can customize your LiveDVD by modifying the files in this file tree.
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/src/sys
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 image and remaster.
fugu-demo# umount /mnt
fugu-demo# vnconfig -u vnd0
fugu-demo# remaster_dvd.sh
mkhybrid 1.12b5.1
Scanning .
Scanning ./etc
:
:
* LiveUSB disk image remastering [#x2f9919d]
This section introduces how to create a LiveUSB disk image file.
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, JF4O>
sd0: 715404MB, 512 bytes/sector, 1465149168 sectors
sd1 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G, 1.00>
sd1: 29624MB, 512 bytes/sector, 60669952 sectors
sd2 at scsibus5 targ 1 lun 0: <BUFFALO, USB Flash Disk, 4000>
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 sd1a, inode 9
============================================================
Enter the name of device which FuguIta will be installed->vnd0 ↠Specify an unused vnode device
Enter size of a vnode device file.
You can add suffix K, M, G or T (otherwise considered 'bytes').
->2g
2048+0 records in
2048+0 records out
2147483648 bytes transferred in 3.076 secs (698129518 bytes/sec)
Disk: vnd0 geometry: 41943/1/100 [4194304 Sectors]
Offset: 0 Signature: 0x0
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
-------------------------------------------------------------------------------
0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
Select partition type:
1: [MBR]
2: GPT
3: Hybrid (not recommended if you wish modify partitioning later)
->
~ 略 ~
** Phase 5 - Check Cyl groups
3 files, 3 used, 386996 free (20 frags, 48372 blocks, 0.0% fragmentation)
? : ? ->bye
Bye bye...
$
A disk image file is created in the current directory by the above operations. The file name will be the same as the distributed one, "FuguIta-OPENBSD_VERSION-PLATFORM-RELEASE.img".
#navi(FuguItaGuide)