'Error mounting partition' while installing FreeBSD 9

Hello,

I'm trying to install FreeBSD 9 on my old PC to use it as a small file server. I've chosen FreeBSD because I really like zfs and its snapshot system. The problem is that I cannot get it installed.

I've 3 harddisks in the system. 2x 1TB SATA disks which I'll use for storage. 1x 80GB IDE disk which will be used for the operating system. The problem is that I cannot get FreeBSD installed on the 80GB IDE disk. The error message which is shown during install is the following:

Code:
Error mounting partition /mnt: 
mount: /dev/ada0p2: Operation not permitted

I've googled a lot to find a solution and tried the following things:

- Clear begin and end of disk to remove partition table (dd if=/dev/zero of=/dev/ada0)
- Clear complete disk with Dariks Boot And Nuke (http://www.dban.org/)
- Remove partition tables with gpart (http://daemon-notes.com/articles/install/part-fs/prepare)
- sysctl kern.geom.debugflags=16 (http://daemon-notes.com/articles/install/install-zfs/begin)
- I even installed another IDE 40GB disk but it resulted in the same problem.

Any ideas to solve this problem because I'm struggling with it for weeks now and I'am not getting any further...

Thanks in advance! Erwin
 
Installing to a new disk entails more than one problem for me usually, but the following commands may lead to other threads suggesting workarounds for what you have tried...

Suggestion(s) below, but depending upon how/where the install is being tried from
they may fail also. (Practically no experience with gpart; )
The method may work in a less-than-fifty-percent number of instances in v9 vs v8...
and I may be forgetting details. I muddle through it each time.

Code:
fdisk -v -f file /dev/ada0
(though I'd peruse /dev carefully to avoid the wrong target disk
(file:)
p 1 165 * 70G
Then one can *if* that works, newfs or
Code:
 man gjournal
do other stuff.
Or one can try sysinstall from v9... or a live cd.
More details about how you are trying to install?
 
I just use sysinstall from the install CD. I've tried custom install now. I'm using the entire disk to install FreeBSD when I create the partitions. This goes well and I can write them to disk. For the slices I use the auto option but when I write them to disk I get the erro message:

Code:
Unable to add /dev/ada0s1b as a swap device: No such file or directory

I've tried fdisk but it did not help. Any other suggestions/options?
 
Don't use sysinstall. The new installer for FreeBSD 9 is bsdinstall. Maybe that's what you meant, but from what you say, it does not sound like that.

If you are somehow using sysinstall, choosing "Write" is not correct and can cause the swap error. After setting up the partitions, just Quit and it will write them.
 
I've tried sysinstall and bsdinstall. Bsdinstall quits with this error and sysinstall gives the same error. I've tried both writing (W) the partitions and directly quitting it. Both no sucess...
 
If you are manually creating partitions in bsdinstall, don't give the swap partition a mount point. It may help to disconnect the SATA drives for now.

On the initial bsdinstall screen, go to a shell and destroy any partition information (this is one reason to disconnect other drives if they have data you want to keep):
# gpart destroy -F ada0

Do not go straight into the installer after that, but restart and then try the installer.
 
Back
Top