はじめての起動
どういう流れでLinuxが起動されるのか勉強したので、まとめてみる。
起動の流れ
- 1. 電源をONすると、BIOSが起動される
- 4. カーネルが初期化処理
- ls -la /boot
- initrdとか、、、(以下略)
- 5. カーネルが最初のユーザプロセスである/sbin/initを起動する
- initのPIDは必ず1
- pstree -p 1すると面白い
- 6. initは/etc/inittabを読み込む
- 指定されたランレベルの起動スクリプトを実行する
ランレベルについて
/etc/inittabの中身.
# Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this)
- runlevel3が通常(CUI)
- runlevel5はWindow Systemあり