Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm a relative BSD newb. I have a small server running OpenBSD 4.4. I'm trying to plug in a 16GB USB flash drive to move some files. I followed the guidance of the Disk Setup documentation, and found the label and filesystem of the desired partition. But when trying to mount the partition, I get the following:

# mount -t ext2fs /dev/sd1i /mnt/flash 
mount_ext2fs: /dev/sd1i on /mnt/flash: specified device does not match mounted device

I googled a bit, but nothing I found was particularly helpful. Can anyone shed some light on this message?

Edit:

Additional Info

# disklabel sd1
disklabel: warning, DOS partition table with no valid OpenBSD partition
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: SanDisk Ultra 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 1946
total sectors: 31266816
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:         31266816                0  unused      0     0      
  i:         31262427               63  ext2fs
share|improve this question
    
Try mount -t auto /dev/sd1i /mnt/flash and see what happens. If it works you can view the fs type of the mounted part. with fdisk -l or blkid –  Herman Torjussen Mar 12 '12 at 14:40
    
@hesse Result of that is mount: no mount helper program found for auto: No such file or directory –  glibdud Mar 12 '12 at 23:47

2 Answers 2

up vote 3 down vote accepted

Ok, it turns out I was missing the real error message, which dmesg reported as:

Ext2 fs: unsupported inode size

Once I found that, a little Googling showed me that only 128-bit inode sizes are supported for ext2fs in BSD 4.4. I moved the flash drive back to a Linux machine, reformatted with mke2fs -I 128, and voila! The drive can now be successfully mounted on the BSD machine with the mount command given in the question.

share|improve this answer

Most likely you are calling the wrong filesystem type.

ext2fs is typically linux specific and most drives use a FAT I would try fat32 instead that should get it mounted for you.

You can tell what the partitionis with fdisk like so: (assuming /dev/sd1i is your device)

#fdisk -l /dev/sd1i

from: http://en.wikipedia.org/wiki/USB_flash_drive

Most flash drives ship preformatted with the FAT12, FAT16 or FAT32 file systems. The ubiquity of this file system allows the drive to be accessed on virtually any host device with USB support. Also, standard FAT maintenance utilities (e.g. ScanDisk) can be used to repair or retrieve corrupted data. However, because a flash drive appears as a USB-connected hard drive to the host system, the drive can be reformatted to any file system supported by the host operating system.
share|improve this answer
    
This flash drive is actually ext2, as I confirmed with disklabel. (And, more to the point, I know that it is because I actually formatted the drive myself.) –  glibdud Mar 12 '12 at 1:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.