Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
freebsd_shellscript_install
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
zinrai
March 02, 2014
Programming
210
1
Share
freebsd_shellscript_install
シェルスクリプトでFreeBSDのインストールを自動化するお話
zinrai
March 02, 2014
More Decks by zinrai
See All by zinrai
OKRとチケット駆動開発を組み合わせたチームでの取り組み/okr-tidd-knowledge
zinrai
0
240
テキスト化した「チケット駆動開発がまわりはじめるまでの取り組み」の紹介/okr-tidd-case-intro
zinrai
1
1.8k
Ansible 使うとき何考えてるの/ansible-role-reuse
zinrai
0
520
チケット駆動開発がまわりはじめるまでの取り組み/okr-tidd-case
zinrai
10
5.6k
mail_service_unittest
zinrai
1
230
vyos_mtg3_vxlan_lt
zinrai
0
250
debian_shellscript_install
zinrai
0
290
Other Decks in Programming
See All in Programming
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
350
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
330
AgentCore Optimizationを始めよう!
licux
3
210
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
480
tRPCの概要と少しだけパフォーマンス
misoton665
2
260
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
450
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
140
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.6k
ハーネスエンジニアリングとは?
kinopeee
13
6.8k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
360
20260514_its_the_context_window_stupid.pdf
heita
0
630
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
360
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Into the Great Unknown - MozCon
thekraken
41
2.5k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
350
Agile that works and the tools we love
rasmusluckow
331
21k
Exploring anti-patterns in Rails
aemeredith
3
350
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The agentic SEO stack - context over prompts
schlessera
0
770
Optimizing for Happiness
mojombo
378
71k
Chasing Engaging Ingredients in Design
codingconduct
0
180
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Transcript
シェルスクリプトでFreeBSDインストール自動化 2014/03/01 @zinrai
自己紹介 • Twitter : @zinrai (じんらい) • blog : zinrai.github.io
• 趣味 : けん玉(四段)
ブログに書いてます • 「シェルスクリプトでFreeBSD 9.1のインストー ル自動化」 http://zinrai.github. io/blog/html/2013/07/20/freebsd_pxeboot. html
モチベーション • 「第15回 FreeBSD勉強会」 インストーラを使わないでFreeBSDをインストー ルする方法 http://atnd.org/events/35877
自動化するには、インストーラがなにをしているか 知る必要がある。
インストーラってなにしてる • パーティション作成 : gpart(8) • ディスクフォーマット : newfs(8) •
デバイスマウント : mount(8) • ユーザーランド/カーネル展開 • パスワード設定 : pw(8) • ネットワーク設定 • タイムゾーン設定 : tzsetup(8) • ユーザー作成 : pw(8)
ユーザー作成 % pw useradd -n nanashi -s /bin/tcsh -m 平文
% print ‘Xd49D4Pj' | pw usermod -n nanashi -h 0 ハッシュ % print '$6$zb/9khHuHs2BArHu$UF/tHGPcXOjxL24Y5qG.rZi. I9qMXe67VzdGvUAiKsHFVycK17T81g3pBRMjp8qVve/TweUsHVn.m1. V0Sm5q0’ | pw usermod -n nanashi -H 0
あとはシェルスクリプトを書くだけ。
インストール自動化の構成 ディスクレスブート用のサーバを用意し、ディスクレスブート時にシェルスクリ プトを実行させるという簡単な構成 サーバには2つのシェルスクリプトを用意しておく • OSインストール用のシェルスクリプトを探して実行するシェルスクリプト (クライアントのMACアドレスを取得し、そのMACアドレスが書かれたシェルスク リプトを実行する) • OSインストール用シェルスクリプト
まとめ パーティション作成してフォーマットしてデバイスマ ウントしてカーネルとユーザーランド展開してfstab 書いてchroot(8)してユーザーアカウント作成して 再起動すればFreeBSDマシンの出来上がり。
おわり 突っ込みや質問はツイッターへ