LoginSignup
4
1

More than 3 years have passed since last update.

Ubuntuが異常終了した際にやるべきこと

Last updated at Posted at 2020-08-10

概要

Ubuntuが異常終了した際に行ったことを記録として残します。
環境:Ubuntu 20.04 LTS

fsck

Windowsではscandiskに相当するコマンドでファイルシステムのスキャンと修復が行えます。
システムが異常終了した際に自動的に実行されますが、forcefsckファイルをホームディレクトリに作成することで、次回起動時に強制的に実行できます。

sudo touch /forcefsck

結果の確認は以下の通り。

sudo cat /run/initramfs/fsck.log 

特に問題なければ以下のように表示されます。

/dev/nvma03x1: clean, 239896/31227904 files, 4604346/124895488 blocks

debsums

Windowsではsfc/scannowに相当するコマンドでインストール済みパッケージの整合性が確認できます。

sudo apt install debsums

下記コマンドで変更のあった箇所のみを表示できます。

sudo debsums -s

参考

https://www.xmisao.com/2014/02/06/force-fsck-or-reboot-fast-with-shutdown-command.html
http://manpages.ubuntu.com/manpages/trusty/man1/debsums.1.html

4
1
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
4
1