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 21st October 2011
Justin_i Justin_i is offline
New User
 
Join Date: Oct 2011
Posts: 2
Thanked 0 Times in 0 Posts
Default How do I correctly mount a flash drive in OpenBSD?

Hello,

Would someone explain how to correctly mount, and write to, a thumb drive. I can read from the thumb drive but I cannot save to the thumb drive; I keep getting 'error saving' file or 'no such directory'.

Here's what I'm doing:

dmesg
Code:
umass0 at uhub0 port 5 configuration 1 interface 0 "Generic USB TO IDE Bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd0 at scsibus2 targ 1 lun 0: <Generic, USB Disk, 9.02> SCSI2 0/direct fixed
sd0: 38154MB, 512 bytes/sec, 78140160 sec total
disklabel sd0i
Code:
# /dev/rsd0i:
type: SCSI
disk: SCSI disk
label: USB Disk        
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 4864
total sectors: 78140160
boundstart: 0
boundend: 78140160
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         78140160                0  unused                   
  i:         78140097               63    NTFS

df
Filesystem  512-blocks      Used     Avail Capacity  Mounted on
/dev/wd0a      2057756     84508   1870364     4%    /
/dev/wd0k     64449016   1215432  60011136     2%    /home
/dev/wd0d      8250812       168   7838104     0%    /tmp
/dev/wd0f      4122108    733616   3182388    19%    /usr
/dev/wd0g      2057756    323184   1631688    17%    /usr/X11R6
/dev/wd0h     14274172   3161504  10398960    23%    /usr/local
/dev/wd0j      4122108         4   3916000     0%    /usr/obj
/dev/wd0i      4122108         4   3916000     0%    /usr/src
/dev/wd0e     10312732     39460   9757636     0%    /var
/dev/sd0i     78140096  26062456  52077640    33%    /mnt/pen
mount -w -t ntfs /dev/sd0i /mnt/pen

Last edited by ocicat; 21st October 2011 at 09:12 PM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #2   (View Single Post)  
Old 21st October 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

OpenBSD's NTFS implementation is read-only.
Reply With Quote
  #3   (View Single Post)  
Old 21st October 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,193
Thanked 182 Times in 149 Posts
Default

Your procedure to find the disklabel of the USB drive is perfect
You only seem not be aware of the following from mount_ntfs

Code:
   Limited support for writing
     There is limited writing ability for files.  Limitations:

     o   file must be non-resident
     o   file must not contain any holes (uninitialized areas)
     o   file can't be compressed

     Note that it's not currently possible to create or remove files on NTFS
     filesystems.

     Warning: do not mount NTFS filesystems read-write.  The write support is
     not very useful and is not tested well.  It's not safe to write to any
     file on NTFS; you might damage the filesystem.  Unless you want to debug
     NTFS filesystem code, mount the NTFS filesystem read-only.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #4   (View Single Post)  
Old 21st October 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

In -current, write support is completely removed and no longer documented in the man page.

Quote:
The supported NTFS versions include both NTFS4, as used by Microsoft
Windows NT 4.0, and NTFS5, as used by Microsoft Windows 2000 and XP.
Only read-only operation is permitted, which is automatically enforced.
The risk for corruption was high, and nobody maintains it.. so there was little sense pretending it was supported.
Reply With Quote
  #5   (View Single Post)  
Old 22nd October 2011
Justin_i Justin_i is offline
New User
 
Join Date: Oct 2011
Posts: 2
Thanked 0 Times in 0 Posts
Default

That explains why I couldn't save anything. I don't know why I glazed over that man file. I've learned to backup everything, but there doesn't appear to be any damage to the files on the thumb drive (Firefox add-on, scrapbook folder and portable apps). Other than this episode I'm having fun with OpenBSD, six days in.

Thanks for the replies!
Reply With Quote
  #6   (View Single Post)  
Old 22nd October 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,904
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by Justin_i View Post
TOther than this episode I'm having fun with OpenBSD, six days in.

Thanks for the replies!
Welcome to our community!

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
ntfs-3g can not mount USB flash mfaridi FreeBSD Ports and Packages 13 4th January 2011 06:03 AM
Creating USB flash drive drive image from FreeBSD disc1.iso FBSD Guides 1 10th February 2010 04:42 PM
Mount Network Drive plexter OpenBSD General 20 6th February 2009 05:13 AM
which Flash Drive I must buy for FreeBSD and OpenBSD mfaridi General Hardware 18 22nd October 2008 07:43 PM


All times are GMT. The time now is 07:13 AM.


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