4 Title is more clear.
| link

How to format a rogue flash drive? (GParted tries to touch file system footer beyond actual capacity, and freezes up indefinitely)

    Post Closed as "unclear what you're asking" by Rui F Ribeiro, sourcejedi, schily, Isaac, jimmij
3 XY question problem ( http://mywiki.wooledge.org/XyProblem ) addressed.
source | link

On a limbo-type fake USB or SD card, all sectors starting from a specific position on the drive are unavailable (zeroes only or ones only or unreadable sector response).

A flash drive might indicate itself as 256GB but actually has 16 GB only. Anything written beyond the 16GB threshold goes into a digital black hole (hence limbo). When trying to access that data, one of these things might happen:

  • The device returns blank sector with 00000000 (0x00) bytes only.
  • The device returns sector with 11111111 (0xFF) bytes only.
  • The device signalizes the computer that the sector is damaged.
  • The device freezes up for an indefinite timespan and never returns the read request.
  • The device returns random data (very rare type)

On the rogue flash drive I own, the first one is the case. It returns 00 00 00 00 … in all 512 bytes of sectors in all sectors inside the limbo area, which is beyond the actual data capacity.

Using mkfs or gparted on a fake USB (for testing purposes) for creating filesystems does freeze up for an indefinite time.

Both Windows and Android successfully format the SD card to the full alleged capacity needing less than half a minute. This can only be possible when not touching any file system footers that are beyond the actual capacity. Only by modifying headers.
GParted and mkfs freeze up indefinetly (until removing the drive from the PC) and leave a file system indicated with the unknown type in GParted.

How can I format a rogue flash drive in GParted to the full alleged capacity while only writing file system headers?

That would make GParted not touch the limbo area that causes the indefinite freeze (not to confuse with the fourth listed type of sector returns on rogue drives. It is the reaction of GParted).

What I am trying to achieve:

  • Testing how Linux reacts to swapon onto a fake flash drive. Because this is too trivial for StackExchange, I decided to try it out myself.
  • Testing different file systems (ext2, ext3, ext4, FAT16, FAT32, exFAT, f2fs, xfs, zfs, ntfs) on an Android mobile phone: I would like to try recording video using an Android mobile phone, beyond the actual capacity, to see how it reacts.

On a limbo-type fake USB or SD card, all sectors starting from a specific position on the drive are unavailable (zeroes only or ones only or unreadable sector response).

A flash drive might indicate itself as 256GB but actually has 16 GB only. Anything written beyond the 16GB threshold goes into a digital black hole (hence limbo). When trying to access that data, one of these things might happen:

  • The device returns blank sector with 00000000 (0x00) bytes only.
  • The device returns sector with 11111111 (0xFF) bytes only.
  • The device signalizes the computer that the sector is damaged.
  • The device freezes up for an indefinite timespan and never returns the read request.
  • The device returns random data (very rare type)

On the rogue flash drive I own, the first one is the case. It returns 00 00 00 00 … in all 512 bytes of sectors in all sectors inside the limbo area, which is beyond the actual data capacity.

Using mkfs or gparted on a fake USB (for testing purposes) for creating filesystems does freeze up for an indefinite time.

Both Windows and Android successfully format the SD card to the full alleged capacity needing less than half a minute. This can only be possible when not touching any file system footers that are beyond the actual capacity. Only by modifying headers.
GParted and mkfs freeze up indefinetly (until removing the drive from the PC) and leave a file system indicated with the unknown type in GParted.

How can I format a rogue flash drive in GParted to the full alleged capacity while only writing file system headers?

That would make GParted not touch the limbo area that causes the indefinite freeze (not to confuse with the fourth listed type of sector returns on rogue drives. It is the reaction of GParted).

On a limbo-type fake USB or SD card, all sectors starting from a specific position on the drive are unavailable (zeroes only or ones only or unreadable sector response).

A flash drive might indicate itself as 256GB but actually has 16 GB only. Anything written beyond the 16GB threshold goes into a digital black hole (hence limbo). When trying to access that data, one of these things might happen:

  • The device returns blank sector with 00000000 (0x00) bytes only.
  • The device returns sector with 11111111 (0xFF) bytes only.
  • The device signalizes the computer that the sector is damaged.
  • The device freezes up for an indefinite timespan and never returns the read request.
  • The device returns random data (very rare type)

On the rogue flash drive I own, the first one is the case. It returns 00 00 00 00 … in all 512 bytes of sectors in all sectors inside the limbo area, which is beyond the actual data capacity.

Using mkfs or gparted on a fake USB (for testing purposes) for creating filesystems does freeze up for an indefinite time.

Both Windows and Android successfully format the SD card to the full alleged capacity needing less than half a minute. This can only be possible when not touching any file system footers that are beyond the actual capacity. Only by modifying headers.
GParted and mkfs freeze up indefinetly (until removing the drive from the PC) and leave a file system indicated with the unknown type in GParted.

How can I format a rogue flash drive in GParted to the full alleged capacity while only writing file system headers?

That would make GParted not touch the limbo area that causes the indefinite freeze (not to confuse with the fourth listed type of sector returns on rogue drives. It is the reaction of GParted).

What I am trying to achieve:

  • Testing how Linux reacts to swapon onto a fake flash drive. Because this is too trivial for StackExchange, I decided to try it out myself.
  • Testing different file systems (ext2, ext3, ext4, FAT16, FAT32, exFAT, f2fs, xfs, zfs, ntfs) on an Android mobile phone: I would like to try recording video using an Android mobile phone, beyond the actual capacity, to see how it reacts.
2 Correction: “0000 0000 0000 0000”.
source | link

On a limbo-type fake USB or SD card, all sectors starting from a specific position on the drive are unavailable (zeroes only or ones only or unreadable sector response).

A flash drive might indicate itself as 256GB but actually has 16 GB only. Anything written beyond the 16GB threshold goes into a digital black hole (hence limbo). When trying to access that data, one of these things might happen:

  • The device returns blank sector with 00000000 (0x00) bytes only.
  • The device returns sector with 11111111 (0xFF) bytes only.
  • The device signalizes the computer that the sector is damaged.
  • The device freezes up for an indefinite timespan and never returns the read request.
  • The device returns random data (very rare type)

On the rogue flash drive I own, the secondfirst one is the case. It returns FF FF FF00 FF00 FF00 FF00 … in all 512 bytes of sectors in all sectors inside the limbo area, which is beyond the actual data capacity.

Using mkfs or gparted on a fake USB (for testing purposes) for creating filesystems does freeze up for an indefinite time.

Both Windows and Android successfully format the SD card to the full alleged capacity needing less than half a minute. This can only be possible when not touching any file system footers that are beyond the actual capacity. Only by modifying headers.
GParted and mkfs freeze up indefinetly (until removing the drive from the PC) and leave a file system indicated with the unknown type in GParted.

How can I format a rogue flash drive in GParted to the full alleged capacity while only writing file system headers?

That would make GParted not touch the limbo area that causes the indefinite freeze (not to confuse with the fourth listed type of sector returns on rogue drives. It is the reaction of GParted).

On a limbo-type fake USB or SD card, all sectors starting from a specific position on the drive are unavailable (zeroes only or ones only or unreadable sector response).

A flash drive might indicate itself as 256GB but actually has 16 GB only. Anything written beyond the 16GB threshold goes into a digital black hole (hence limbo). When trying to access that data, one of these things might happen:

  • The device returns blank sector with 00000000 (0x00) bytes only.
  • The device returns sector with 11111111 (0xFF) bytes only.
  • The device signalizes the computer that the sector is damaged.
  • The device freezes up for an indefinite timespan and never returns the read request.
  • The device returns random data (very rare type)

On the rogue flash drive I own, the second one is the case. It returns FF FF FF FF FF FF … in all 512 bytes of sectors in all sectors inside the limbo area, which is beyond the actual data capacity.

Using mkfs or gparted on a fake USB (for testing purposes) for creating filesystems does freeze up for an indefinite time.

Both Windows and Android successfully format the SD card to the full alleged capacity needing less than half a minute. This can only be possible when not touching any file system footers that are beyond the actual capacity. Only by modifying headers.
GParted and mkfs freeze up indefinetly (until removing the drive from the PC) and leave a file system indicated with the unknown type in GParted.

How can I format a rogue flash drive in GParted to the full alleged capacity while only writing file system headers?

That would make GParted not touch the limbo area that causes the indefinite freeze (not to confuse with the fourth listed type of sector returns on rogue drives. It is the reaction of GParted).

On a limbo-type fake USB or SD card, all sectors starting from a specific position on the drive are unavailable (zeroes only or ones only or unreadable sector response).

A flash drive might indicate itself as 256GB but actually has 16 GB only. Anything written beyond the 16GB threshold goes into a digital black hole (hence limbo). When trying to access that data, one of these things might happen:

  • The device returns blank sector with 00000000 (0x00) bytes only.
  • The device returns sector with 11111111 (0xFF) bytes only.
  • The device signalizes the computer that the sector is damaged.
  • The device freezes up for an indefinite timespan and never returns the read request.
  • The device returns random data (very rare type)

On the rogue flash drive I own, the first one is the case. It returns 00 00 00 00 … in all 512 bytes of sectors in all sectors inside the limbo area, which is beyond the actual data capacity.

Using mkfs or gparted on a fake USB (for testing purposes) for creating filesystems does freeze up for an indefinite time.

Both Windows and Android successfully format the SD card to the full alleged capacity needing less than half a minute. This can only be possible when not touching any file system footers that are beyond the actual capacity. Only by modifying headers.
GParted and mkfs freeze up indefinetly (until removing the drive from the PC) and leave a file system indicated with the unknown type in GParted.

How can I format a rogue flash drive in GParted to the full alleged capacity while only writing file system headers?

That would make GParted not touch the limbo area that causes the indefinite freeze (not to confuse with the fourth listed type of sector returns on rogue drives. It is the reaction of GParted).

1
source | link