Problem mounting NTFS

I have an SD card. Here is the output from gpart show.
Code:
=>  63  62333889  da0  MBR  (30G)
  63  10485720  1  ntfs  (5.0G)
  10485783  51848169  - free -  (25G)
To create this I used these commands.
Code:
gpart create -s mbr da0
gpart add -s 5G -t ntfs da0
newfs_msdos -F32 /dev/da0s1

So far everything seems so good. No errors when creating the partition. The problem happens when i try and mount it.
Code:
# ntfs-3g /dev/da0s1 /mnt
NTFS signature is missing.
Failed to mount '/dev/da0s1': Invalid argument
The device '/dev/da0s1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
And this is the output while trying to ntfsmount and then from ntfsfix
Code:
Failed to startup volume: Invalid argument.
Failed to mount '/dev/da0s1': Invalid argument.
The device '/dev/da0s1' doesn't have a valid NTFS.
Maybe you selected the wrong device? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?
Mount failed.

Code:
Mounting volume... Failed to startup volume: Invalid argument.
FAILED
Attempting to correct errors... FAILED
Failed to startup volume: Invalid argument.
Volume is corrupt. You should run chkdsk.

I also tried mounting using mount to mount the partition.
Code:
# mount -t ntfs /dev/da0s1 /mnt
mount: /dev/da0s1: Operation not supported by device
Fuse is enabled in etc/rc.conf
Code:
# cat /etc/rc.conf | grep fuse
fuse_enable="YES"
I am able to mount other devices. So I believe it is an error in the creation process. If there is a more suitable section for this thread please place it there.

I have tried to remove sysutils/ntfs-3g and replace it with sysutils/ntfsprogs to no avail. I read a post from here:
https://javaz.org/2012/02/freebsd-create-ntfs-partition/
These are the steps I took when using ntfsprogs
Code:
gpart create -s mbr da0
da0 created
gpart add -t fat32 da0
da0s1 added
mkntfs -L test /dev/da0s1
Cluster size has been automatically set to 4096 bytes.
Initializing device with zeroes:  99%Failed to complete writing to /dev/da0s1 after three retries.
This should not happen.
 
sysutils/fusefs-ntfs contains mkntfs, too. Can you try it with that version? sysutils/ntfsprogs is just an older version of sysutils/fusefs-ntfs.

What's your goal anyway? It does not sound like you need NTFS specifically?

newfs_msdos -F32 /dev/da0s1 creates a FAT32 filesystem which you can mount with mount_msdosfs(8). If you just need something that's compatible with Windows and FreeBSD out of the box that's what you should use IMO.
Yes but that didn't work either. It doesn't seem to create a FAT32 filesystem on the device..
Code:
#gpart create -s mbr da0
da0 created
#gpart add -t fat32 da0
da0s1 added
#newfs_msdos -F32 /dev/da0s1
/dev/da0s1: 62318528 sectors in 973727 FAT32 clusters (32768 bytes/cluster)
BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=62333838 FATsecs=7608 RootCluster=2 FSInfo=1 Backup=2
Mounting it
Code:
#mount_msdosfs /dev/da0s1 /mnt
mount_msdosfs: /dev/da0s1: Invalid argument

# ntfsmount /dev/da0s1 /mnt
Failed to startup volume: Invalid argument.
Failed to mount '/dev/da0s1': Invalid argument.
The device '/dev/da0s1' doesn't have a valid NTFS.
Maybe you selected the wrong device? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?
Mount failed.
I don't see what I'm doing wrong here. Any ideas?

EDIT:
From following the same steps but instead using mkntfs from sysutils/fuse-ntfs I received:
Code:
# mkntfs /dev/da0s1
/dev/da0s1 is not a block device.
Refusing to make a filesystem here!

I tried the same steps using newfs_msdos -F32 /dev/da0s1 on a USB stick instead of an SD card and it worked perfect. Maybe the SD card is bad?
 
Last edited:
I just replicated what you did and it works here (with either newfs_msdosfs -F32 /dev/da0s1 or mkntfs -Ff /dev/da0s1). Maybe your SD card is faulty? Do you see any error message in dmesg?

EDIT: Too late... Same thought as you.
 
Hm, must be the SD card then, it is safe to say that after we have both replicated it with no errors on devices.
 
Still having a bit of trouble with this! I am not able to mount any NTFS devices at all. Same old error message...
ntfs-3g /dev/da0s1 /mnt
Code:
# ntfs-3g /dev/da0s1 /mnt
NTFS signature is missing.
Failed to mount '/dev/da0s1': Invalid argument
The device '/dev/da0s1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
ntfsfix
Code:
# ntfsfix /dev/da0s1
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Error reading alternate bootsector: Invalid argument
NTFS signature is missing.
Unrecoverable error
Volume is corrupt. You should run chkdsk.
I believe it has to be a problem with the program here on FreeBSD. On Debian it mounts just fine, after taking those steps. It is a brand spankin' new USB.
 
Put the disk on Debian and just reformat it with gparted. That's I do when I want to format a disk. Yes. Is against FreeBSD. I know. But gparted is an extremely useful tool. The reason that gparted doesn't ported yet is wrong. Just because doesn't support UFS and ZFS filesystems. But in reality every usb and external HDD we always format it on NTFS just because the files we want to take with us to our friends home must be in NTFS. Our friends, don't run FreeBSD. Not even Linux. So the HDD must be in a compatible FS. That's only one FS. NTFS! And there is only one easy and powerful tool for that. Is gparted!
PS: ntfs-3g working here perfect
 
Put the disk on Debian and just reformat it with gparted. That's I do when I want to format a disk. Yes. Is against FreeBSD. I know. But gparted is an extremely useful tool. The reason that gparted doesn't ported yet is wrong. Just because doesn't support UFS and ZFS filesystems. But in reality every usb and external HDD we always format it on NTFS just because the files we want to take with us to our friends home must be in NTFS. Our friends, don't run FreeBSD. Not even Linux. So the HDD must be in a compatible FS. That's only one FS. NTFS! And there is only one easy and powerful tool for that. Is gparted!
PS: ntfs-3g working here perfect
If the portable data is important to you I would advise against using FUSE based file systems on FreeBSD, specifically sysutils/fusefs-ntfs. I've already lost data a few times on flash media due to this port. FAT32, to my knowledge, is generally the only reliable and non-network based file system to use for portability between FreeBSD and Windows at this time. Having said that, I do sometimes use sysutils/fusefs-exfat anyway from time to time for unimportant things.
 
FAT32 has a very big disadvantage. Cannot write files bigger than 2 GB. So if you want to copy a 4gb movie, you can't
True, which is why I do use sysutils/fusefs-exfat from time to time. However, when I do, I always copy the data twice; once on machine elsewhere on the disk first just in case , and then to the flash/external drive. I never just move the files to the flash/external drive. So far I haven't had problems with EXFAT, but I still don't trust it. Having a separate small file server using samba makes life little bit easier when using multiple operating systems in the same house :)
 
On the same house I don't have problem. I don't have Windows machine and my data is on my NAS... FreeNAS :) using NFS or FTP protocol or SSH sometimes :)
 
Back
Top