Bug 254062 - loader dies when /boot is missing, even if live backups exist
Summary: loader dies when /boot is missing, even if live backups exist
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL: https://forums.freebsd.org/threads/bo...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-06 13:39 UTC by Michael Büker
Modified: 2021-03-06 13:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Büker 2021-03-06 13:39:10 UTC
Steps to reproduce:
1. Create a beadm(1) backup (or manual clone) of a zfs root+boot dataset
2. Delete the /boot directory in the live system
3. Reboot

Result: the loader dies (because /boot/lua/loader.lua doesn't exist).

It is, however, possible to recover in this situation with the following commands:
1. set currdev=zfs:zroot/ROOT/backup:
2. include /boot/lua/loader.lua
(See a full description here: https://forums.freebsd.org/threads/boot-directory-deleted-how-to-recover-with-zfs-backups.79181/ )

Instead of dying instantly, the loader might try finding a valid /boot directory on another dataset (e.g. siblings to zroot/ROOT/default) and offer (or try) to load from them.