A future change will add a tunable to control the fallback directive,
currently usually ".ask". This series is motivated by a desire to avoid
the mountroot prompt and just immediately reboot if we failed to mount
root; nextboot(8) is in use and if we made it far enough to be in a
kernel that's trying to mountroot, odds are greater for a botched
kernel/module than a broken root fs (in my case).
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 51752 Build 48643: arc lint + arc unit
Event Timeline
sys/kern/vfs_mountroot.c | ||
---|---|---|
712 | Shouldn't this just parse it, or are all the other cases parsing and executing? |
sys/kern/vfs_mountroot.c | ||
---|---|---|
712 | parse_dir_ask immediately executes its action, so I believe the latter is OK/not unexpected. |
The underlying motivation makes sense to me, but I don't quite understand this patch. Why isn't it sufficient to just support ".onfail reboot"? With this change, you can insert ".reboot" anywhere in the mountfrom specification, and the kernel will reboot without parsing further, but it sounds like you just need to support rebooting as an onfail action.
The onfail action only happens after everything else has failed, so after the .ask that happens at the end (unless you specify boot_askname to make it happen earlier, which I don't want). Maybe some kind of boot_unattended to just avoid any .ask is what I want? I don't think we have anything else that'll need to check it, though, so I'm unsure