While fiddling with boot parameters on FreeBSD, I accidentally messed up /etc/rc.conf. What should I do?

Every time I log in, it directly executes the contents in rc and then goes off the rails. How do I fix this?

After booting, first use single mode; you can enter the file system. But you can't modify it directly; it says the file system is read-only, so you need to mount it first.

Bash
# adjkerntz -i
# mount -u /
# zfs mount -a

Then you can edit the files you need.

Reference: