Kernel bug ? unknown partition table on some usb flash drives

Hi,
Recently I discovered what I think is a bug related to the Linux kernel or something, here is my case study :

  • I am running Linux openSUSE 13.1 x64 on my office rig
  • I am running Linux Lubuntu 13.10 on my Dell notebook
  • I have another Linux Ubuntu on a second PC
  • I also have 2 notebooks with Windows XP and Windows 7
  • I have a Sharp LED HD wich seems to be running some sort of Linux OS as almost all Smart TVs now with USB ports and Media Players

I experienced some strange behaviors sometimes with USB flash drives formatted either FAT32 or NTFS, that is when connected, their partition and filesystem are not recognized and because of that, unable to mount manually or auto-mount. I usually then format them using Gparted or Partitioner in openSUSE and works fine for some time.

BUT,

What I discovered is that ONLY Linux based OSes don’t recognize the filesystem, when the exact same flash drive is inserted in ANY Windows machine it works just fine, and Windows 7 doesn’t even ask to “Scan and Fix”, everything is fine and doing a chkdsk results in all being ok.

It got my attention when I tried to play some videos on my Linux based Sharp HDTV, no files found even though I just copied them from my Windows notebook, so I pulled the flashdrive from the TV, put in back in my Windows notebook and everything was fine, put it in my Linux openSUSE machine and VOILA, no automount, no manual mount, the flash drive is detected but the patition filesystem is not recognized, SBD1 is not available. I then tried and put in my Lubuntu machine, same thing no fs, on Ubuntu machine same thing, so clearly this is something related only to Linux based OSes.

Here are some logs I got from my openSUSE
This is a 4GB FAT32 flash drive with some video files that WORKS just fine under Windows but not in Linux, nor my TV, openSUSE, Lubuntu, Ubuntu, etc.

dmesg

[22170.806168] usb 2-1: new high-speed USB device number 3 using ehci-pci
[22170.926024] usb 2-1: New USB device found, idVendor=13fe, idProduct=4100
[22170.926028] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[22170.926031] usb 2-1: Product: USB DISK 2.0
[22170.926032] usb 2-1: Manufacturer:         
[22170.926034] usb 2-1: SerialNumber: 070D27888255C220
[22171.181700] usb-storage 2-1:1.0: USB Mass Storage device detected
[22171.181836] scsi8 : usb-storage 2-1:1.0
[22171.181925] usbcore: registered new interface driver usb-storage
[22172.272939] scsi 8:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
[22172.273984] sd 8:0:0:0: Attached scsi generic sg2 type 0
[22173.235065] sd 8:0:0:0: [sdb] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB)
[22173.235684] sd 8:0:0:0: [sdb] Write Protect is off
[22173.235689] sd 8:0:0:0: [sdb] Mode Sense: 23 00 00 00
[22173.236353] sd 8:0:0:0: [sdb] No Caching mode page found
[22173.236357] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[22173.261819]  sdb: unknown partition table
[22173.265320] sd 8:0:0:0: [sdb] Attached SCSI removable disk

lsusb

Bus 002 Device 003: ID 13fe:4100 Kingston Technology Company Inc. 
Bus 003 Device 002: ID 04e8:3268 Samsung Electronics Co., Ltd ML-1610 Mono Laser Printer
Bus 005 Device 002: ID 413c:2501 Dell Computer Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

fdisk -l

Disk /dev/sda: 160.0 GB, 160040803840 bytes, 312579695 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xed46604b


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     4208639     2103296   82  Linux swap / Solaris
/dev/sda2   *     4208640    46153727    20972544   83  Linux
/dev/sda3        46153728   312578047   133212160   83  Linux


Disk /dev/sdb: 3880 MB, 3880452096 bytes, 7579008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00018a49


This doesn't look like a partition table
Probably you selected the wrong device.


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?        2048     7579007     3788480    b  W95 FAT32

blkid does not see it

