9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LPICレベル1対策 - システムの起動とランレベル

Posted at

システムが起動するまでの流れ

  1. BIOS
    2. ハードウェアのチェックと初期化
    3. ディスクのブートセクタを読み込んで、ブートローダーに制御を渡す
  2. ブートローダー
    3. ハードウェアからカーネルを読み込む
  3. カーネル
    4. メモリの初期化、システムクロックの設定
    5. initプログラムを実行
  4. init
    5. システムの初期化スクリプトを実行
    6. ランレベルにしたがって、システムサービスや、デーモンの起動
    7. OSの起動が終わったって状態になったら、ログインプロンプトを表示する

起動時のイベントの確認

起動時のログの確認方法は3つある。

  • dmesgコマンド
  • /var/log/messagesを確認する
  • /var/log/boot.logを確認する

/sbin/initについて

initは何をしているのか。

/etc/inittabファイルの設定にしたがってデーモンを起動する

  1. /sbin/initのやってること

    • /etc/inittabを読み込む
    • /etc/rc.sysinitスクリプトを実行
    • /etc/rcスクリプトを実行
  2. /etc/rcスクリプトがやってること

    • /etc/rcランレベル.dディレクトリ以下のスクリプトを実行する。

SysVinitとは

Unix系OSで広く使われてきたOS起動の仕組み。
ただ、サービスを順番に起動し、の並列起動が出来ないという欠点がある。

最近では、Upstartやsystemdを採用するケースがある。

ランレベルとは

ランレベルについては後で追記します

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?