DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1 Week Ago
wheelnut wheelnut is offline
Real Name: Michael
Port Guard
 
Join Date: Apr 2022
Location: Canada
Posts: 24
Default mount_ntfs: Invalid argument

[..Actually apparently completely solved.. ..or maybe not..]

Greetings.

Trying to mount a 1T SSD. The man pages seem to be down, so following this for now. I have actually found -some- things via the downloaded manual on this computer. They seem to be saying the same thing though. /mnt/samsung seems to have been created without incident.

Code:
eriadar# disklabel sd2
# /dev/rsd2c:
type: SCSI
disk: SCSI disk
label: PSSD T7 Shield  
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 121601
total sectors: 1953525168
boundstart: 0
boundend: 1953525168

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:       1953525168                0  unused                    
  i:       1953520065             2048    NTFS                    
eriadar# mount /dev/sd2i /mnt/samsung
mount_ntfs: /dev/sd2i on /mnt/samsung: Invalid argument
I have been using ubuntu now for ages, so I assume that the samsung was formatted, or written to using it. Actually, I think it was written using rsync, so maybe the original drive.. whatever. I think it is highly unlikely these external ssd's were formatted by any windows machine I ever had.

I am aware of this thread, but just looking at it gives me a head-ache, and my ssd is much smaller than his. If people here confirm that I really should try those solutions first, I'll give them a good hard look. The other thing on my list of options, so far, is to try the same thing with ghostBSD.

Checking out the suggestion to use ntfs_3g:

Code:
eriadar# pkg_add ntfs_3g
quirks-7.50 signed on 2025-04-08T14:05:06Z
ntfs_3g-2022.10.3: ok
eriadar# ntfs_3g /dev/sd2i /mnt/samsung
ksh: ntfs_3g: not found
[Note that the "tutorials" I found on ntfs_3g use it with doas. I have not yet foud a reason to use doas. I'm sure I will, eventually. But that might be why this isn't working..?]

..So I googled some more. I ended up here, where it suggests that my "NTFS" file system might actually be exFAT. More googling for exFAT finds this, where it suggests exfat-fuse.

Code:
eriadar# pkg_info -aQ exfat-fuse
exfat-fuse-1.4.0
eriadar# pkg_add exfat-fuse
quirks-7.50 signed on 2025-04-08T14:05:06Z
exfat-fuse-1.4.0: ok
eriadar# mount.exfat
FUSE exfat 1.4.0 (libfuse2)
Usage: mount.exfat [-d] [-o options] [-V] <device> <dir>
eriadar# mount.exfat -o uid=1000 /dev/sd2i /mnt/samsung
FUSE exfat 1.4.0 (libfuse2)
WARN: volume was not unmounted cleanly.
eriadar# mount.exfat /dev/sd2i /mnt/samsung             
FUSE exfat 1.4.0 (libfuse2)
WARN: volume was not unmounted cleanly.
..so now, if we assume (always dangerous) that I'm not off on a wild-goose chase, we have a bit more information on what is going on.

..Until I get some feedback, I think it's wisest to sit tight.

..well, fancy that.. it occurred to me that a warning was not an error. So maybe the last thing -did- actually work. I tried to see if I could see into the possibly mounted drive. I did an ls to see where I was so I could cd into the right place.. and apparently I was already there.

so.. then the question becomes, 1) all those other things I tried, why did they not work, what's going on? 2) is the last thing I did actually the right thing, and 3) what does it mean that the volume was not unmounted cleanly? is this a problem? what to do about it. ..yes, I can do more googling of all of it..

Edit: Trying now to unmount:

Code:
eriadar# umount /mnt/samsung
umount: /mnt/samsung: Device busy
I have also found, and am reading this. Ok, that link essentially answered all my questions, confirming, apparently, that the solution I found -is- indeed the correct one. And gave links for further explanations, which is fantastic. Unfortunately, I can't unmount.

Code:
eriadar# pwd                                
/mnt/samsung
eriadar# umount /mnt/samsung
umount: /mnt/samsung: Device busy
eriadar# mount.exfat-fuse /dev/sd2i /mnt/samsung
FUSE exfat 1.4.0 (libfuse2)
WARN: volume was not unmounted cleanly.
eriadar# umount /mnt/samsung                     
umount: /mnt/samsung: Device busy
Bingo. "Is your shell's current directory on the mountpoint path?"

Nice.

..Further research shows that there -is- actually an "eject" command. That will, or should, cause the mounted file-system to no longer be visible, and turn off the light on the external drive.