/dev/sda1: UUID="76ec4d66-ed02-4b07-bb1b-51f90dc49446" TYPE="swap" 
/dev/sda2: UUID="a7f5917d-dba0-4d89-9a6f-79c4547ea314" TYPE="ext4" PTTYPE="dos" 
/dev/sda3: UUID="58f62fa4-e31d-4b59-9b44-545b91b769cf" TYPE="ext4" 

A complete guess here.

It looks as if a non-standard formatting of the disk (in particular, a non-standard partition table) was used. That’s possibly deliberate obfuscation.

This is what “testdisk” says on analysing the flash drive

Disk /dev/sdb - 3880 MB / 3700 MiB - CHS 1018 120 62
Current partition structure:
     Partition                  Start        End    Size in sectors


Warning: number of heads/cylinder mismatches 255 (FAT) != 120 (HD)
Warning: number of sectors per track mismatches 63 (FAT) != 62 (HD)
 1 * FAT32                    0  33  3  1018  82  4    7576960 [DRIVE]


Warning: Bad ending sector (CHS and LBA don't match)

It is just a simple FAT32 formatted flash drive, nothing fancy, and it is not the first time I encountered this. I work with many flash drives due to job and this only happens on Linux, I really don’t think anymore that is has something to do with the drives or partitioning.

Found a 2008 bug report with exactly the same issue

https://bugzilla.kernel.org/show_bug.cgi?id=10808

On 2014-07-13 00:46, robertot5 wrote:

> fdisk -l
>
> Code:
> --------------------

> Disk /dev/sdb: 3880 MB, 3880452096 bytes, 7579008 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk label type: dos
> Disk identifier: 0x00018a49
>
>
> This doesn’t look like a partition table
> Probably you selected the wrong device.
>
>
> Device Boot Start End Blocks Id System
> /dev/sdb1 ? 2048 7579007 3788480 b W95 FAT32
>
> --------------------

Please post the output of “file -s /dev/sdb”

My guess is that the usb stick is directly formatted on the whole disk,
not on a partition. There is a bad partition table and it confuses things.

So you could try to mount manually /dev/sdb, not /dev/sdb1.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

file -s /dev/sdb

/dev/sdb: DOS/MBR boot sector; partition 1 : ID=0xb, active 0x81, start-CHS (0x0,32,33), end-CHS (0x1d6,254,63), startsector 2048, 7576960 sectors

on mounting either SDB or SDB1 i get

mount: special device /dev/sbd does not exist

and

mount: special device /dev/sbd1 does not exist

Try:

mount /dev/sdb /mnt

Of course /dev/sbd does not exist.

On 07/12/2014 06:46 PM, robertot5 wrote:
>
> robin_listas;2653689 Wrote:
>> On 2014-07-13 00:46, robertot5 wrote:
>>
>>
>>
>>> fdisk -l
>>>
>>> Code:
>>> --------------------
>>
>>> Disk /dev/sdb: 3880 MB, 3880452096 bytes, 7579008 sectors
>>> Units = sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Disk label type: dos
>>> Disk identifier: 0x00018a49
>>>
>>>
>>> This doesn’t look like a partition table
>>> Probably you selected the wrong device.
>>>
>>>
>>> Device Boot Start End Blocks Id System
>>> /dev/sdb1 ? 2048 7579007 3788480 b W95 FAT32
>>>
>>> --------------------
>>
>>
>> Please post the output of “file -s /dev/sdb”
>>
>> My guess is that the usb stick is directly formatted on the whole disk,
>> not on a partition. There is a bad partition table and it confuses
>> things.
>>
>> So you could try to mount manually /dev/sdb, not /dev/sdb1.
>>
>>
>> –
>> Cheers / Saludos,
>>
>> Carlos E. R.
>> (from 13.1 x86_64 “Bottle” at Telcontar)
>
> file -s /dev/sdb
>
> Code:
> --------------------
> /dev/sdb: DOS/MBR boot sector; partition 1 : ID=0xb, active 0x81, start-CHS (0x0,32,33), end-CHS (0x1d6,254,63), startsector 2048, 7576960 sectors
> --------------------
>
>
> on mounting either SDB or SDB1 i get
>
> Code:
> --------------------
> mount: special device /dev/sbd does not exist
>
> --------------------
>
> and
>
> Code:
> --------------------
> mount: special device /dev/sbd1 does not exist
>
> -------------------

I hate to state the obvious, but sbd != sdb!

My bad !

mount /dev/sdb

mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error


       In some cases useful info is found in syslog - try
       dmesg | tail or so.



mount /dev/sdb1

mount: special device /dev/sdb1 does not exist



On 2014-07-13 01:46, robertot5 wrote:

> file -s /dev/sdb
>
> Code:
> --------------------
> /dev/sdb: DOS/MBR boot sector; partition 1 : ID=0xb, active 0x81, start-CHS (0x0,32,33), end-CHS (0x1d6,254,63), startsector 2048, 7576960 sectors
> --------------------
>
>
> on mounting either SDB or SDB1 i get

You obviously have to write there the actual device the usb stick gets.
And of course, sbd does not exist, it would be sdb in any case.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

If you do not properly unmount a device that is Windows format it can leave it in an inconsistent state. By design Linux will not mount such a device. So if you have a good USB and put it in a Windows machine and then write stuff and remove it without properly setting remove drive then the the file system will be in an unknown state. Linux can’t fix Windows stuff so it refuse to mount. Windows knows how to fix its file system so will mount it.Note if you do the same in Linux with a Linux file system you get the same thing but Linux knows how to fix Linux file systems

On 2014-07-13 02:16, robertot5 wrote:

>> I hate to state the obvious, but sbd != sdb!
> My bad !

:slight_smile:

> mount /dev/sdb
>
> Code:
> --------------------
> mount: wrong fs type, bad option, bad superblock on /dev/sdb,
> missing codepage or helper program, or other error
>
>
> In some cases useful info is found in syslog - try
> dmesg | tail or so.
>
> --------------------

Ok… Too bad. My guess then appears wrong.

Did you look in syslog?

> mount /dev/sdb1
>
> Code:
> --------------------
> mount: special device /dev/sdb1 does not exist
>
> --------------------

Well, that one is not surprising, as the table is not seen or looks
corrupted.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-07-13 02:16, robertot5 wrote:

> mount /dev/sdb

I forgot: try “mount -v /dev/sdb” instead.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Please take gogalthorpe’s advice serious. To me this looks as improper removal from a Windows system.

On 2014-07-13 13:16, hcvv wrote:
>
> Please take gogalthorpe’s advice serious. To me this looks as improper
> removal from a Windows system.

Depends.

If the filesystem is really in a partition, then no. No, because Linux
does not see the partitions, it sees the table as bad. It aborts way
before attempting to mount anything, dirty or clean.

If the filesystem is in the raw device, with no partition table, then
perhaps - but then the mount attempt would say that the filesystem is
dirty, not that it can not find inodes. To be sure we need the detailed
syslog output, or sometimes the verbose output of mount.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Ok,

mount -v says the same error

mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error


       In some cases useful info is found in syslog - try
       dmesg | tail or so.

mount -v on sdb1 says the same

mount: special device /dev/sdb1 does not exist

I also did a “dd” of the flash drive just to have a .img for further testing

This is a “tail -f /var/log/messages” of unplugging the flash drive then plugging it again

2014-07-13T17:33:29.959239+03:00 linux-jspa kernel: [42518.556488] usb 2-1: USB disconnect, device number 4
2014-07-13T17:33:39.620943+03:00 linux-jspa kernel: [42528.214635] usb 2-1: new high-speed USB device number 5 using ehci-pci
2014-07-13T17:33:39.739913+03:00 linux-jspa kernel: [42528.334478] usb 2-1: New USB device found, idVendor=13fe, idProduct=4100
2014-07-13T17:33:39.739930+03:00 linux-jspa kernel: [42528.334482] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2014-07-13T17:33:39.739931+03:00 linux-jspa kernel: [42528.334484] usb 2-1: Product: USB DISK 2.0
2014-07-13T17:33:39.739932+03:00 linux-jspa kernel: [42528.334486] usb 2-1: Manufacturer:         
2014-07-13T17:33:39.739932+03:00 linux-jspa kernel: [42528.334487] usb 2-1: SerialNumber: 070D27888255C220
2014-07-13T17:33:39.741050+03:00 linux-jspa kernel: [42528.335305] usb-storage 2-1:1.0: USB Mass Storage device detected
2014-07-13T17:33:39.741061+03:00 linux-jspa kernel: [42528.335382] scsi10 : usb-storage 2-1:1.0
2014-07-13T17:33:39.811436+03:00 linux-jspa mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1"
2014-07-13T17:33:39.812259+03:00 linux-jspa mtp-probe: bus: 2, device: 5 was not an MTP device
2014-07-13T17:33:40.830604+03:00 linux-jspa kernel: [42529.424234] scsi 10:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
2014-07-13T17:33:40.830615+03:00 linux-jspa kernel: [42529.424565] sd 10:0:0:0: Attached scsi generic sg2 type 0
2014-07-13T17:33:41.789943+03:00 linux-jspa kernel: [42530.383253] sd 10:0:0:0: [sdb] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB)
2014-07-13T17:33:41.789959+03:00 linux-jspa kernel: [42530.384001] sd 10:0:0:0: [sdb] Write Protect is off
2014-07-13T17:33:41.789965+03:00 linux-jspa kernel: [42530.384008] sd 10:0:0:0: [sdb] Mode Sense: 23 00 00 00
2014-07-13T17:33:41.790915+03:00 linux-jspa kernel: [42530.384618] sd 10:0:0:0: [sdb] No Caching mode page found
2014-07-13T17:33:41.790929+03:00 linux-jspa kernel: [42530.384621] sd 10:0:0:0: [sdb] Assuming drive cache: write through
2014-07-13T17:33:41.816208+03:00 linux-jspa kernel: [42530.409480]  sdb: unknown partition table
2014-07-13T17:33:41.819942+03:00 linux-jspa kernel: [42530.413010] sd 10:0:0:0: [sdb] Attached SCSI removable disk



