Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2012 22:27:27 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        "Ronald F. Guilmette" <rfg@tristatelogic.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Advanced Format Drive ?
Message-ID:  <alpine.BSF.2.00.1211272215360.62205@wonkity.com>
In-Reply-To: <44946.1354067414@tristatelogic.com>
References:  <44946.1354067414@tristatelogic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 27 Nov 2012, Ronald F. Guilmette wrote:

>
> In message <alpine.BSF.2.00.1211262232330.38529@wonkity.com>,
> Warren Block <wblock@wonkity.com> wrote:
>
>> On Mon, 26 Nov 2012, Ronald F. Guilmette wrote:
>>
>>> Starting sector 2048 is definitely a multiple of 4KB, so I am assuming
>>> that all I really need to do here in order to use this new drive as extra
>>> stroage for a FreeBSD system (assuming that I am happy with good old
>>> fashioned MBR style partitioning, which I am) is just:
>>>
>>>    newfs -U /dev/da1s1
>>
>> You should also change the partition type to freebsd or freebsd-ufs.
>> Offhand I'd guess they're both 0xa5, but have not looked.  Use 'gpart
>> modify'.
>
>
> Thanks Warren!  I confess that I hadn't even thought about that.  And as
> a result, the partition that I just backed up a substantial part of my
> system onto is still being listed as "ntfs", even though I have done
> the newfs to it and (thus) it is now actually a UFS partition... not NTFS.
>
> % gpart show /dev/da1
> =>        63  1953525104  da1  MBR  (931G)
>          63        1985       - free -  (992k)
>        2048  1953519616    1  ntfs  (931G)
>  1953521664        3503       - free -  (1.7M)
>
>
> I can still mount it as a UFS, no problem, so Im inclined to wonder what
> the type code on a partition is used for anyway.  (FreeBSD doesn't seem to
> care if a partition is marked as NTFS as long as it actually has a UFS
> filesystem in it.)

Mostly relevant when booting from that drive.  Still, it would be bad 
for some NTFS utility to helpfully attempt repair of a UFS filesystem.

> I tried to do as you suggest and change the partition type to freebsd-ufs,
> but there's a problem...
>
> # gpart modify -i 1 -t freebsd-ufs /dev/da1
> gpart: Invalid argument

da1 is the drive.  da1s1 is the first slice.

> (The error message "Invalid argument" is not terribly informative.  It
> doesn't even indicate which argument is to blame.  And I'm not sure if
> the index numbers that gpart uses start from 0 or from 1.  The man page
> doesn't say.)

Slice/partition number is the third column in the gpart output above. 
MBR slice numbering starts at one.

> P.S.  When doing the newfs, I actually ended up having to do:
>
>    newfs -U -f 4096 /dev/da1s1
>
> because I was doing this on an old 8.3 system, so the default frag size
> there was still set at 2048.



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