Code:
eriadar# eject /mnt/samsung 
eject: /mnt/samsung: Inappropriate ioctl for device
See fresh thread here.

Last edited by wheelnut; 1 Week Ago at 10:10 PM.
Reply With Quote
  #2   (View Single Post)  
Old 1 Week Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,100
Default

Quote:
Originally Posted by wheelnut View Post
[..Actually apparently completely solved.. ..or maybe not..]
You have several tangential questions and comments, which I'll try to discuss here.
Quote:
The man pages seem to be down...
The man pages should be installed, so you don't need the Internet to read 'em. The man pages aren't "How To" guides, though. For OpenBSD, the only official "How To" guides are in the FAQ. The FAQ isn't installed with the OS, so unfortunately accessing the FAQ does need the Internet.
Quote:
Code:
eriadar# disklabel sd2
# /dev/rsd2c:
type: SCSI
disk: SCSI disk
label: PSSD T7 Shield  
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 121601
total sectors: 1953525168
boundstart: 0
boundend: 1953525168

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:       1953525168                0  unused                    
  i:       1953520065             2048    NTFS                    
eriadar# mount /dev/sd2i /mnt/samsung
mount_ntfs: /dev/sd2i on /mnt/samsung: Invalid argument
I have been using ubuntu now for ages, so I assume that the samsung was formatted, or written to using it. Actually, I think it was written using rsync, so maybe the original drive.. whatever. I think it is highly unlikely these external ssd's were formatted by any windows machine I ever had.
That output shows that the drive has a valid Master Boot Record (MBR) with a partition table. That partition table has a recognized entry for an NTFS partition starting at block #2048. That's not a guarantee that the partition is formatted as NTFS, of course, only that there is an entry for the partition in the MBR table. And as you've learned, the "Invalid argument" error is unhelpful, as it can have many causes.
Quote:
I am aware of this thread, but just looking at it gives me a head-ache...
My apologies, most of that migraine inducing text was mine. Its an 11 year old thread, so I wouldn't consider anything I stated in at to be still applicable in today's world.
Quote:
Code:
 eriadar# pkg_add ntfs_3g
quirks-7.50 signed on 2025-04-08T14:05:06Z
ntfs_3g-2022.10.3: ok
eriadar# ntfs_3g /dev/sd2i /mnt/samsung
ksh: ntfs_3g: not found
[Note that the "tutorials" I found on ntfs_3g use it with doas. I have not yet foud a reason to use doas. I'm sure I will, eventually. But that might be why this isn't working..?]
The package is named "ntfs_3g". But the executable binary that gets installed has a different name: "ntfs-3g". Aren't computers and computer people fun? Aren't their jokes hysterical? Often, I find myself using the -L option of the pkg_info(1) program to find out what actually gets installed with a package, e.g.: $ pkg_info -L ntfs_3g.

Since you have a Linux background I assume you're familiar with sudo. The doas(8) program is something akin to "sudo Lite!" -- in that it is an extremely simple implementation of sudo's functionality, without sudo's operational complexity.
Reply With Quote
  #3   (View Single Post)  
Old 1 Week Ago
wheelnut wheelnut is offline
Real Name: Michael
Port Guard
 
Join Date: Apr 2022
Location: Canada
Posts: 24
Wink

Quote:
The man pages should be installed, so you don't need the Internet to read 'em.
I acknowledge the usefulness of emphasizing this in this context, for the benefit of others. I started, during this process, consulting them locally because I had the still somewhat vague knowledge that I could, and that that was the proper 'nix way of doing things. ..googling, such a hard habit to break..

Quote:
The package is named "ntfs_3g". But the executable binary that gets installed has a different name: "ntfs-3g". Aren't computers and computer people fun? Aren't their jokes hysterical?
well, I'm laughing now! [..at the time, I just shrugged and moved on.. ]

Quote:
Often, I find myself using the -L option of the pkg_info(1) program to find out what actually gets installed with a package, e.g.: $ pkg_info -L ntfs_3g.
solid gold. adopted!

Thanks!!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
files cannot be used because of Invalid argument sacerdos_daemonis FreeBSD General 8 30th September 2019 06:40 PM
mount_cd9660 : Invalid argument .. daemonfowl OpenBSD General 5 23rd February 2012 02:40 PM
cat: [file]: Invalid argument pieterverberne OpenBSD General 6 19th November 2011 02:43 PM
mount-msdosfs /dev/dao: : Invalid argument harold FreeBSD General 5 12th December 2010 06:59 AM
Mount DVD - invalid argument. maxrussell FreeBSD General 17 7th January 2009 08:46 AM


All times are GMT. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick