-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
loader.conf kern.geom.label.disk_ident.enable="0" kern.geom.label.gptid.enable="0" opensolaris_load="YES" zfs_load="YES"
based on a post from VladiBG from the FreeBSD forums