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 March 2011
phill phill is offline
Real Name: Philippe
Port Guard
 
Join Date: Oct 2009
Location: Belgium
Posts: 30
Thanked 0 Times in 0 Posts
Default sd/mmc drive

HEllo,

I have a sd/mmc drive in my laptop. When I put a card in it I see the following in dmesg:
scsibus1 at sdmmc0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
sd1: 1962MB, 1024 bytes/sec, 2009600 sec total

I try to mount as follows:
$ sudo mount /dev/sd1i /mnt/pen/
mount_ffs: /dev/sd1i on /mnt/pen: Device not configured

Am I doing something wrong or is the drive simply not supported?

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 21st March 2011
shep shep is offline
ISO Quartermaster
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 580
Thanked 9 Times in 9 Posts
Default

I think you are missing the file type specification in your mount command.
Typically flash devices use the msdos file type (aka 'vfat' in Linux).
Quote:
mount -t msdos /dev/sd1i /mnt/pen
See 14.17 in the FAQ for more info
http://www.openbsd.org/faq/faq14.html#flashmem
Reply With Quote
  #3   (View Single Post)  
Old 21st March 2011
phill phill is offline
Real Name: Philippe
Port Guard
 
Join Date: Oct 2009
Location: Belgium
Posts: 30
Thanked 0 Times in 0 Posts
Default

It does not work either...

Code:
$ sudo mount -t msdos /dev/sd1i /mnt/pen/                                                                                                                    
mount_msdos: /dev/sd1i on /mnt/pen: Device not configured
Reply With Quote
  #4   (View Single Post)  
Old 21st March 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,612
Thanked 214 Times in 189 Posts
Default

"sd1i" will only exist on the if there is a FAT or EXT2/EXT3 MBR partition on the device. Don't assume it, check it.

Look at the output of:
sudo fdisk sd1
This will show you what your MBR partition table has within it.
Look at the output of:
sudo disklabel sd1
This will show you what real BSD partitions are on the drive, or, what virtual BSD partitions are on the drive, having been created by the kernel from FAT or EXT2/3 MBR partitions.

----

If you have a valid MBR partition, but it is an NTFS filesystem, then you will need a custom kernel to mount it on OpenBSD. NTFS has been considered "experimental, read-only" for many years on OpenBSD.

Last edited by jggimi; 21st March 2011 at 03:11 PM.
Reply With Quote
  #5   (View Single Post)  
Old 21st March 2011
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Quote:
Originally Posted by jggimi View Post
If you have a valid MBR partition, but it is an NTFS filesystem, then you will need a custom kernel to mount it on OpenBSD. NTFS has been considered "experimental, read-only" for many years on OpenBSD.
NTFS is enabled in GENERIC now (4.9 will be the first release to have it). That said, I tried it a few weeks ago and couldn’t get it to work.
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
  #6   (View Single Post)  
Old 21st March 2011
phill phill is offline
Real Name: Philippe
Port Guard
 
Join Date: Oct 2009
Location: Belgium
Posts: 30
Thanked 0 Times in 0 Posts
Default

I performed the commands:
Code:
$ sudo fdisk sd1 

Disk: sd1	geometry: 125/255/63 [2009600 1024-byte Sectors]
Offset: 0	Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 06      0   3  55 -    250  46  52 [         243:     4018957 ] DOS > 32MB  
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      

$ sudo disklabel sd1

# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: Drive #01
uid: 0000000000000000
flags:
bytes/sector: 1024
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 125
total sectors: 2009600
boundstart: 0
boundend: 2009600
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:          2009600                0  unused
So the fstype is "unused"?

Last edited by J65nko; 22nd March 2011 at 05:19 PM. Reason: [code] tags added
Reply With Quote
  #7   (View Single Post)  
Old 21st March 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

No, "c" always represents the entire disk.

The problem here is that OpenBSD isn't spoofing a disklabel entry so that you can mount the msdos (..FAT) formatted partition.

The OpenBSD kernel creates a pseudo-disklabel for disks that have foreign filesystems, but sometimes, as is in your case.. it has not.

You should send a bug report to the mailing lists.
Reply With Quote
  #8   (View Single Post)  
Old 22nd March 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,612
Thanked 214 Times in 189 Posts
Default

It is not recognized, as far as I can tell, because of an overarching problem: 1024 bytes/sector. This is neither the standard 512-byte sector, nor the newfangled SSD 4096-byte sector. Nor even the 2048-byte sectors of optical disks.
Reply With Quote
  #9   (View Single Post)  
Old 22nd March 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,612
Thanked 214 Times in 189 Posts
Default

I should add that as a circumvention, a BSD disklabel can be manually added. The FAT MBR partition starts at sector 243 for a size of 4018957 sectors. Manually add this using disklabel(8) and its -E option or -e option. Here's a quick guess at admin inputs using disklabel -E, to create an "i" BSD partition to align with the MBR partition, just as an example:
Code:
$ sudo disklabel -E sd1
a
i
243
4018957
MSDOS
q
y
I have not actually tested this, these responses to questions from the disklabel -E editing tool are from memory. I have no OpenBSD platform available to me at this instant. If you do this, read the prompts from the disklabel program and answer appropriately.
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
Creating USB flash drive drive image from FreeBSD disc1.iso FBSD Guides 1 10th February 2010 04:42 PM
which drive is what? knasbas OpenBSD Installation and Upgrading 2 20th July 2009 09:48 PM
Did I fry my hard drive? JMJ_coder General Hardware 7 23rd December 2008 10:38 PM
How can I tell if my USB drive is bad? JMJ_coder General Hardware 4 3rd November 2008 04:12 AM
CF as a *BSD hard drive? JMJ_coder General Hardware 26 31st July 2008 05:13 PM


All times are GMT. The time now is 11:46 PM.


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