Kernel panic after power loss

Posted on

Problem :

I have some PC systems meant for exhibition use, that are switched off by power loss some times. The systems use a vanilla Lubuntu Linux from SATA attached IDE drives. Now quite frequently, the systems fail to boot up after power loss, but present a ‘Kernel Panic – not syncing: VFS: Unable to mount root fs on unknown-bloc’, only recoverable by reinstalling the system.

  • Why is that?
  • Is there a relation to open / written files at the time of power loss?
  • Why and when are system relevant files written?
  • Why is the superbloc affected by everyday idle use?
  • Are there special issues with SSD drives?
  • Will a read-only root partition prevent this kind of failure?

Solution :

Why is that?

Not enough information to answer that, but my first impression is corruption of the root/boot filesystem.

Is there a relation to open / written files at the time of power loss?

Just open? Probably not. Being written to at the moment someone pulls the plug? Likely.

Why and when are system relevant files written?

Most writing would be to /var, /tmp and /usr/local. All three should have their own partitions (or in the case of /tmp possible on a RAMdisk).

How are they mounted in your case? (e.g. add the contents of what is in /etc/fstab to your post).

Why is the superblock affected by everyday idle use?

If trely idle: no idea.

If /var is on the root partition: It is not idle. Logs will be flushed at least once per minute. Pulling the powerplug while writing can be bad (Depending on which filesystem you used this can be very bad or it may recover).

Are there special issues with SSD drives?

No. They are just faster, more expensive and you want to alight partitions sensible. When you partition a disk (SSD or HDD) the defaults seem to round things down to multiple of 1 or 2 MB. They works just fine for both of them.

Will a read-only root partition prevent this kind of failure?

Yes.

Leave a Reply

Your email address will not be published.