Page MenuHomeVyOS Platform

Failure to boot after power outage due to dirty filesystem and no fsck in initramfs
Confirmed, HighPublicBUG

Description

Reported via IRC by damex:

<damex> hi, i just found out if file system on which vyos is located is 'corrupted' - it won't boot forcing you to manually run fsck from other system. let's say debian can do fsck on boot and recover your fs by itself but vyos lacks fsck in initramfs.
<damex> jjakob: i have been on last rolling releases. currently that box runs vyos-1.3-rolling-202003010958-amd64.

Didn't confirm it personally as I don't know how to test this or where to look for the initramfs fsck steps.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

jjakob triaged this task as High priority.Mar 10 2020, 6:15 PM
jjakob created this task.
jjakob created this object in space S1 VyOS Public.
pasik added a subscriber: pasik.Mar 10 2020, 9:25 PM
syncer assigned this task to kroy.Mar 10 2020, 10:03 PM
syncer removed a project: VyOS 1.2 Crux.
kroy changed the task status from Open to Needs testing.Mar 11 2020, 1:58 AM

PR88 should add this.

I spent a few hours trying to hack out how to corrupt the disk in just the right way to trigger this, but was unsuccessful. I was able to at least verify this commit adds the correct files to the resultant installed initramfs.

syncer changed the subtype of this task from "Task" to "Bug".Mar 15 2020, 3:24 PM
This comment was removed by syncer.
syncer added a subscriber: syncer.Mar 20 2020, 12:01 PM
jjakob added a comment.EditedMar 31 2020, 7:48 PM

I tested it today and it doesn't work yet.

# find the root partition
mount
# verify you heve the right partition
dumpe2fs -h /dev/sda1
# Set maximum mount count to 1:
tune2fs -c 1 /dev/sda1
# reboot, it should run fsck but it doesn't
# check if it was checked or not (Last checked and Mount count):
dumpe2fs -h /dev/sda1

It probably needs some scripts too. Can we not add the scripts that Debian adds by default?

Edit: forgot to mention, this is version 1.3-202003310117, confirmed that I have a updated /boot/initrd.img and the patch in 10-vyos-addons

jjakob changed the task status from Needs testing to Confirmed.Mar 31 2020, 7:50 PM