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 9th December 2013
lucas34's Avatar
lucas34 lucas34 is offline
Real Name: Lucas
Noob.
 
Join Date: Oct 2013
Posts: 17
Default Mount pen drive

I installed OpenBSD 5.4(i386) with xfce 4-10 in my notebook, everything's ok, but I can not mount my pen drive.
Code:
$ dmesg
OpenBSD 5.4 (GENERIC.MP) #44: Tue Jul 30 12:13:32 MDT 2013
    deraadt@i386.openbsd.org:/usr/src/sy...ile/GENERIC.MP
cpu0: Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz ("GenuineIntel" 686-class) 1.40 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,LAHF,PERF,ITSC
real mem  = 2022244352 (1928MB)
avail mem = 1977741312 (1886MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 02/06/12, SMBIOS rev. 2.7 @ 0xeba70 (22 entries)
bios0: vendor American Megatrends Inc. version "X550CA.209" date 07/09/2013
bios0: ASUSTeK COMPUTER INC. X550CA
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG HPET SSDT SSDT SSDT SSDT MSDM
acpi0: wakeup devices P0P1(S4) PEG0(S4) PEG1(S4) PEG2(S4) PEG3(S4) XHC1(S3) EHC1(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) EHC2(S3) USB5(S3) USB6(S3) USB7(S3) HDEF(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 99MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz ("GenuineIntel" 686-class) 1.40 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,LAHF,PERF,ITSC
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz ("GenuineIntel" 686-class) 1.40 GHz
cpu2: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,LAHF,PERF,ITSC
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz ("GenuineIntel" 686-class) 1.40 GHz
cpu3: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,LAHF,PERF,ITSC
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus -1 (PEG0)
acpiprt3 at acpi0: bus -1 (PEG1)
acpiprt4 at acpi0: bus -1 (PEG2)
acpiprt5 at acpi0: bus -1 (PEG3)
acpiprt6 at acpi0: bus 1 (RP01)
acpiprt7 at acpi0: bus -1 (RP03)
acpiprt8 at acpi0: bus -1 (RP05)
acpiprt9 at acpi0: bus -1 (RP06)
acpiprt10 at acpi0: bus -1 (RP07)
acpiprt11 at acpi0: bus -1 (RP08)
acpiprt12 at acpi0: bus 2 (RP02)
acpiprt13 at acpi0: bus 3 (RP04)
acpicpu0 at acpi0: C1, PSS
acpicpu1 at acpi0: C1, PSS
acpicpu2 at acpi0: C1, PSS
acpicpu3 at acpi0: C1, PSS
acpitz0 at acpi0: critical temperature is 103 degC
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "X550A30" serial   type LIon oem "ASUSTeK"
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: LCDD
bios0: ROM list: 0xc0000/0xee00 0xcf000/0x1000
cpu0: Enhanced SpeedStep 1397 MHz: speeds: 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
intagp0 at vga1
agp0 at intagp0: aperture at 0xe0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1366x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 7 Series xHCI" rev 0x04 at pci0 dev 20 function 0 not configured
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04: msi
azalia0: codecs: Realtek/0x0270, Intel/0x2806, using Realtek/0x0270
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4: apic 2 int 16
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 7 Series PCIE" rev 0xc4: apic 2 int 17
pci2 at ppb1 bus 2
"Atheros AR9485" rev 0x01 at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 28 function 3 "Intel 7 Series PCIE" rev 0xc4: apic 2 int 19
pci3 at ppb2 bus 3
vendor "Realtek", unknown product 0x5289 (class undefined unknown subclass 0x00, rev 0x01) at pci3 dev 0 function 0 not configured
re0 at pci3 dev 0 function 2 "Realtek 8168" rev 0x0a: RTL8411 (0x4880), apic 2 int 19, address d8:50:e6:ae:a4:8f
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 5
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel HM76 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi, AHCI 1.3
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, TOSHIBA MQ01ABD0, AX00> SCSI3 0/direct fixed naa.50000394e5983f7d
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
cd0 at scsibus0 targ 2 lun 0: <MATSHITA, DVD-RAM UJ8C2 S, 1.00> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 7 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pms0: Elantech Clickpad, version 4
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uvideo0 at uhub2 port 3 configuration 1 interface 0 "Azurewave USB2.0 UVC HD Webcam" rev 2.00/8.14 addr 3
video0 at uvideo0
uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhidev0 at uhub3 port 2 configuration 1 interface 0 "Razer Razer DeathAdder" rev 2.00/1.00 addr 3
uhidev0: iclass 3/1
ums0 at uhidev0: 7 buttons, Z dir
wsmouse1 at ums0 mux 0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (66190c80ca601670.a) swap on sd0b dump on sd0b
WARNING: / was not properly unmounted
umass0 at uhub3 port 1 configuration 1 interface 0 " USB DISK 2.0" rev 2.00/1.00 addr 4
umass0: using SCSI over Bulk-Only
scsibus3 at umass0: 2 targets, initiator 0
sd1 at scsibus3 targ 1 lun 0: <, USB DISK 2.0, PMAP> SCSI0 0/direct removable serial.13fe36001A000BBA4249
sd1: 7456MB, 512 bytes/sector, 15269888 sectors
$
Code:
# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: TOSHIBA MQ01ABD0
duid: 66190c80ca601670
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 60801
total sectors: 976773168
boundstart: 64
boundend: 976768065
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          2097152               64  4.2BSD   2048 16384    1 # /
  b:          4473984          2097216    swap                   # none
  c:        976773168                0  unused                   
  d:          8388608          6571200  4.2BSD   2048 16384    1 # /tmp
  e:         16288000         14959808  4.2BSD   2048 16384    1 # /var
  f:          4194304         31247808  4.2BSD   2048 16384    1 # /usr
  g:          2097152         35442112  4.2BSD   2048 16384    1 # /usr/X11R6
  h:         20971520         37539264  4.2BSD   2048 16384    1 # /usr/local
  i:          4194304         58510784  4.2BSD   2048 16384    1 # /usr/src
  j:          4194304         62705088  4.2BSD   2048 16384    1 # /usr/obj
  k:        629145600         66899392  4.2BSD   4096 32768    1 # /home
#
I tried:
Code:
mount /dev/sd0 /mnt/
mount /dev/sd0a /mnt/
mount /dev/sd0b /mnt/
mount /dev/sd0c /mnt/
mount /dev/sd0d /mnt/
mount /dev/sd0e /mnt/
..........
..........
..........
and this error appears:
Code:
mount_ffs: /dev/sd0(x) on /mnt: Device busy
I tried all morning and nothing.
Using google translate
Thanks in advance

Last edited by ocicat; 9th December 2013 at 04:09 PM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #2   (View Single Post)  
Old 9th December 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

  • sd0 is not your pen drive
  • Your pen drive is sd1
Code:
umass0 at uhub3 port 1 configuration 1 interface 0 " USB DISK 2.0" rev 2.00/1.00 addr 4
umass0: using SCSI over Bulk-Only
scsibus3 at umass0: 2 targets, initiator 0
sd1 at scsibus3 targ 1 lun 0: <, USB DISK 2.0, PMAP> SCSI0 0/direct removable serial.13fe36001A000BBA4249
sd1: 7456MB, 512 bytes/sector, 15269888 sectors
  • sd0 partitions are already mounted, which is why you get the device busy messages.
To see all of your currently mounted partitions, and how full they are, use:

$ df -h
Reply With Quote
  #3   (View Single Post)  
Old 9th December 2013
lucas34's Avatar
lucas34 lucas34 is offline
Real Name: Lucas
Noob.
 
Join Date: Oct 2013
Posts: 17
Default

Code:
$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M   50.0M    905M     5%    /
/dev/sd0k      298G    111M    283G     0%    /home
/dev/sd0d      3.9G   26.0K    3.7G     0%    /tmp
/dev/sd0f      2.0G    335M    1.5G    18%    /usr
/dev/sd0g     1005M    178M    777M    19%    /usr/X11R6
/dev/sd0h      9.8G    1.1G    8.2G    12%    /usr/local
/dev/sd0j      2.0G    2.0K    1.9G     0%    /usr/obj
/dev/sd0i      2.0G    2.0K    1.9G     0%    /usr/src
/dev/sd0e      7.6G   15.3M    7.2G     0%    /var
My pen drive has 8GB.So I think it would be sd0e,right?

Last edited by ocicat; 9th December 2013 at 04:14 PM. Reason: Please use [code] & [/code] tags when posting command output.
Reply With Quote
  #4   (View Single Post)  
Old 9th December 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

If you don't see the console message displayed when the USB drive is plugged in, you can also look at the output of the following:

$ sysctl hw.disknames

Usually, the last device listed in the output is the last device connected.
Reply With Quote
  #5   (View Single Post)  
Old 9th December 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by lucas34 View Post
My pen drive has 8GB.
So I think it would be sd0e,right?
No.
  • As jggimi has stated (& as seen in the output of dmesg(8)...), your USB device is connected as sd1.
  • Next, use disklabel(8) find the correct partition to mount:

    $ sudo disklabel sd1
  • If this USB drive is formatted as MS-DOS, usually this will be assigned to partition "i".
  • Once the correct partition has been identified, mount it with the following command:

    $ sudo mount -t msdos /dev/sd1i /mnt
  • Upon success, you should now see this in the output of df(1).
Partitions for foreign file systems are identified by the following algorithm:
  1. If not already assigned, pick the midpoint between "a" & "p" (which is "i").
  2. If partition "i" is already assigned, use the next available letter.

Last edited by ocicat; 9th December 2013 at 05:18 PM. Reason: Add algorithmic details.
Reply With Quote
  #6   (View Single Post)  
Old 9th December 2013
lucas34's Avatar
lucas34 lucas34 is offline
Real Name: Lucas
Noob.
 
Join Date: Oct 2013
Posts: 17
Default

Code:
# sysctl hw.disknames
hw.disknames=sd0:66190c80ca601670,cd0:,sd1:
#
It's sd1.
Code:
# mount /dev/sd1 /mnt/pen
mount_ffs: /dev/sd1 on /mnt/pen: No such file or directory
# mount /dev/sd1 /mnt/    
mount_ffs: /dev/sd1 on /mnt: No such file or directory
Reply With Quote
  #7   (View Single Post)  
Old 9th December 2013
lucas34's Avatar
lucas34 lucas34 is offline
Real Name: Lucas
Noob.
 
Join Date: Oct 2013
Posts: 17
Default

Quote:
Originally Posted by ocicat View Post
No.
  • As jggimi has stated (& as seen in the output of dmesg(8)...), your USB device is connected as sd1.
  • Next, use disklabel(8) find the correct partition to mount:

    $ sudo disklabel sd1
  • If this USB drive is formatted as MS-DOS, usually this will be assigned to partition "i".
  • Once the correct partition has been identified, mount it with the following command:

    $ sudo mount -t msdos /dev/sd1i /mnt
  • Upon success, you should now see this in the output of df(1).
You're right.

Code:
# disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: USB DISK 2.0    
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 950
total sectors: 15269888
boundstart: 0
boundend: 15269888
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         15269888                0  unused                   
  i:         15267840             2048    NTFS                   
# sudo mount -t msdos /dev/sd1i /mnt
mount_msdos: /dev/sd1i on /mnt: not an MSDOS filesystem
#
Code:
not an MSDOS filesystem
This is the problem.
Reply With Quote
  #8   (View Single Post)  
Old 9th December 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You mount partitions. Not devices.

The name of the partition is /dev/<device type> < number> <partition>

If the pen drive has a single MS-DOS (FAT) MBR partition, a virtual disklabel will assign this partition as "i". The output of

# disklabel sd1

will show its partitions.

If this shows a partition "i", you would mount this with:

# mount -t msdos /dev/sd1i /mnt
Reply With Quote
  #9   (View Single Post)  
Old 9th December 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Ah, its NTFS.

You mount this with:

# mount -t ntfs /dev/sd1i /mnt

Please note, NTFS partitions are READ ONLY in OpenBSD.
Reply With Quote
Old 9th December 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by lucas34 View Post
Code:
# disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: USB DISK 2.0    
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 950
total sectors: 15269888
boundstart: 0
boundend: 15269888
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         15269888                0  unused                   
  i:         15267840             2048    NTFS                   
# sudo mount -t msdos /dev/sd1i /mnt
mount_msdos: /dev/sd1i on /mnt: not an MSDOS filesystem
#
Okay, so you have now succeeded in determining that the filesystem on the USB drive is formatted as NTFS. Now issue the following command:

$ sudo mount -t ntfs /dev/sd1i /mnt

Upon success, you will now find /mnt populated in the output of df(1).

Last edited by ocicat; 9th December 2013 at 04:42 PM. Reason: fixed verb tense
Reply With Quote
Old 9th December 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jggimi View Post
Please note, NTFS partitions are READ ONLY in OpenBSD.
lucas34, this is important to remember. Reading from NTFS partitions is reliable. Writing to NTFS partitions is not reliable.

Don't try writing.
Reply With Quote
Old 9th December 2013
lucas34's Avatar
lucas34 lucas34 is offline
Real Name: Lucas
Noob.
 
Join Date: Oct 2013
Posts: 17
Default

I formatted my pen drive to fat32.
# mount -t msdos /dev/sd1i /mnt
and worked!

Thanks guys!

Last edited by lucas34; 9th December 2013 at 05:32 PM.
Reply With Quote
Old 9th December 2013
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Just wanted to add a small thing for lucas34. You can also see which partitions are mounted by running the mount(8) command with no arguments,

% mount
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
How do I correctly mount a flash drive in OpenBSD? Justin_i OpenBSD General 5 22nd October 2011 05:01 AM
Unable to mount second hard drive Roric OpenBSD General 3 15th February 2011 05:02 AM
Mount Network Drive plexter OpenBSD General 20 6th February 2009 05:13 AM
mount second hard drive - newbie trouble corneliu FreeBSD General 7 23rd September 2008 10:51 PM
mount problems with ntfs drive shinjii FreeBSD General 3 25th June 2008 12:33 AM


All times are GMT. The time now is 08:31 PM.


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