Now this is when I plug in a working flash drive, FAT32 also, it auto mounts and evrything works fine with it


2014-07-13T17:35:56.934941+03:00 linux-jspa kernel: [42665.490161] usb 2-1: new high-speed USB device number 6 using ehci-pci
2014-07-13T17:35:57.050936+03:00 linux-jspa kernel: [42665.606665] usb 2-1: New USB device found, idVendor=125f, idProduct=c82a
2014-07-13T17:35:57.050953+03:00 linux-jspa kernel: [42665.606669] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2014-07-13T17:35:57.050954+03:00 linux-jspa kernel: [42665.606671] usb 2-1: Product: ADATA USB Flash Drive
2014-07-13T17:35:57.050955+03:00 linux-jspa kernel: [42665.606673] usb 2-1: Manufacturer: ADATA
2014-07-13T17:35:57.050956+03:00 linux-jspa kernel: [42665.606674] usb 2-1: SerialNumber: 11B1018002240083
2014-07-13T17:35:57.050956+03:00 linux-jspa kernel: [42665.606946] usb-storage 2-1:1.0: USB Mass Storage device detected
2014-07-13T17:35:57.052727+03:00 linux-jspa kernel: [42665.607547] scsi11 : usb-storage 2-1:1.0
2014-07-13T17:35:57.054075+03:00 linux-jspa mtp-probe: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1"
2014-07-13T17:35:57.072825+03:00 linux-jspa mtp-probe: bus: 2, device: 6 was not an MTP device
2014-07-13T17:35:58.054468+03:00 linux-jspa kernel: [42666.609456] scsi 11:0:0:0: Direct-Access     ADATA    USB Flash Drive  0.00 PQ: 0 ANSI: 2
2014-07-13T17:35:58.054484+03:00 linux-jspa kernel: [42666.609710] sd 11:0:0:0: Attached scsi generic sg2 type 0
2014-07-13T17:35:58.057939+03:00 linux-jspa kernel: [42666.613328] sd 11:0:0:0: [sdb] 7892992 512-byte logical blocks: (4.04 GB/3.76 GiB)
2014-07-13T17:35:58.058955+03:00 linux-jspa kernel: [42666.614070] sd 11:0:0:0: [sdb] Write Protect is off
2014-07-13T17:35:58.058969+03:00 linux-jspa kernel: [42666.614074] sd 11:0:0:0: [sdb] Mode Sense: 00 00 00 00
2014-07-13T17:35:58.058971+03:00 linux-jspa kernel: [42666.614697] sd 11:0:0:0: [sdb] Asking for cache data failed
2014-07-13T17:35:58.058972+03:00 linux-jspa kernel: [42666.614701] sd 11:0:0:0: [sdb] Assuming drive cache: write through
2014-07-13T17:35:58.064926+03:00 linux-jspa kernel: [42666.619953]  sdb: sdb1
2014-07-13T17:35:58.071941+03:00 linux-jspa kernel: [42666.627560] sd 11:0:0:0: [sdb] Attached SCSI removable disk

