Page 1 of 5 123 ... LastLast
Results 1 to 10 of 49

Thread: Kernel bug ? unknown partition table on some usb flash drives

  1. #1

    Default 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
    Code:
    [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
    Code:
    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
    Code:
    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
    Code:
    /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"
    OpenSUSE Leap 42.2 x64 KDE

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,363
    Blog Entries
    3

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    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.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    This is what "testdisk" says on analysing the flash drive

    Code:
    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)
    OpenSUSE Leap 42.2 x64 KDE

  4. #4

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    Quote Originally Posted by nrickert View Post
    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.
    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
    OpenSUSE Leap 42.2 x64 KDE

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    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)

  6. #6

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    Quote Originally Posted by robin_listas View Post
    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
    OpenSUSE Leap 42.2 x64 KDE

  7. #7

    Default AW: Re: Kernel bug ? unknown partition table on some usb flash drives

    Quote Originally Posted by robertot5 View Post
    on mounting either SDB or SDB1 i get
    Code:
    mount: special device /dev/sbd does not exist
    Try:
    Code:
    mount /dev/sdb /mnt
    Of course /dev/sbd does not exist.
    Last edited by wolfi323; 12-Jul-2014 at 16:58.

  8. #8
    Join Date
    Jun 2008
    Location
    Kansas City Area, Missouri, USA
    Posts
    7,235

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    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!



  9. #9

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    Quote Originally Posted by lwfinger View Post
    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
    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.
    mount /dev/sdb1
    Code:
    mount: special device /dev/sdb1 does not exist
    OpenSUSE Leap 42.2 x64 KDE

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Kernel bug ? unknown partition table on some usb flash drives

    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)

Page 1 of 5 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •