# FreeBSD 9.1 causing BIOS to hang



## amity88 (Mar 2, 2013)

Hi! 

This is very similar to this thread here (Install of 8-3-RELEASE renders hard drive unusable) except that 8.3 works fine but 9.x doesn't.

The computer is an old P4 2.4GHz on a MSI P4VM800 motherboard, it's got an Award BIOS. The problem is that whenever bsdinstall partitions my drive (I've tried both MBR and GPT), the computer would hang at the POST at the next reboot.

The only way to fix it was to pull out the HDD power cable, turn on the PC, power up the drives manually after booting and delete the partitions. Could you guys give me some pointers on how I could get 9.x to partition it properly? Or is the support of this hardware being phased out?


----------



## kpa (Mar 2, 2013)

If it hangs with both GPT and MBR it's a sure sign of some kind of BIOS bug. Try to disable all unnecessary devices in BIOS settings, serial ports, extra IDE/SATA controllers etc. See if there's a BIOS update for the motherboard available.


----------



## amity88 (Mar 2, 2013)

I've tried that, didn't work, I eventually reset the BIOS, that didn't fix it either. The problem is FreeBSD 9 specific (most likely the bsdinstall's partitioner), it seems to work fine with FreeBSD 8.3's sysinstall, linux & windows xp.

Also, I can't enter the BIOS setup till I delete the partition tables and restart.


----------



## Speedy (Mar 2, 2013)

Sounds like a real crappy BIOS you have there, have you checked coreboot project?


----------



## wblock@ (Mar 2, 2013)

I can't think of how an MBR created by FreeBSD 9 would be different from one created by FreeBSD 8.  The bootcode, I suppose.  Make sure the BIOS does not have a "boot sector virus protection" setting enabled.


----------



## amity88 (Mar 2, 2013)

Well, it's a pretty old machine, I assembled it in 2003 (now it's a test machine of sorts) and I checked out the Coreboot project, neither the motherboard and the chipset are supported.

I'm running FreeBSD 8.3 on it right now, but what really bothers me is the problem coming back when I'd have to upgrade


----------



## amity88 (Mar 2, 2013)

@wblock,
 I haven't tried that yet, I'll try it. I did see an option in there for protecting the BIOS, write protection I think. If it was the virus protection code, shouldn't it just display a warning instead of just hanging like that?


----------



## formateur_fou (Mar 2, 2013)

amity88 said:
			
		

> The problem is FreeBSD 9 specific (most likely the bsdinstall's partitioner)


Why don't you upgrade from 8.3 to 9.1 using freebsd-update ?
Your partitions won't be changed, and you'll know if your assumption is correct.


----------



## kpa (Mar 2, 2013)

This is just a wild guess but could it be that the FreeBSD 9 installer violates some odd alignment requirement (CHS related) that usually does not cause a problem on any newer machines but breaks on machines that had BIOSes written with that requirement in mind?


----------



## wblock@ (Mar 2, 2013)

Most likely is that the BIOS is looking for a magic value on the disk and misidentifying FreeBSD as something else.  Diagnostic partition, motherboard manufacturer special disk, something like that.  Writing the 8.x bootcode onto a 9.x MBR system would then work.  Of course that would have to be done with another computer.


----------



## amity88 (Mar 3, 2013)

I've tried installing FreeBSD9 again, it works, almost. In the BIOS, the virus check was disabled by default, I changed the harddrive autodetect to manual and drive type to large. The system boots fine but there is a new problem, the installer reboots the system when about 60% of the port tree has been extracted and leaves the partition corrupt.

@kpa & wblock, I think it reads some portion of the disk that has been modified by BSD to identify CHS values during autodetect. I should test to see if GPT would work now.


----------



## amity88 (Mar 3, 2013)

Update: With the manual BIOS setting, the PC seems to boot with a GPT partition as well. The installer still reboots halfway into the installation though.


----------



## amity88 (Mar 3, 2013)

update 2: With the GPT partitioning, it boots fine now but the installer shows the following error

```
READ_DMA. ACB: c8 00 2e 9d a88 44 00 00 00 00 01 00
 CAM status: Command timeout
 Retrying command
 READ_DMA......
```

The same error is shown on subsequent boots with the cd


----------



## wblock@ (Mar 3, 2013)

It could be more than just the BIOS.  The read error could be a controller problem, or an actual error on the drive.  When was the last time you ran a SMART test on it?


----------



## amity88 (Mar 3, 2013)

I actually ran a long SMART test and a destructive write test with badblocks before the installation, like 4 or 5 days ago. The first time it hanged, I wasn't aware of the GPT-BIOS problem so went and bought a brand new disk. Now I use both, and they have passed all tests I've done so far.

This is the first time I got that read error, after I experimented with the GPT partitioning again. Let me check the cd's sha256sum and try the manual paritioning method you mentioned at your webpage. I have a feeling that something is wrong with the CD itself, I'll post any progress with that over here.


----------



## amity88 (Mar 3, 2013)

update: Ok, so the cd was fine... I tried installing 9 a few more times with the MBR scheme, it's the same old problem. It seems that 9 does something to the disk that messes it up, it restarts the PC midway into file extraction (extracting ports 68% or so) and thereafter it hangs during post. I have to then zero out the disk before I can use it again, I don't think it's a hardware problem because the other OSes (including FreeBSD 8.3) installs and runs fine.


----------

