fdisk not working on pendrive - TechRepublic
Question
November 30, 2008 at 06:10 PM
johnking84

fdisk not working on pendrive

by johnking84 . Updated 17 years, 7 months ago

When i connect my pendrive to a usb slot and use fdisk -l to see the partitions, it shows this regarding the pendrive device:

“Disk /dev/sdb: 8493 MB, 8493465600 bytes
64 heads, 32 sectors/track, 8100 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0xffffffff

Disk /dev/sdb doesn’t contain a valid partition table”

So i proceeded to use fdisk /dev/sdb, and this shows:

“Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xcd096fb7.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

The number of cylinders for this disk is set to 8100.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): ”

then in the prompt, i first use ‘n’, to create a new partition. After creating a primary partition, i use ‘t’ to make it a FAT32 partition. Using ‘p’, i can see that the changes were done, in the memory at least. After that, i type ‘w’ so it will write the changes to disk. Here’s what happens:

“The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.”

It is done. In theory, now /dev/sdb1 should exist, and i should be able to format it using mkdosfs -F 32 /dev/sdb1. But, when i run that command, this happens:

“mkdosfs 2.11 (12 Mar 2005)
/dev/sdb1: No such file or directory”

Very annoyed by that fact, i go back to fdisk and press ‘p’ so it will list the partition on the device. There is none! Seems like fdisk didn’t write the partitions to the device! Needless to say, i was very, very bothered by it.

There’s no locking key on the device (it’s a kingston data traveler 400 8GB). For some odd reason, there’s no LED on my pendrive, seems like it’s missing. I’ve also tried to format it on windows vista. On windows, after all the time it takes to format it, in the end there’s an alert box saying “Windows was unable to complete the format”. What can i do to have my pendrive working? Please don’t say it is dead… T_T

This discussion is locked

All Comments