0

This question already has an answer here:

So, I have an old Sandisk Cruzer Edge 4GB USB drive, And I know how to format the usb, so I did what works for all USB drives, first, I used fdisk -l to find my USB's file-system. Heres what came up:

Disk /dev/sdb: 4004 MB, 4004511744 bytes
124 heads, 62 sectors/track, 1017 cylinders, total 7821312 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: 0x0000000

Disk /dev/sdb doesn't contain a valid partition table

So, I'm going on, I successfully unmounted the USB, then ran the command sudo mkfs.ext4 /dev/sdb I get the error:

user@user:~$ sudo mkfs.ext4 /dev/sdb
mke2fs 1.42.9 (4-Feb-2014)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y

/dev/sdb: Read-only file system while setting up superblock

Please help? Thanks for any help!

PS: My USB doesn't show up in GParted, so don't tell me to try that please :)

marked as duplicate by David Foerster, Eric Carvalho, karel, pomsky, Fabby Mar 17 '18 at 20:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • /dev/sdb is entire device, not just one partition! tells you everything you need to know. You need to first create a partition (/dev/sdb1). I would tell you to use gparted, but you can also use cfdisk /dev/sdb if you prefer that. Then, sudo mkfs.ext4 /dev/sdb1 will work – noleti Aug 2 '14 at 7:11
  • @noleti Alright, so I followed what you said, I put the usb into my computer, unmounted it and tried to create a partition using cfdisk (because like I said gparted doesn't find the usb). Heres what happened root@user cfdisk /dev/sdb Opened disk Read-Only - You have no permission to write And from there all my changes inside cfdisk (even as root!) aren't saved and I still can't format the usb – Redrield Aug 3 '14 at 18:12
  • @purbleguy Have you tried to use Chromebook/Windows to format the USB stick? – Léo Léopold Hertz 준영 Aug 25 '16 at 6:31
1

When a pendrive or memory card is read-only

  • On some pendrives and on many memory cards there is a small mechanical switch for write protection, that can toggle between read/write and read-only. You might have set it read-only without intention.
  • Reboot the computer and try again to wipe the first megabyte with mkusb.
  • Try other USB ports and another computer.
  • If you still cannot wipe the first megabyte of the drive, and the drive is read-only, it is 'gridlocked', and the next stage is that it will be completely dead.

Pendrive lifetime

But there is still hope, because this symptom can also be caused by a severely damaged partition table. Try to wipe the first megabyte (overwrite with zeros). If this works, you can use gparted or another tool to create a partition table, and after that partitions again.

mkusb

wipe the first megabyte

If this does not work, the pendrive is damaged beyond repair (for normal users).

There are more details at the following link,

Can't format my usb drive. I have already tried with mkdosfs and gparted

0

It looks like this could be a hardware bug of the SanDisk Cruzer Edge. A sudo cfdisk /dev/sdb should never return Opened disk Read-Only - You have no permission to write. Quick googling shows that this is a common problem. If you still have warranty, I would try to exchange the Cruzer.

Other related questions:

https://superuser.com/questions/661108/how-to-remove-write-protection-from-sandisk-cruzer-switch-pen-drive

  • Alright, I really dont mind not being able to use that. I have a working 16g pen drive, and that was a means to an end. Thanks for the help :) – Redrield Aug 4 '14 at 6:53

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