loader.conf messed up with nvidia-modeset_load="YES" on encrypted zfs FreeBSD 13.0 stable system fresh install

Hello,

I can't boot anymore, the boot hang on loading nvidia driver because of the loader.conf messed up.

My system is encrypted just installed yesterday, how i can have access to loader.conf and remove this fucking line avec nivida... ?

in boot, line command, i don't see how to boot with minimal module loaded and have access :(:(

if you have a idea !

Thanks
Best regards
Dahikino.
 
If you have a device with a rescue image you may be able to import the pool and then navigate or mount the installed pool (zroot) and navigate down to the dataset: it's probably named something like zroot/ROOT/default
When you import make sure you do with a -o altroot so you don't try and mount over the rescue image
 
My problem now is to have access to the file loader.conf to modify it, i can't boot, it is hanging just at loading module process during boot, with error :
EFI framebuffer information :
efi_check_space : Unable to expand staging area !
 
You want the drm/video drivers in /etc/rc.conf in the kld_list variable.

dahikino I don't know the answer to that. I've not done any encrypted root installs (no need to), so I may be speculating here. I'm assuming the install was "Native ZFS Encryption" not GELI or GBDE? Did you reboot the system before you added the line to loader.conf? If so, did it ask for a passphrase? If it did, when you import it into the rescue image, it may ask there. If it does, you should be able to get to things. If not, I'm out of ideas except "prepare for an install and don't do that again" is all I can offer.
 
My problem now is to have access to the file loader.conf to modify it, i can't boot, it is hanging just at loading module process during boot, with error :
EFI framebuffer information :
efi_check_space : Unable to expand staging area !
I'm out of my knowledge base here, you may wind up at simply reinstalling.
 
i did try yesterday evening, but i don't know via mountroot which is the the name of the root partition, ada0.., da0... etc... i did try with zfs:zroot/ROOT/default but i had a error : zfs:zroot/ROOT/default failed with error 2: unknown file system
i don't understand why because i used the standard install with memstick 13.0 stable with default zfs encryption settings !
 
The guide from the link seems not to work with root-on-ZFS.

To get still access to file /boot/loader.conf in geli(8) encrypted pool:
  1. Boot a FreeBSD installer image
  2. Enter passphrase
  3. Enter "Shell" or "Live CD"
  4. Attach encrypted ZFS partition (assuming ada0p2)
Code:
geli attach ada0p2                # enter passphrase
mkdir /tmp/a
zpool import -R /tmp/a zroot
zfs mount zroot/ROOT/default
ee /tmp/a/boot/loader.conf        # remove nvidia-modeset
zpool export zroot
poweroff
Remove installer image, boot system.
 
  • Like
Reactions: mer
Alternatively, instead of booting a FreeBSD installer image to edit /boot/loader.conf, boot affected system, drop to loader prompt, load only necessary kernel modules, boot into single user mode, mount file sytem read/write.
The guide from the link seems not to work with root-on-ZFS.
System 13.0-RELEASE, for root-on-ZFS execute at the loader prompt:
Code:
OK  load boot/kernel/kernel -s
OK  load boot/kernel/zfs.ko
# when geli(8) encrypted root-on-ZFS
OK  load boot/kernel/geom_eli.ko
OK  boot

In case someone doesn't know how to mount the pool read/write from single user mode to edit file /boot/loader.conf:
Code:
zfs set readonly=off zroot/ROOT/default     # replace pool name 'zroot' if differs
 
Last edited:
Back
Top