Ok, so I installed some virtualbox stuff, then ran into a problem with usb devices not showing up in virtualbox, then I ran some modprobe commands and I saw a forum post that said to put something in the modules category in /etc/rc.conf and I did sudo nvim /etc/rc.conf and I saw that the file was empty and then I just pasted the line MODULES=(vboxdrv) and saved, and /etc/rc.conf now just contains MODULES=(vboxdrv) and now my system boots into emergency mode and I don’t know what to do.
I have no idea what you did to your system, but /etc/rc.conf is the configuration file for the runit init system. Arch uses systemD as its init system. If you use vim or nvim to open a file. It will only open it if the file exists. Otherwise it will create the file
So when you said,
It was not empty. The file did not exist. You created the file by pasting those lines into it and saving it.
Systemd should automatically handle that for you without you doing anything other than installing the correct packages. The arch wiki page for virtualbox is here https://wiki.archlinux.org/title/VirtualBox
It says you just needed to install virtualbox then install the correct kernel modules package depending on which kernel you are using. In your case that would be the virtualbox-host-dkms package for the zen kerenel. Of coure in order to use dkms you need to have the linux-zen-headers package installed as well.
Furthermore from what I am reading it says in order to access host usb devices inside of the vm you needed to add your user to the vboxusers group. Give me a minute through read through the logs.
Based on the provided logs I was unable to find out what the problem was, but from what I saw it did not appear related to the virtualbox stuff. During the boot up process just before it drops you into the emergency shell. Do you see any kind of error?
If it’s really emergency mode, meaning the partitions are not mounted and you can’t access /etc, it’s easier to boot in Live USB, delete rc.conf in /etc and reboot your computer.