3
3

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 1 year has passed since last update.

raspberry pi がkernel panicに陥った時の対処法備忘録

Last updated at Posted at 2021-12-16

はじめに

録画用のラズパイが我が家にはあるのですが,録画中に電源をひっこ抜いたらKernel Panic になり,起動しなくなってしまいます.当然ですね,,おうちの配線が悪いみたいで頻繁にやらかしてしまうので備忘録にしておきます
image.jpeg

対処法

  1. 起動ディスクを元気に動いている別のRaspberry piに接続(ほかのLinuxでもいいです)

  2. fdisk -lで接続した起動ディスクを確認

pi@raspberrypi:~ $ sudo fdisk -l
...
...
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: External USB 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfa690dd2

Device     Boot  Start        End    Sectors   Size Id Type
/dev/sda1         8192     532479     524288   256M  c W95 FAT32 (LBA)
/dev/sda2       532480 1953525167 1952992688 931.3G 83 Linux

/dev/sda2にありました.
3. マウントを解除しておきます.

pi@raspberrypi:~ $ umount /dev/sda
umount: /dev/sda: not mounted.

うまくできていそうですね!
4. fsck で修復

pi@raspberrypi:~ $ sudo fsck -f /dev/sda2
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
fsck.ext4: Group descriptors look bad... trying backup blocks...
Pass 1: Checking inodes, blocks, and sizes
Inode 2885617 seems to contain garbage.  Clear<y>? 
(このあとy連打)
...
Free inodes count wrong (61038581, counted=60599427).
Fix<y>? yes
rootfs: ***** FILE SYSTEM WAS MODIFIED *****
rootfs: 439165/61038592 files (0.1% non-contiguous), 126305797/244124086 blocks

終わりました!
5. 起動ディスクをラズパイに差し込んで電源ON.起動できるようになっていると思います

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?