Plugged the flash drive into a Windows machine, worked just fine. I also did a scan using the Windows tools and it didn’t find any errors, nor with chkdsk.

This is what hwinfo says regarding that usb port and flash drive


42: SCSI c00.0: 10600 Disk
  [Created at block.245]
  Unique ID: FKGF.kvXvj8RfAhD
  Parent ID: 06bT.jPsMPYxld01
  SysFS ID: /class/block/sdb
  SysFS BusID: 12:0:0:0
  SysFS Device Link: /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host12/target12:0:0/12:0:0:0
  Hardware Class: disk
  Model: "USB DISK 2.0"
  Vendor: usb 0x13fe 
  Device: usb 0x4100 "USB DISK 2.0"
  Revision: "PMAP"
  Serial ID: "0C7202D02070"
  Driver: "usb-storage", "sd"
  Driver Modules: "usb_storage"
  Device File: /dev/sdb (/dev/sg2)
  Device Files: /dev/sdb, /dev/disk/by-id/scsi-1USB_DISK_2.0, /dev/disk/by-id/usb-_USB_DISK_2.0_070D27888255C220-0:0, /dev/disk/by-path/pci-0000:00:13.2-usb-0:1:1.0-scsi-0:0:0:0
  Device Number: block 8:16-8:31 (char 21:2)
  Geometry (Logical): CHS 1018/120/62
  Size: 7579008 sectors a 512 bytes
  Capacity: 3 GB (3880452096 bytes)
  Speed: 480 Mbps
  Module Alias: "usb:v13FEp4100d0100dc00dsc00dp00ic08isc06ip50in00"
  Driver Info #0:
    Driver Status: uas is not active
    Driver Activation Cmd: "modprobe uas"
  Driver Info #1:
    Driver Status: usb_storage is active
    Driver Activation Cmd: "modprobe usb_storage"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #21 (USB Controller)

