# "startx" on VirtualBox leads to a Critical Error



## bigPAPAtony (Jun 4, 2017)

When it comes to using freeBSD, I'm a fetus. 
I apologize if the title doesn't even make sense.

I'm trying to install freeBSD (with a GUI) on Virtual Machine, and I'm following this tutorial on YouTube:





I followed its exact instructions, but when it came to starting up the X Windows GUI (I believe?) my VirtualBox says that a fatal error has occurred. The part of the tutorial that my virtual system crashed was @ 13:19 while trying to execute "startx"

I realize this is a very vague, stupid question and answering it will require one to go out of there way to find a solution, but if anyone is willing to help I'd greatly appreciate it. This is my third re-try of following the tutorial, and my lack of knowledge with freeBSD makes it hard to find exactly what I'm looking for to solve my problem. Once again, I'd appreciate any help.

Summary of the issue:
Installing freeBSD using VirtualBox using a freeBSD boot only .iso. Packages were installed for Windowmaker, rox-filer, Sakura, FireFox, zsh (shell), gedit, and xorg. After the installation process, attempting to "startx" while in the zsh shell leads to my system crashing.


----------



## derekschrock (Jun 4, 2017)

I didn't watch the video but did you install emulators/virtualbox-ose-additions?


----------



## bigPAPAtony (Jun 4, 2017)

derekschrock said:


> I didn't watch the video but did you install emulators/virtualbox-ose-additions?


logged in as root
typed in the following command:  pkg install emulators/virtualbox-ose-additions
after installing, 
I rebooted the system, logged back into as a user,
typed "startx" into my zsh shell, but still get the critical error and my system crashes. 

Here is what the pop-up message looks like, for reference:


----------



## derekschrock (Jun 4, 2017)

I'd also take a look at /var/log/Xorg.* and /var/log/messages.

Are you sure you're using the vbox X11 driver?  Look at /etc/X11/xorg.conf or /etc/X11/xorg.conf.d/*.  Otherwise create an xorg.conf and hope it finds the proper driver for the hardware it detects: `Xorg -configure`

Also how much video memory are you providing the VM?


----------



## tobik@ (Jun 4, 2017)

bigPAPAtony said:


> Installing freeBSD using VirtualBox using a freeBSD boot only .iso.


Which image and FreeBSD version are you using?


----------



## bigPAPAtony (Jun 4, 2017)

derekschrock said:


> I'd also take a look at /var/log/Xorg.* and /var/log/messages.
> 
> Are you sure you're using the vbox X11 driver?  Look at /etc/X11/xorg.conf or /etc/X11/xorg.conf.d/*.  Otherwise create an xorg.conf and hope it finds the proper driver for the hardware it detects: `Xorg -configure`
> 
> Also how much video memory are you providing the VM?


Sorry for the late reply. While logged in as root, (I'm not quite sure what I was exactly looking for) but I typed in "/var/log/Xorg.*" ; then "/var/log/messages"; then "/etc/X11/xorg.conf" ; And for all of them I got a message that read close to: Permission Denied or Access Denied (while logged in as root user).

I'm using my max capable Video Memory that I'm allowed to:  128 MB



tobik@ said:


> Which image and FreeBSD version are you using?



I'm using the following: FreeBSD-11.0-RELEASE-amd64-bootonly.iso (only for installing the OS)
I also have the actual disc iso installed on my physical computer, if need be; but I have never "inserted it" into the VirtualMachine


----------



## derekschrock (Jun 4, 2017)

bigPAPAtony said:


> Sorry for the late reply. While logged in as root, (I'm not quite sure what I was exactly looking for) but I typed in "/var/log/Xorg.*" ; then "/var/log/messages"; then "/etc/X11/xorg.conf" ; And for all of them I got a message that read close to: Permission Denied or Access Denied (while logged in as root user).



I was implicitly saying you should open them in a text editor such as vi to see if there's anything that stands out from the OS level why the VM crashed


----------



## derekschrock (Jun 4, 2017)

Also, if it wasn't clear /var/log/Xorg.* would be all files that match that sh() glob (~wildcard) so you might find /var/log/Xorg.0.log or /var/log/Xorg.0.log.old or /var/log/Xorg.N.log etc


----------



## Deleted member 48958 (Jun 4, 2017)

No need for VirtualBox, it is buggy.
Just remove Window$ or macO$  and install it on your real hardware. 
You won't regret.


----------



## debguy (Jul 17, 2017)

^^ i think you WOULD regret it if it is your "main PC" and you need to use it to ie get homework done (which i suggest you finish before messing with BSD).  and you should try a used Apple off ebay (has small bsd userland) and or Win10 before jumping into freeBSD so you have a somthing to compare your experience to.

best bet is get yourself a used machine that "runs BSD easily for most" (see HCL hardware compatibility list) and ask around

now your in a position to completely mess up a box (possibly damage the hardware) while installing virtual boxes WITHOUT disrupting your "normal life"

furthermore - i'd run BSD on real hardware (spare hardware).  it'll be far faster and less complicated than setting up virtual boxes which ultimaltely need to support the hardware.

if you insist on virtual, make sure your hardware has the hardware features your virtualbox is trying to use (like Hyper-V)

don't be fooled.  today's new machines do not necessarily support BSD or Linux even if you "delete the original OS" off them.  they are locking some of them down these days.


----------



## debguy (Jul 17, 2017)

i've been wanting to try FreeBSD myself, i'm dissed by newer Debian i long used (compat issues, virus issues, etc), but my alternate is to use Apple BSD userland (and i can compile some bsd stuff in it).  it's tough to allocate time to install FreeBSD when i have some freeBSD, and have a %100 working desktop 24/7 that has most features the iphone has plus PC features.  i'm sure win10 users would have a similar story.  i wouldn't install freeBSD today unless i suddenly got more time or had some financial goal to do so.  (but i *want* to do it, even BSD 4.3, always will)


----------



## SirDice (Jul 17, 2017)

When it comes to the VirtualBox driver you need to make absolutely sure the kernel version is the exact same version as the emulators/virtualbox-ose-additions package was built for. The official packages are always built using the _latest_ FreeBSD release patch version. So make sure to run `freebsd-update fetch install` to get your system updated. Also make sure you're using the latest packages and not the quarterly packages (check with `pkg -vv`). 

If the kernel module of VirtualBox is built for, say, 11.0-RELEASE-p6 and you're running 11.0-RELEASE-p1 the modules will fail to load (those failures are easily overlooked). The services will still try to start but starting Xorg will cause the VM to panic or simply reboot.


----------

