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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
200
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
2
1.8k
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
Are APIs Still Relevant in the AI Era?
soyuka
0
460
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
370
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Domain-Driven Transformation
hschwentner
2
2.3k
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
340
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1k
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
370
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
560
Embracing the Ebb and Flow
colly
88
5.2k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
450
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Documentation Writing (for coders)
carmenintech
77
5.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マシンの出来上がり。
おわり 突っ込みや質問はツイッターへ