# FreeBSD 9.1-RELEASE amd64 doesn't boot on Virtualbox 4.2.12



## Saija (Apr 18, 2013)

Hi all,

I'm running *U*buntu 12.04 *P*recise *P*angolin x64 with Virtualbox 4.2.12 amd64. *W*hen *I*'m trying to install Free*BSD* 9.1-RELEASE amd64 using the bootonly ISO image an error image appears:


```
FATAL: int13_harddisk_ext: function 42. Can't use 64bits lba
```

*T*he configuration on virtualbox is as follows:

SYSTEM:
1024MB RAM (base memory)
chipset PIIX3
IO APIC - CHECKED

STORAGE:
type - PIIX4

The rest of the configurations as defaults.

Thank you for your time and keep the good work!


----------



## wblock@ (Apr 18, 2013)

Did you select FreeBSD (64 bit) when creating the VM?


----------



## kpa (Apr 18, 2013)

Try with a different HD controller chipset.


----------



## Saija (Apr 18, 2013)

VirtualBox doesn't give that option when *I* created the virtual machine, only "FreeBSD" option appears


----------



## Saija (Apr 18, 2013)

I just finished testing every chipset option versus every HD controller option and the results are bad:


```
________________________________________________________________________
CHIPSET                HD Controller            Result
________________________________________________________________________
ICH9                   ICH6                     Doesn't boot
ICH9                   PIIX3                    Doesn't boot
ICH9                   PIIX4                    Doesn't boot
PIIX3                  ICH6                     Doesn't boot
PIIX3                  PIIX3                    Doesn't boot
PIIX3                  PIIX4                    Doesn't boot
```

*I*'m suspecting there's some bad combination of *U*buntu/*V*irtualBox here. *I*'m running *U*buntu 12.04 precise *P*angolin with the "3.2.0-40-generic (#64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013)" kernel and *I* just installed the *V*irtualBox from virtualbox-4.2_4.2.12-84980~Ubuntu~precise_amd64.deb, is this combination ok?

*T*hanks!


----------



## wblock@ (Apr 18, 2013)

Select New, set Type to BSD, set Version to FreeBSD (64-bit).

If it doesn't have that option, maybe you have an i386-only version of VirtualBox.  Or, come to think of it, maybe your host hardware can't do 64-bit.


----------



## Saija (Apr 18, 2013)

Hi @wblock@, searching on the net I found this Ubuntu Forums post which says something about the hardware not being able to run 64 bits VMs, I checked the flags my processor supports and they say:
	
	



```
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm
```
As the UbuntuForum posts there's no VMX on my flags so I just decided to download the boot only ISO image for i386, which runs fine on my VirtualBox. Right now I'm downloading the txz files and awaiting to get a brand new virtual machine running FreeBSD.

Thanks to all for the help and time.


----------



## sobomax@ (Jul 26, 2015)

The problem there is that VB's BIOS is not implementing 64-bit LBA at all. What makes it even worse is that it panics when request for the block above 2TB is made, and using GPT label guarantees you hitting this condition, since backup GPT is stored at the end of the volume. I've started a little project to fix that thing up by adding proper support into the VirtualBox BIOS. So far, SCSI devices should be working (either LSI or BusLogic). I'll work on the SATA / IDE in the next day or two.

https://github.com/sobomax/virtualbox_64bit_edd/compare/virtualbox_4_3_30...master

There is a long-standing bug in the VB's bug tracking system.

https://www.virtualbox.org/ticket/7415


----------



## sobomax@ (Jul 27, 2015)

The code seems to be 100% feature complete. I've tested booting FreeBSD off all supported virtual adaptors (SCSI, SAS, ATA and SATA) and it seems to be DTRT now. FreeBSD boots happily off 8TB GPT drive now. I'll clean code a bit, port it to the latest VB and submit a patch into bug #7415.


----------



## sobomax@ (Jul 31, 2015)

If someone is desperate, the patches for 4.3.30 and 5.0.0 are in the ticket (https://www.virtualbox.org/ticket/7415). Working with the VB team to get them integrated now.


----------

