How to use mkntfs, I get "not a block device"

Kevin Oberman rkoberman at gmail.com
Fri Feb 6 01:54:12 UTC 2015


On Thu, Feb 5, 2015 at 1:39 PM, O'Connor, Daniel <darius at dons.net.au> wrote:

>
> > On 6 Feb 2015, at 06:03, Thomas Mueller <mueller6724 at bellsouth.net>
> wrote:
> >
> > In running
> > mkntfs -F /dev/gpt/SeaExp1-03
> >
> > I got (do I need to be concerned?)
> >
> > root at amelia:/usr/ports # mkntfs -F /dev/gpt/SeaExp1-03
> > /dev/gpt/SeaExp1-03 is not a block device.
> > mkntfs forced anyway.
> > The partition start sector was not specified for /dev/gpt/SeaExp1-03 and
> it could not be obtained automatically.  It has been set to 0.
> > The number of sectors per track was not specified for
> /dev/gpt/SeaExp1-03 and it could not be obtained automatically.  It has
> been set to 0.
> > The number of heads was not specified for /dev/gpt/SeaExp1-03 and it
> could not be obtained automatically.  It has been set to 0.
> > Cluster size has been automatically set to 4096 bytes.
> > To boot from a device, Windows needs the 'partition start sector', the
> 'sectors per track' and the 'number of heads' to be set.
> > Windows will not be able to boot from this device.
> > Initializing device with zeroes:   0%
> > 100% - Done.
> > Creating NTFS volume structures.
> > mkntfs completed successfully. Have a nice day.
> > root at amelia:/usr/ports #
>
> So long as you don't want to do boot Windows from it, it should be fine.
>
> I imagine the port could be fixed to fetch those but I guess no one has
> bothered.
>
> > It took many hours, partition size was 500 GB, I let it run while I was
> in bed.
>
> I forgot - it does a full format (i.e. zeroes every sector) by default -
> if you pass -f it will do a quick format instead (see the man page)
>
> --
> Daniel O'Connor
> "The nice thing about standards is that there
> are so many of them to choose from."
>  -- Andrew Tanenbaum
> GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
>
>
I might also suggest an init job to unmount all fusefs file systems at
shutdown. It appears that the fuse daemon may exist before volumes are
unmounted. I was having to do a disk repair fairly often to fix issues with
both NTFS and ExFAT volumes after updating them and shutting down the
system with them still mounted.

I added the following init script to /usr/local/etc/rc.d. Since then, I
have not had a corruption of an NTFS system. I am not currently using ExFAT.

#!/bin/sh
#

# PROVIDE: unmount-fuse
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown nostart

. /etc/rc.subr

name="unmount-fuse"
start_cmd=":"
stop_cmd="fuse_stop"

fuse_stop()
{
    local err fusefs

    # unmount fuse filesystems
    err=0
    echo -n 'Unmounting all fusefs filesystems...'
    for fs in `df | grep ^/dev/fuse | cut -f6 -w` ; do
    echo -n " $fs"
    umount $fs
    done
    echo ""
}

load_rc_config $name
run_rc_command "$1"

--
Kevin Oberman, Network Engineer, Retired
E-mail: rkoberman at gmail.com


More information about the freebsd-ports mailing list