1

We just bought a brand new Kingston USB drive, and works in Windows. But when I put in Linux box (specifically BusyBox), it failed to detect the partition table.

Message:

[1281146.061161] usb 1-1: device vabcd p1234 is not supported
[1281146.067373] usb 1-1: New USB device found, idVendor=abcd, idProduct=1234
[1281146.076624] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1281146.084502] usb 1-1: Product: UDisk
[1281146.093912] usb 1-1: Manufacturer: General
[1281146.099619] usb 1-1: SerialNumber: Љ
[1281146.113086] usb-storage 1-1:1.0: USB Mass Storage device detected
[1281146.122513] scsi11 : usb-storage 1-1:1.0
[1281146.136979] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
[1281147.140547] scsi 11:0:0:0: Direct-Access     General  UDisk            5.00 PQ: 0 ANSI: 2
[1281147.168651] sd 11:0:0:0: [sdc] 15728640 512-byte logical blocks: (8.05 GB/7.50 GiB)
[1281147.176913] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
[1281147.199284] sd 11:0:0:0: [sdc] Write Protect is off
[1281147.208214] sd 11:0:0:0: [sdc] Mode Sense: 0b 00 00 08
[1281147.217705] sd 11:0:0:0: [sdc] No Caching mode page found
[1281147.223779] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[1281147.243386] sd 11:0:0:0: [sdc] No Caching mode page found
[1281147.249719] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[1281147.261347]  sdc: unknown partition table
[1281147.279744] sd 11:0:0:0: [sdc] No Caching mode page found
[1281147.292064] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[1281147.315483] sd 11:0:0:0: [sdc] Attached SCSI removable disk

Also did a:

root@WG6600_DNP3:~# ls -al /dev/sd*
brw-rw---- 1 root disk 8, 32 Aug 29 08:06 /dev/sdc

As you can see, BusyBox detects this drive but not its partition, hence no /dev/sdc1 so I cannot mount this.

I tried using mkfs.ext4 command but still nothing happens since that same error came up:

"sdc: unknown partition table".

I tried using another USB drive I have lying around and it works ok on the BusyBox machine. So I am wondering why won't it detect our brand new USB drive?

Giacomo1968
  • 58,727
GeneCode
  • 427

2 Answers2

1

This isn't actually an "issue" but just a lack of knowledge on my part as a newbie in Unix operating system.

To elaborate, the USB drive that I newly bought turns out has an unidentified (or possibly garbage) partition and that is the reason our BusyBox machine was unable to recognize it.

A USB drive or any drive are often represented as paths in the /dev folder, such as:

/dev/sda
/dev/sdb

And its partition(s) will be represented with the drive path and numbers. For example, /dev/sda1 (first partition), /dev/sda2 (second partition). For our busybox machine, it was not able to recognize the partition format and so it refuse to map any partitions altogether.

To list down the device info, use the fdisk command with the "-l" argument.

fdisk -l /dev/sda

After doing this, I was able to see the device unknown partitions:

Disk /dev/sda: 8016 MB, 8016363520 bytes
247 heads, 62 sectors/track, 1022 cylinders, total 15656960 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 identifier: 0x6f20736b

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

Device Boot Start End Blocks Id System /dev/sda1 ? 778135908 1919645538 570754815+ 72 Unknown /dev/sda2 ? 168689522 2104717761 968014120 65 Novell Netware 386 /dev/sda3 ? 1869881465 3805909656 968014096 79 Unknown /dev/sda4 ? 2885681152 2885736650 27749+ d Unknown

So what I did was to delete all partitions using fdisk again.

fdisk /dev/sda (without any argument)

Then you can use fdisk's built in commands to delete partitions. Press 'd' and select no. of partition to delete and repeat till all partitions are deleted.

Then press 'n' to create a new partition, then 'p' to select primary partition, and just enter to select default configurations. Once done, you can then format the partition with mkfs command.

mkfs.vfat -n MYUSB /dev/sda1

After this, our BusyBox was able to detect the partition and mount it as normal.

Giacomo1968
  • 58,727
GeneCode
  • 427
0

I saw your previous answer, I dont think that you need to create a partition, you could just mount the device itself (without any partition). Next time try to use the command:

lsblk

And it will give you the list of the block devices, and even:

lsblk -f

Will give you the list of the blockdevices and the filesystem attached to them.

Giacomo1968
  • 58,727