Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
freebsd_shellscript_install
シェルスクリプトでFreeBSDのインストールを自動化するお話
zinrai
March 02, 2014
More Decks by zinrai
See All by zinrai
OKRとチケット駆動開発を組み合わせたチームでの取り組み/okr-tidd-knowledge
zinrai
0
250
テキスト化した「チケット駆動開発がまわりはじめるまでの取り組み」の紹介/okr-tidd-case-intro
zinrai
1
1.8k
Ansible 使うとき何考えてるの/ansible-role-reuse
zinrai
0
550
チケット駆動開発がまわりはじめるまでの取り組み/okr-tidd-case
zinrai
10
5.6k
mail_service_unittest
zinrai
1
240
vyos_mtg3_vxlan_lt
zinrai
0
260
debian_shellscript_install
zinrai
0
300
Other Decks in Programming
See All in Programming
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
500
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
340
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
210
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
440
Jetpack Compose メカニズム
skydoves
0
470
Verilogで学ぶCPU自作入門.pdf
uyuki234
8
3.2k
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
570
Are APIs Still Relevant in the AI Era?
soyuka
0
310
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
250
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
390
Featured
See All Featured
Done Done
chrislema
187
17k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Claude Code のすすめ
schroneko
67
230k
The Curse of the Amulet
leimatthew05
3
15k
How GitHub (no longer) Works
holman
316
150k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
880
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
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マシンの出来上がり。
おわり 突っ込みや質問はツイッターへ