# Cannot partition hard disk



## jonfr (Jun 30, 2013)

For some reason I cannot partition the hard drive in my new server computer (I did buy it used). This is a Dell System Workstation 390 computer. The BIOS states this options when it comes to the hard drive.


```
AHCI- RAID Autodetect / ATA - RAID Autodetect / RAID On
```

I have zero interest in using RAID option. I do not RAID hard drives on any of my computers. I get a lot of this messages when I boot FreeBSD.


```
GEOM_RAID: NVIDIA-1 Created

Root mount waiting for: GRAID-NVIDIA-1

GEOM_RAID: Forced timeout NVIDIA-1
```

It is not all of the error message, it goes too fast for me to read and write down here.

When I try to partition the hard disk. I get this error message.


```
Error

Operation not permitted. geom 'ada0'
```

When I select GPT partition table I get the same error as above. There is a Windows XP partition on the hard disk, but I cannot delete it. I want to turn off the RAID setting on the computer, if I can. Since I am not going to be using it. I have been searching the BIOS for that setting, but I have not had any luck so far.

Thanks for the help.


----------



## DutchDaemon (Jun 30, 2013)

There's usually something like a Ctl-R (or M, or S ..) option printed right before or after the BIOS, to get into the RAID setup. You should be able to revert to regular AHCI.


----------



## jonfr (Jun 30, 2013)

This is _a_ Dell Precision WorkStation 390 computer. I did try the Ctl-R, M or S options but it didn't work in _the_ first try. Using F12 didn't give me any option to turn off RAID for good.

The BIOS is now set to this option:.


```
ATA - RAID Autodetect
```

From what I have been reading, that is _the_ "normal" mode for the hard drive. It does not seem to work and I do not know why.


----------



## jonfr (Jun 30, 2013)

I have been searching for this issue and I found this. This might be the issue, at least when it comes to deleting partition on the hard disk. I am not sure on the RAID messages that I am getting.

http://forums.freebsd.org/showthread.php?t=26281


----------



## wblock@ (Jun 30, 2013)

There are two problems.  The first is that the BIOS RAID is enabled.  That has to be turned off.  Dell BIOS setup is usually F2, but as @DutchDaemon says, sometimes there's a special keypress that has to be done when the RAID screen is shown.  If there is a choice, set it to AHCI non-RAID.

Second, there is RAID metadata written to your drive.  FreeBSD 9.1 has the graid(8) kernel module built into the GENERIC kernel.  It detects the metadata and says "hey, this is a BIOS RAID disk, I'll use it".  To get around that, boot the install disk.  Choose Shell.  Then:

```
# graid list
# graid remove [I]device[/I]
```

Replace _device_ with the names of the devices shown from the list command.  After all the devices are removed, reboot and do normal install.

The graid(8) issue is talked about in this thread.


----------



## jonfr (Jun 30, 2013)

I have been reading the manual for the computer. It seems that RAID is off already. Using Ctrl+i does not work, so the RAID BIOS does not seem to be on.

I have now switched the hard drive setting to


```
AHCI- RAID Autodetect
```

Using the commands to clear the RAID metadata gives me nothing (no device). I am going to test removing the current Windows XP partition and see if I can install on a clear hard drive with no partition on it.


----------



## jonfr (Jun 30, 2013)

The complete view of the error text that I get when I try to run FreeBSD set-up disk can be seen here on this two pictures.

http://www.jonfr.com/pictures/


----------



## wblock@ (Jun 30, 2013)

"Autodetect" may be a mistake.  Disabled would be better.

The disk was part of a striped array at some point, and the metadata is still there.  Please show the output of `graid list`.


----------



## jonfr (Jun 30, 2013)

I did manage to install Kubuntu Linux on the computer. After that, the RAID messages do not appear in the boot messages from FreeBSD. Just deleting the Windows XP partion was not enough.


----------



## jonfr (Jun 30, 2013)

wblock@ said:
			
		

> "Autodetect" may be a mistake.  Disabled would be better.
> 
> The disk was part of a striped array at some point, and the metadata is still there.  Please show the output of `graid list`.



There was none output from `graid list`. It did just show blank when I did run the command. I do not know why that was, but this is no longer a issue as I explain in a comment here above.


----------



## jonfr (Jun 30, 2013)

This issue has been solved. I am now installing FreeBSD 64-bit on this computer. The issue was the hard drive, not a BIOS setting.


----------



## wblock@ (Jun 30, 2013)

Good!  Did you replace the hard drive, or wipe out the metadata by installing something else on it?


----------



## jonfr (Jun 30, 2013)

wblock@ said:
			
		

> Good!  Did you replace the hard drive, or wipe out the metadata by installing something else on it?



I had to wipe the hard drive with Linux in order to install FreeBSD on it. That was the only way to delete the metadata. Using just the Windows XP installer to delete the partition did not work.

I now have _a_ working FreeBSD 64-bit installed on my new server. Now I just have to install needed programs and scripts to get everything working again. That is going to take few days.


----------



## wblock@ (Jul 1, 2013)

jonfr said:
			
		

> I had to wipe the hard drive with Linux in order to install FreeBSD on it. That was the only way to delete the metadata. Using just the Windows XP installer to delete the partition did not work.



Right, the metadata is at the beginning or end of the disk.  FreeBSD could have removed it also.


----------



## jonfr (Jul 1, 2013)

Not sure what it was, the commands given here did not work. So I did just go into testing mode and this is what did work in the end.


----------



## wblock@ (Jul 1, 2013)

Well, you never showed the error from `graid remove`.  But it also could be done with dd(1).


----------



## jonfr (Jul 1, 2013)

wblock@ said:
			
		

> Well, you never showed the error from `graid remove`.  But it also could be done with dd(1).



I did not get _anything_ from `graid list`, so I was unable to use `graid remove`.


----------



## wblock@ (Jul 1, 2013)

Sorry, I did not see that post before.  If I had seen it, I would have recommended using dd(1) to erase the first megabyte or so of the disk.


----------

