[Bugme-new] [Bug 10808] New: Kernel Reports "Unknown Partition Table" On Valid USB Keys

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Tue May 27 12:58:09 PDT 2008


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

           Summary: Kernel Reports "Unknown Partition Table" On Valid USB
                    Keys
           Product: File System
           Version: 2.5
     KernelVersion: 2.6.25.4
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: FAT/VFAT/MSDOS
        AssignedTo: hirofumi at mail.parknet.co.jp
        ReportedBy: tony at awtrey.com


Latest working kernel version:   N/A (never worked afaik)
Earliest failing kernel version: 2.6.24.2 and 2.6.25.4 both have this issue
Distribution: Debian
Hardware Environment: Panasonic Toughbook CF-18 (not platform specific)
Software Environment: Debian Etch + latest vanilla kernel from kernel.org

Problem Description:

The check_partition() function in fs/partitions/check.c fails to identify the
partition table on commonly available pre-formated USB keys.

This might be a an issue with the partition table generated in the USB flash
disk manufacturing process. However, with that being said there are two Linux
command-line utilities (fdisk and disktype) which can correctly identify the
partition table. It seems silly to take the stand that the USB key has an
invalid partition table therefore the kernel should ignore it and require the
user to repartition and reformat their device before they can use it under
Linux. This partition and file system works fine under Windows and Mac OS.

Steps to reproduce:

 1) Take the attached compressed dd image and write it to a removable USB block
device.
 2) Remove and plug in the block device.
 3) Run dmesg and confirm you get something like this:

#dmesg
...
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 5:0:0:0: Direct-Access     CBM      Flash Disk       4.00 PQ: 0 ANSI: 2
sd 5:0:0:0: [sdb] 127971 512-byte hardware sectors (66 MB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sd 5:0:0:0: [sdb] 127971 512-byte hardware sectors (66 MB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 5:0:0:0: [sdb] Assuming drive cache: write through
 sdb: unknown partition table
sd 5:0:0:0: [sdb] Attached SCSI removable disk

 5) Run the fdisk command and verify the partition is really there:

# fdisk -l /dev/sdb

Disk /dev/sdb: 65 MB, 65521152 bytes
4 heads, 32 sectors/track, 999 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1000       63969+   6  FAT16

 5) Run the disktype command and confirm the partition and file system are
really there:

# disktype /dev/sdb

--- /dev/sdb
Block device, size 62.49 MiB (65521152 bytes)
DOS/MBR partition map
Partition 1: 62.47 MiB (65504768 bytes, 127939 sectors from 32, bootable)
  Type 0x06 (FAT16)
  Windows NTLDR boot loader
  FAT16 file system (hints score 4 of 5)
    Volume size 62.21 MiB (65229824 bytes, 63701 clusters of 1 KiB)

 6) Set up a loop device to access the file system directly.

# modprobe loop
# losetup -o 16384 /dev/loop0 /dev/sd? <-- your device node goes here
# mount -t vfat /dev/loop0 /mnt
# ls /mnt
fat16.txt
# cat /mnt/fat16.txt
This is a fat16 file system on a usb key.

This particular key came with a CelleBrite cell phone dumping appliance that
runs Windows CE, but I've seen this issue on a dozen or so brand new USB keys
I've bought over the last year or so.

I'll attach the disk image after I create this issue.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list