You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ZFS Recovering from a bad loader.conf with ZFS root
Lucas Holt edited this page Aug 22, 2022
·
1 revision
Tested with MidnightBSD 2.0.1 on a UEFI system with "auto zfs guided" during install.
Boot using your "Live CD" then import the zpool(8) and fix your loader.conf
Boot under LiveCD from bootable usb drive or CD
Login using root without password
Create an altroot mount point under /tmp/root
mkdir /tmp/root
Import the zroot pool under the /tmp/root
zpool import -fR /tmp/root zroot
(notice there's no trailing forward slash after /tmp/root)
Mount the zroot/ROOT/default which contain the /boot
zfs mount zroot/ROOT/default
Edit your loader.conf which now is mounted under /tmp/root/boot
ee /tmp/root/boot/loader.conf
remove the last modification from it
then press "ESC" -> leave editor -> save changes
Export the zpool
cd /
zpool export zroot
Shutdown and remove the usb bootable drive or cd then boot normally
shutdown -p now