Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I am trying to format my pendrive, I'm getting the following error.

root@obbu-G41M-Combo:/home/obbu# mkfs.vfat -n 'Ubuntu' -I /dev/sdb1
mkfs.vfat 3.0.14 (23 Jan 2023)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system
share|improve this question
Please execute the following command and update your question with the response: cat /etc/fstab – Colyn1337 Aug 19 '13 at 17:42
The content of /proc/mounts would be helpful too. – David Foerster Oct 2 '13 at 23:19

Try copying all your files on the drive somewhere else. Then:

  • Install gparted:

    sudo apt-get install gparted
  • Run gparted and select the drive (/dev/sdb ?)

  • Click on the Device from menu and select Create partition

  • Right click on the Unallocated space and click Create partition.
  • Create a new msdos partition and click the apply button.

If the problem lies with the drive itself this might help. If the problem lies with the way Ubuntu is handling pen drives then we would need logs as @gertvdijk pointed out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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