Solved EFI fault on boot for no obvious reasons

neostanniy

Member

Reaction score: 1
Messages: 29

Hello everyone.

I have installed the FreeBSD with a lot of help of the community, but ran into another serious issue after installing and adding nvidia modules into kernel + modifying my /etc/rc.conf and /boot/loader.conf to launch gnome3 by default exactly as it was said. And now I am having this sort of fun:

Знімок екрана з 2021-05-13 18-13-30.png

I have tried all of the options to load including "safe mode", "verbose" etc., but the result is always the same, so I am unable even to enter the console to help myself.
Thanks in advantage...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,367
Messages: 38,901

That isn't a panic(9).

and /etc/boot.conf
File doesn't exist. I'm not sure where you got that from, it's not mentioned in the article either. Maybe you meant /boot/loader.conf?

Instead of searching for websites on how to do things, I suggest you start with the handbook instead.
 

Zirias

Son of Beastie

Reaction score: 1,588
Messages: 2,718

Don't load any graphics drivers from /boot/loader.conf (is this what you meant by /etc/boot.conf? I don't know such a file…)

Use kld_list in /etc/rc.conf instead.
 
OP
neostanniy

neostanniy

Member

Reaction score: 1
Messages: 29

File doesn't exist. I'm not sure where you got that from, it's not mentioned in the article either. Maybe you meant /boot/loader.conf?
Thanks. Corrected.
Use kld_list in /etc/rc.conf instead.
OK, I will remember that for my further tries, but as far as I may guess from both of your replies, it's now too late to change anything.
Thank you, though.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,367
Messages: 38,901

Now, onto how to fix this. Because these modules are automatically loaded you can't easily stop this from happening (which is one of the reasons to use kld_list instead as Zirias mentioned). The menu also has an option to drop to the loader prompt. On that loader prompt:
Code:
unload
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
boot

If you add a misbehaving module to kld_list it'll be easier to fix just by booting in single user mode.
 
OP
neostanniy

neostanniy

Member

Reaction score: 1
Messages: 29

Now, onto how to fix this. Because these modules are automatically loaded you can't easily stop this from happening (which is one of the reasons to use kld_list instead as Zirias mentioned). The menu also has an option to drop to the loader prompt. On that loader prompt:
Code:
unload
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
boot

If you add a misbehaving module to kld_list it'll be easier to fix just by booting in single user mode.

Thanks, that helped.

I managed to get my system back to working state.

I have loaded the nvidia driver via kld_load and it recognized my nVidia GTX 1660 GPU. Then I have read the abovementioned manual, but couldn't get the X Window System running. I found out that there was a similar problem before, so I have created the /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf, added

Code:
Section "Device"
        Identifier "Card0"
        Driver     "nvidia"
EndSection

in it, and now I am enjoying this:

Знімок екрана з 2021-05-13 19-06-25.png


However, this result is much better than nothing, despite nothing works, even the mouse pointer. At least I can easily access my console now, if I would want to.

Marking as "solved". Thanks everyone.
 

Zirias

Son of Beastie

Reaction score: 1,588
Messages: 2,718

Yes, there's (almost) always a way to fix things. SirDice already gave instructions what to do in your case. Assuming EFI boot worked before, it's very likely that the culprit is the pre-loaded nvidia driver, so you'll be able to fix it following the advice above.

Just for completeness (and because I needed that a very few times myself): If you messed up big time, you can boot from an install media (USB stick) matching your FreeBSD version, switch to another VT to get a shell, mount your system, and fix things "offline" that way.
 
OP
neostanniy

neostanniy

Member

Reaction score: 1
Messages: 29

Yes, there's (almost) always a way to fix things. SirDice already gave instructions what to do in your case. Assuming EFI boot worked before, it's very likely that the culprit is the pre-loaded nvidia driver, so you'll be able to fix it following the advice above.

Just for completeness (and because I needed that a very few times myself): If you messed up big time, you can boot from an install media (USB stick) matching your FreeBSD version, switch to another VT to get a shell, mount your system, and fix things "offline" that way.
Yeah, that's why I love UNIX-alikes: there's almost always a way to fix something. And the community is the powerful source also. Thank u.
 

Alain De Vos

Daemon

Reaction score: 649
Messages: 2,174

For zfs you must also load xdr,
Code:
load /boot/kernel/xdr.ko
If everything goes well the system goes to multi-user mode
 

Zirias

Son of Beastie

Reaction score: 1,588
Messages: 2,718

For zfs you must also load xdr,
Serious question: what's that?

I have several ZFS systems here and none of them has such a module loaded. And man 4 xdr gives no results.

And, side note, I think dependencies of modules will work fine anyways, there should never be a reason to explicitly load them?
 

Alain De Vos

Daemon

Reaction score: 649
Messages: 2,174

Zirias

Son of Beastie

Reaction score: 1,588
Messages: 2,718

Ok, so, I'm on 13.0-RELEASE, I'm using (open)zfs, and kldstat doesn't show a module by that name. This is now confusing!

Anyways, I still think there should never be a need to list module dependencies explicitly ;)
 

Alain De Vos

Daemon

Reaction score: 649
Messages: 2,174

once i type onload on the boot prompt, i must load the modules xdr and zfs in that order or it won't boot.
(ps, i did not install openzfs)
Note, during the loading of zfs module it tries to find module xdr but can't locate it.
It prints out "loading required module xdr, can't find xdr".

Interesting,
Code:
cat /usr/src/sys/conf/files | grep xdr
 

Zirias

Son of Beastie

Reaction score: 1,588
Messages: 2,718

(ps, i did not install openzfs)
Well, OpenZFS is integrated with FreeBSD 13
Note, during the loading of zfs module it tries to find module xdr but can't locate it.
It prints out "loading required module xdr, can't find xdr"
I don't even have a manpage for that (on FreeBSD 13). The module is there:
Code:
nexus# ls /boot/kernel/xdr.ko
/boot/kernel/xdr.ko
But it isn't loaded and ZFS works fine.
Code:
nexus# kldstat | grep xdr
nexus# kldstat | grep zfs
 4    1 0xffffffff8214c000   67feb0 zfs.ko
What version are you using?
 

Alain De Vos

Daemon

Reaction score: 649
Messages: 2,174

Code:
MKSH: /usr/src/sys/amd64/conf # cat a | grep -i nooption
nooption DEBUG
nooption WITH_CTF
nooption NFSCL
nooption NFSD
nooption NFSLOCKD
nooption NFS_ROOT
nooption         XENHVM                  # Xen HVM kernel infrastructure
nooption        KDB                     # Enable kernel debugger support.
nooption         KDB_TRACE               # Print a stack trace for a panic.
nooption         DDB
nooption         DDB_CTF
nooption     COMPAT_FREEBSD4        # Compatible with FreeBSD4
nooption     COMPAT_FREEBSD5        # Compatible with FreeBSD5
nooption     COMPAT_FREEBSD6        # Compatible with FreeBSD6
nooption     COMPAT_FREEBSD7        # Compatible with FreeBSD7
nooption     COMPAT_FREEBSD9        # Compatible with FreeBSD9
nooption     COMPAT_FREEBSD10    # Compatible with FreeBSD10
nooption     COMPAT_FREEBSD32    # Compatible with i386 binaries
Probably the nooptions are the explanation.
Because i have no nfs it included xdr,
 
Top