On 2014-07-13 16:46, robertot5 wrote:

> Ok,
>
> mount -v says the same error
>
> Code:
> --------------------
> mount: wrong fs type, bad option, bad superblock on /dev/sdb,
> missing codepage or helper program, or other error
>
>
> In some cases useful info is found in syslog - try
> dmesg | tail or so.
>
> --------------------

And that syslog info you posted… where?

> I also did a “dd” of the flash drive just to have a .img for further
> testing
>
> This is a “tail -f /var/log/messages” of unplugging the flash drive then
> plugging it again

No, I want it while you try to mount it as above. That’s the syslog
output I asked for yesterday, and which the mount command error text is
telling you to do. So please, do it.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

You mean watching “tail -f /var/log/messages” while running “mount -v /dev/sdb /mnt/flashdrive” ?

I just ran that and it doesn’t append anything in /var/log/messages
mount -v /dev/sdb /mnt/flashdrive

mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error


       In some cases useful info is found in syslog - try
       dmesg | tail or so.

/var/log/messages before

2014-07-13T21:15:55.514582+03:00 linux-jspa kernel: [50663.622101] usb 2-1: new high-speed USB device number 8 using ehci-pci
2014-07-13T21:15:55.634562+03:00 linux-jspa kernel: [50663.742140] usb 2-1: New USB device found, idVendor=13fe, idProduct=4100
2014-07-13T21:15:55.634578+03:00 linux-jspa kernel: [50663.742145] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2014-07-13T21:15:55.634578+03:00 linux-jspa kernel: [50663.742147] usb 2-1: Product: USB DISK 2.0
2014-07-13T21:15:55.634579+03:00 linux-jspa kernel: [50663.742148] usb 2-1: Manufacturer:         
2014-07-13T21:15:55.634580+03:00 linux-jspa kernel: [50663.742150] usb 2-1: SerialNumber: 070D27888255C220
2014-07-13T21:15:55.634581+03:00 linux-jspa kernel: [50663.742420] usb-storage 2-1:1.0: USB Mass Storage device detected
2014-07-13T21:15:55.635580+03:00 linux-jspa kernel: [50663.743679] scsi13 : usb-storage 2-1:1.0
2014-07-13T21:15:55.637377+03:00 linux-jspa mtp-probe: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1"
2014-07-13T21:15:55.638180+03:00 linux-jspa mtp-probe: bus: 2, device: 8 was not an MTP device
2014-07-13T21:15:56.725679+03:00 linux-jspa kernel: [50664.833624] scsi 13:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
2014-07-13T21:15:56.726858+03:00 linux-jspa kernel: [50664.834294] sd 13:0:0:0: Attached scsi generic sg2 type 0
2014-07-13T21:15:57.682554+03:00 linux-jspa kernel: [50665.789762] sd 13:0:0:0: [sdb] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB)
2014-07-13T21:15:57.682569+03:00 linux-jspa kernel: [50665.790384] sd 13:0:0:0: [sdb] Write Protect is off
2014-07-13T21:15:57.682570+03:00 linux-jspa kernel: [50665.790390] sd 13:0:0:0: [sdb] Mode Sense: 23 00 00 00
2014-07-13T21:15:57.684736+03:00 linux-jspa kernel: [50665.792157] sd 13:0:0:0: [sdb] No Caching mode page found
2014-07-13T21:15:57.684751+03:00 linux-jspa kernel: [50665.792162] sd 13:0:0:0: [sdb] Assuming drive cache: write through
2014-07-13T21:15:57.709555+03:00 linux-jspa kernel: [50665.817392]  sdb: unknown partition table
2014-07-13T21:15:57.715552+03:00 linux-jspa kernel: [50665.823401] sd 13:0:0:0: [sdb] Attached SCSI removable disk



