# Laptop will not boot past BIOS after FreeBSD 9.0 x86-64 install



## EvilRick (Feb 6, 2012)

I have an HP DV7T-2000 that has the 64-bit versions of Windows 7 Home Premium, Fedora 16, Ubuntu 11.10 and FreeBSD 9.0.

It has two, 250GB SATA disks.  The first has all the operating systems and the second is NTFS formatted with just "data".

The first drive has an MBR partition scheme laid out as so:

Primary Partition
~78GB Windows ntfs

Extended Partitions
~37GB Fedora 16 ext4
~37GB Ubuntu 11.10 ext4
~4GB linux swap

Primary Partition
~74GB FreeBSD ufs
~4GB freebsd-swap

Windows 7 was installed first, then Fedora, then Ubuntu.  Ubuntu installed GRUB2 as the boot loader and that's been fine.

FreeBSD was installed last and everything went without a problem until the reboot.  My laptop just sits at the BIOS screen.  I can't even get into the BIOS.  I've removed the power, battery, and CMOS battery and still can't get into the BIOS.

Any ideas why it won't boot past the BIOS?


----------



## EvilRick (Feb 7, 2012)

I removed the first hard drive and the laptop will allow me to get into the BIOS.

I used the installer to manually create the FreeBSD slices during the installation.  Does it write code that would render the drive unrecognizable to the BIOS?


----------



## EvilRick (Feb 7, 2012)

I think I found out what is wrong.

http://lists.freebsd.org/pipermail/freebsd-questions/2012-January/236949.html

During the manual creation of the slices I was not asked if I wanted GPT or MBR.  I think the installer chose for me.  Not cool.  :|


----------



## EvilRick (Feb 7, 2012)

I ended up hotplugging the drive druing POST and was able to boot from a flash drive with Ubuntu 11.10.  I removed the FreeBSD slices and reinstalled GRUB2.

I saw in another thread about using boot0cfg(8) and am going to try again since I know I can at least get back to square by repeating the above steps.

I've attached a screenshot to show the layout after the first install attempt.

[fingers crossed]


----------



## EvilRick (Feb 8, 2012)

*[solved]*

Success!

I think the problem is that during the install FreeBSD sets the 'boot' flag on the partition it's installed to.  If you notice in the image I uploaded above, the third partition has the boot flag set.

I did the hotplug while booting with gparted and was able to set the partition with Windows with the 'boot' flag.  I don't think Linux/UNIX really cares about the 'boot' flag.  (Correct me if I'm wrong.)

Anyway, I am able to get past POST and added a FreeBSD entry to GRUB2.  Now to install a GUI and other stuff.  I just hope I don't wreck anything as this is not an easy process to install.  I may have to resort to making a backup image! :i

Is there some log file or something I can send to a developer so they can see at what point the 'boot' flag is set?  Maybe this could be set as an option during the slice setup?


----------



## wblock@ (Feb 8, 2012)

EvilRick said:
			
		

> I think I found out what is wrong.
> 
> http://lists.freebsd.org/pipermail/freebsd-questions/2012-January/236949.html
> 
> During the manual creation of the slices I was not asked if I wanted GPT or MBR.  I think the installer chose for me.  Not cool.  :|



That message was also posted here, ISTR, and it has some mistakes.  The protective MBR of a GPT disk is bootable by a standard BIOS.  Or putting it the opposite way, a special BIOS is not needed to boot a GPT disk.

However, we've also seen that at least some BIOS setups are GPT incompatible.  Still not sure why, and it could be more than one thing going on.


----------



## EvilRick (Feb 8, 2012)

I don't think it's anything to do with GPT vs. MBR as I've used Windows 7 and diskpart to make the disk GPT and the machine would POST just fine.  I thought maybe it wrote some sort of code in some sector that the BIOS just didn't like.

Is it possible that when the 'boot' flag is set by the FreeBSD installer that it is also changing the layout of the disk somehow that it doesn't match what the BIOS sees?  I know that sounds strange, but I don't know what else would cause the machine to hang during POST like that.

If I did the install again and got the same result is there some sort of output that could be used that would shed some light?  Maybe a dd or something along those lines?


----------



## wblock@ (Feb 8, 2012)

The best thing would be to enter a PR documenting the exact steps it takes to recreate the nonworking setup and what it took to fix.


----------



## EvilRick (Feb 15, 2012)

I haven't submitted the report, but was able to test the install again and verify that I could fix the problem without having to hotplug the hard drive. After the installation is finished and you're prompted to reboot, I chose to enter the shell and ran:

[cmd=]gpart set -a active -i 1 ada0[/cmd]

Then after a reboot my machine boots normally.


----------

