Announcement

Collapse
No announcement yet.

What is a "Read-only file system"? [SOLVED]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is a "Read-only file system"? [SOLVED]

    Using Kubuntu 8.04. No updates or OS changes since first successful effort. Flash drive suddenly responds with "Read-only file system".

    I have a new Kingston 8GB USB flashdrive. I put a directory with some files on it and that was successful. A few days later I now I want to write to it again but it just says:
    cannot create directory `/media/KINGSTON/OCT-2010(vanetc)': Read-only file system
    I tried sudo and it says the same. I also tried just creating a file (as both user and root) with a text editor, and get the same results. Changing permissions and ownership is unsuccessful and seemingly unrelated since root can't override it.

    How does Kubuntu change a FAT file system to read-only without my interaction?
    What has changed?
    Where is this problem coming from?

    #2
    Re: What is a "Read-only file system"?

    I'll suggest that at some point prior to this problem you had worked on this USB flashdrive and unplugged it without using the safely remove device option, which ensures that the filesystem is clean before it is unmounted. You may need to run fsck on it.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: What is a "Read-only file system"?

      I think it refuses to mount rw when fsck is needed, so you end up with "ro".

      Comment


        #4
        Re: What is a "Read-only file system"?

        These things do happen! When I get a new flash drive, first things I do: (1) Use dd command to zero it out, the whole thing. Then (2) Use a GParted live CD to format it (starting with a MBR, then the partitions). Overkill, but that way I'm from scratch.
        I know you know the dd, Ole, but I'll post this anyway:
        -- The dd Command
        http://kubuntuforums.net/forums/inde...opic=3090824.0
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: What is a "Read-only file system"?

          Originally posted by Snowhog
          I'll suggest that at some point prior to this problem you had worked on this USB flashdrive and unplugged it without using the safely remove device option, which ensures that the filesystem is clean before it is unmounted. You may need to run fsck on it.
          I bet you're right. I had no idea that it made a difference. I have set up automout on several systems recently and usually the unmount problem is solved by making it happening automatically 1 or 2 seconds after mounting. The drive being only mounted upon access. I guess (K)Ubuntu has it's own special scheme. I wish I knew what it was.

          Originally posted by dibl
          I think it refuses to mount rw when fsck is needed, so you end up with "ro".
          Thanks, it seems like the consensus here is to run fsck. I'll try it.

          Originally posted by Qqmike
          These things do happen!
          Especially when someone (me) doesn't know not to just pull it out!

          When I get a new flash drive, first things I do: (1) Use dd command to zero it out, the whole thing. Then (2) Use a GParted live CD to format it (starting with a MBR, then the partitions). Overkill, but that way I'm from scratch.
          I've tried formatting these things but it seems like the only think that works is Win95-fat. I think that's a special version of fat32. Anyway, if the FS is not recognizable by MS-Windows machines then it is basically useless. So no ReiserFS or Minix, or a whole long list of file systems that we can read in Linux.

          I know you know the dd, Ole, but I'll post this anyway:
          -- The dd Command
          http://kubuntuforums.net/forums/inde...opic=3090824.0
          Actually I'm pretty ignorant. I just put on a shirt and tie before I show up here, so nobody can tell the difference.

          Edit: Thanks all!!!

          Comment


            #6
            Re: What is a "Read-only file system"?

            One more thing

            A little fiddling about and I discovered that there are a number of different fsck versions in /sbin. My first attempt using plain fsck with vfat just corrupted the data instead of fixing it. No big deal - I got copies (or I wouldn't be doing this). The big deal is that the drive works perfectly "rw" after doing:

            Code:
            sudo /sbin/fsck.vfat -a /dev/sdc1
            I just thought I should post that so that future Googlers can see the practical solution. Remember to unmount the device first and to use the right device name. The device name will be revealed by:
            Code:
            sudo fdisk -l
            after which you can make sure it is unmounted by:
            Code:
            sudo umount /dev/sdc1
            and then proceed to step one.

            Comment

            Working...
            X