same /var/log/messages after running mount -v

2014-07-13T21:15:55.514582+03:00 linux-jspa kernel: [50663.622101] usb 2-1: new high-speed USB device number 8 using ehci-pci2014-07-13T21:15:55.634562+03:00 linux-jspa kernel: [50663.742140] usb 2-1: New USB device found, idVendor=13fe, idProduct=4100
2014-07-13T21:15:55.634578+03:00 linux-jspa kernel: [50663.742145] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2014-07-13T21:15:55.634578+03:00 linux-jspa kernel: [50663.742147] usb 2-1: Product: USB DISK 2.0
2014-07-13T21:15:55.634579+03:00 linux-jspa kernel: [50663.742148] usb 2-1: Manufacturer:         
2014-07-13T21:15:55.634580+03:00 linux-jspa kernel: [50663.742150] usb 2-1: SerialNumber: 070D27888255C220
2014-07-13T21:15:55.634581+03:00 linux-jspa kernel: [50663.742420] usb-storage 2-1:1.0: USB Mass Storage device detected
2014-07-13T21:15:55.635580+03:00 linux-jspa kernel: [50663.743679] scsi13 : usb-storage 2-1:1.0
2014-07-13T21:15:55.637377+03:00 linux-jspa mtp-probe: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1"
2014-07-13T21:15:55.638180+03:00 linux-jspa mtp-probe: bus: 2, device: 8 was not an MTP device
2014-07-13T21:15:56.725679+03:00 linux-jspa kernel: [50664.833624] scsi 13:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
2014-07-13T21:15:56.726858+03:00 linux-jspa kernel: [50664.834294] sd 13:0:0:0: Attached scsi generic sg2 type 0
2014-07-13T21:15:57.682554+03:00 linux-jspa kernel: [50665.789762] sd 13:0:0:0: [sdb] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB)
2014-07-13T21:15:57.682569+03:00 linux-jspa kernel: [50665.790384] sd 13:0:0:0: [sdb] Write Protect is off
2014-07-13T21:15:57.682570+03:00 linux-jspa kernel: [50665.790390] sd 13:0:0:0: [sdb] Mode Sense: 23 00 00 00
2014-07-13T21:15:57.684736+03:00 linux-jspa kernel: [50665.792157] sd 13:0:0:0: [sdb] No Caching mode page found
2014-07-13T21:15:57.684751+03:00 linux-jspa kernel: [50665.792162] sd 13:0:0:0: [sdb] Assuming drive cache: write through
2014-07-13T21:15:57.709555+03:00 linux-jspa kernel: [50665.817392]  sdb: unknown partition table
2014-07-13T21:15:57.715552+03:00 linux-jspa kernel: [50665.823401] sd 13:0:0:0: [sdb] Attached SCSI removable disk



