Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2007 15:25:11 -0400
From:      John Nielsen <lists@jnielsen.net>
To:        freebsd-questions@freebsd.org
Cc:        Aitor San Juan <asanjuan@bolsabilbao.es>
Subject:   Re: Installing a second hard disk
Message-ID:  <200703131525.11631.lists@jnielsen.net>
In-Reply-To: <1C03BB1950F15F48B9E9654E0EFA42CA049EE7@bb04.bolsabilbao.local>
References:  <1C03BB1950F15F48B9E9654E0EFA42CA049EE7@bb04.bolsabilbao.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 13 March 2007 13:05, Aitor San Juan wrote:
> Hi List,
>
> I am trying to install a secondary hard disk in a Intel-based PC
> with FreeBSD 5.4
>
> This secondary disk's capacity is 250 Gb. When I enter sysintall
> to try to format it and create a slice, FreeBSD says that the
> geometry of disk is not correct. I, then, type in the values detected
> by the BIOS as suggested, but FreeBSD still complains that those
> are not valid. FreeBSD sees the new disk as a disk of approx. 131 GB.
>
> So my question is: where is the problem? Is it that FreeBSD is not
> able to recognise such a big disk capacity?
>
> Any hint, suggestion, or web link would be highly appreciated.

Assuming the new disk is ad4, and you want a single FreeBSD slice/partition/FS 
covering the whole disk:

fdisk -BI /dev/ad4
bsdlabel -wB /dev/ad4s1
newfs -U /dev/ad4s1a

See the manpages for each command for more details. The -B flags aren't 
necessary if you never plan to boot from the new disk, but they don't hurt 
anything either. If you want multiple FreeBSD partitions you could run 
a "bsdlabel -e" after the first bsdlabel command above, and additional newfs 
commands as appropriate.

Continuing the example above, you could do:

mkdir /newdisk
mount /dev/ad4s1a /newdisk
echo "/dev/ad4s1a	/newdisk	ufs	rw	2	2" >> /etc/fstab

To both mount the new filesystem and have it mounted automatically at boot. 
See the fstab manpage for details about that. (You could of course use a text 
editor to modify fstab instead of the echo command above.)

JN



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703131525.11631.lists>