NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: automount usb





On 11/25/26 17:31, adr wrote:
On Wed, 25 Nov 2026, Jeff wrote:
#  disklabel sd0
#  /dev/rsd0:
type: SCSI
disk: DataTraveler Max
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 244198
total sectors: 500118192
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0        # microseconds
track-to-track seek: 0    # microseconds
drivedata: 0

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
d: 500118192         0     unused      0     0        # (Cyl.      0 - 244198*) e: 500113408      2048       NTFS                     # (Cyl.      1 - 244196)
disklabel:  boot block size 0
disklabel:  super block size 0

# mount /dev/sd0e /mnt
mount_ntfs: /dev/sd0e on /mnt: Invalid argument

# mount -t msdos /dev/sd0e /mnt
mount_msdos: /dev/sd0e on /mnt: Invalid argument

mount_msdos is for mounting fat partitions. Don't you see the NTFS
string under fstype? From where did you get that the usb disk
contained a fat partition?

Netbsd has mount_ntfs with useless write support. I recommend you
to install filesystems/fuse-ntfs-3g, and do as root:

# PERFUSE_BUFSIZE=135168 ntfs-3g /dev/sd0e /mnt

All I've been able to find in the guide is how to wipe out the existing data on a USB drive with dd (to create a bootable drive). I'll look again, but I've looked more than once...

The guide tells you how to partition a usb disk and create a fat
partition on it; and then how to mount it. If you don't need to
create it, just pay attention to the part of mounting it. The
problem as I said before, is that all is still mbr centric.

But the problem in your case is that you are trying to mount a
ntfs partition like if it were a fat one.

Regards,
adr

I do appreciate the advice, and I apologize for initially identifying the drive as FAT. I have never been a Windows user, and everything Windows has always been FAT-something to me. However, when I ran the commands above I did notice the NTFS, of course. And you may notice that the first mount command that I tried did not specify a type, and allowed mount to, correctly, identify the drive as NTFS--and then refuse to mount it.

I will try the fuse solution when I get a chance. At the moment I'm dealing with the fallout of my main Debian box which I was trying to move away from dying suddenly, so this is not my top priority.

Cheers,
Jeff


Home | Main Index | Thread Index | Old Index