On 2014-07-13 20:26, robertot5 wrote:

> You mean watching “tail -f /var/log/messages” while running “mount -v
> /dev/sdb /mnt/flashdrive” ?

Absolutely! :slight_smile:

> I just ran that and it doesn’t append anything in /var/log/messages
> mount -v /dev/sdb /mnt/flashdrive

There has to be something. :-o

I just tried with a stick of mine, with a valid partition table; but attempting to mount the raw device instead:


Telcontar:~ # mount -v /dev/sda  /mnt/tmp
mount: /dev/sda is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
Telcontar:~ #

syslog:


<0.4> 2014-07-13 23:57:18 Telcontar kernel - - - [440237.395486] UDF-fs: warning (device sda): udf_fill_super: No partition found (2)

and dmesg says (the last line is the one):


[440223.958541] scsi 15:0:0:0: Direct-Access     TOSHIBA  TransMemory      1.00 PQ: 0 ANSI: 4
[440223.958749] sd 15:0:0:0: Attached scsi generic sg0 type 0
[440223.961049] sd 15:0:0:0: [sda] 15155200 512-byte logical blocks: (7.75 GB/7.22 GiB)
[440223.961656] sd 15:0:0:0: [sda] Write Protect is off
[440223.961659] sd 15:0:0:0: [sda] Mode Sense: 45 00 00 00
[440223.962284] sd 15:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[440223.965914]  sda: sda1
[440223.969033] sd 15:0:0:0: [sda] Attached SCSI removable disk
[440237.395486] UDF-fs: warning (device sda): udf_fill_super: No partition found (2)
Telcontar:~ #

I can force the issue, and assume that it is an vfat filesystem (which it is not):


Telcontar:~ # mount -v -t vfat /dev/sda  /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
Telcontar:~ #

And syslog says:


<0.3> 2014-07-14 00:01:35 Telcontar kernel - - - [440494.339191] FAT-fs (sda): invalid media value (0xb9)
<0.6> 2014-07-14 00:01:35 Telcontar kernel - - - [440494.339195] FAT-fs (sda): Can't find a valid FAT filesystem

which is correct and expected.

There has to be something in the log.

In your case, there is the possibility that your stick is formatted as “exfat”, which is not supported by openSUSE and can not be mounted.

Frankly, I expected to see in the log how mount tried several filesytem types and failed.

Maybe… Have a look at “/etc/sysconfig/syslog”, this line:

KERNEL_LOGLEVEL=7

You probably have “1” in there.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)