2

I found a strange partition table on an 32GB usb stick (Hama FlashPen Elatio 32GB).

The fdisk output differ from gparted:

Disk /dev/sdb: 29.3 GiB, 31466323968 bytes, 61457664 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
Disklabel type: dos
Disk identifier:

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1        778135908 1919645538 1141509631 544.3G 72 unknown
/dev/sdb2        168689522 2104717761 1936028240 923.2G 65 Novell Netware 386
/dev/sdb3       1869881465 3805909656 1936028192 923.2G 79 unknown
/dev/sdb4       2885681152 2885736650      55499  27.1M  d unknown

Partition table entries are not in disk order.

GParted shows a fat32 filesystem.

I know, reformatting would solve this, but why differ the output from fdisk?

Thanks

  • Did you alter the text output before posting as I see sizes in excess of 32G in the results? – George Udosen Aug 26 '18 at 8:13
  • You might want to add a screenshot from "Gparted" too... that might help us to determine the cause of different sizes. – Ravexina Aug 26 '18 at 8:17
  • No, the wrong sizes are from fdisk. – 2IRN Aug 26 '18 at 10:17
  • Sorry, after Ravexina's good explanation, I thought I didn't need these partitions any longer. They are deleted now. However, gparted showed the correct filesystem size. – 2IRN Aug 26 '18 at 10:24
6

The output is correct, what you are missing here is that partition type is differ from a partition's file system.

What you see in fdisk output is partition type and gparted is showing you the filesystems.

To see filesystems of your USB and get a better look you might want to use lsblk"

lsblk -o name,fstype,parttype /dev/sdb

which should give you somthing similar to:

NAME           FSTYPE   PARTTYPE
sdb            
├─sdb1         fat32    0xc
└─sdb2         ntfs     0x7

And the hex code you are observing here simply is the partition type. For example 0x64 and 0x65 means Novell Netware.

From: What's the difference of partition type and filesystem type?

Partitions are nothing more than entry’s in a partition table stored on the hard drive and this table sets the boundary for the start and the end of the partition on the drive and holds some useful information about the partition including its type.

File systems are a way of storing data inside the partitions in a fashion that is easy to manage and read and write data to it. Some do it better than others.

A partition entry in the partition table will need a partition type to help the Operating System know how to handle the partition.

| improve this answer | |
  • I see 32G for the USB but fdisk shows partitions in excess of that size, please explain this! – George Udosen Aug 26 '18 at 8:03
  • @GeorgeUdosen Because the question was about filesystem I didn't pay attention to the size, that might be faked: superuser.com/questions/270194/… – Ravexina Aug 26 '18 at 8:07
  • Glad my evaluation was right, for a minute I began to doubt my training. – George Udosen Aug 26 '18 at 8:11
  • No you're good... :D – Ravexina Aug 26 '18 at 8:16
  • The stick had the original partition table from a sealed USB package. Only fdisk showed wrong sizes. – 2IRN Aug 26 '18 at 10:53
0

It may mean that your device contains a single filesystem instead of a partition table.

Please, see the output (real) from a possibly different USB disk:

# LC_ALL=C fdisk -l /dev/sdc
Disk /dev/sdc: 29.3 GiB, 31457280000 bytes, 61440000 sectors
Disk model: Micro Line      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x07d44e30

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *       32 61439999 61439968 29.3G  c W95 FAT32 (LBA)

And now the result of treating the partition (sdc1) as if it were the whole disk:

# LC_ALL=C fdisk -l /dev/sdc1
Disk /dev/sdc1: 29.3 GiB, 31457263616 bytes, 61439968 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
Disklabel type: dos
Disk identifier: 0x6f20736b

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sdc1p1       778135908 1919645538 1141509631 544.3G 72 unknown
/dev/sdc1p2       168689522 2104717761 1936028240 923.2G 65 Novell Netware 386
/dev/sdc1p3      1869881465 3805909656 1936028192 923.2G 79 unknown
/dev/sdc1p4      2885681152 2885736650      55499  27.1M  d unknown

Partition table entries are not in disk order.

In your case, however, the device was sdb (and not something like sdb1), but I believe that it somehow contains a single FAT32 filesystem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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