Announcement

Collapse
No announcement yet.

How do I erase directories and files in a READ ONLY system?

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

    How do I erase directories and files in a READ ONLY system?

    While updating my 13.04 installation I ran out of space on the partition in question without prior notice. In the process of backing up and rearranging storage media, directories and files I had erased a very large number of data, which I all disposed of using "empty trash" function in Dolphin.
    Well, apparently the files disappear from the visible Trash bin but remain on the computer in hidden locations.
    Result: I used up almost all available space on the partition leaving not enough to complete a routine update.
    Now my system is stuck in an unusable state until I can manage to eliminate the all trash files in several hidden places.

    Unfortunately both rescue console and entering 13.04 via live CD result in a READ ONLY file system that does not allow me to erase any file.

    My question:

    How do I set the partition back to RW?
    (Changing properties in fstab does not work)

    How else can I erase the offending files?

    Once that is achieved I can finish restore functionality by doing dpkg --configure -a and so on.
    Last edited by Snowhog; Oct 21, 2013, 09:17 PM.

    #2
    There's a couple of ways to get at this. Try booting to the liveCD, mounting the offending filesystem somewhere, if it mounts r/o (read only) then run fsck on it, then you should be able to mount it r/w (read write).

    Another way I've solved this: Boot into safe/root mode, run fsck, it should then let you re-boot into safe mode with r/w, then delete the offending data and reboot.

    Please Read Me

    Comment


      #3
      BTW: another possibility is to force a re-mount thusly;

      sudo mount -o remount,rw /partition/identifier /mount/point

      Please Read Me

      Comment


        #4
        Thank you for the info.

        Strange thing is that now it shows the partition in question in linux gparted/partition manager as mounted and ext4.
        Rescue mode:
        Trying to run fsck on /dev/sda does not work because it is busy.
        fsck on sda1 (the troubled partition) checks and gives results that I cannot repeat here because I cannot copy the text.

        And as I said, XP has it as healthy and working. Linux also says it is clean.
        I say all my files are there.
        Otherwise I would just reinstall the system as the cleanest and best solution. I have all the important data - except for saved passwords (Firefox, etc) and some other minor settings that can be a nuisance to re-install over and over again.

        I went with a live CD all the way to modifying the partitions without any trouble.

        Comment


          #5
          Also solved - sort of.
          Oshunluvr's suggestions did not really work - neither from rescue mode nor from Live CD.
          Yet, as I said before, other Linux installations and Windows XP did see the partition table correctly.

          This is how I got around the obstacles:

          Installed 12.04 in a spare partition. .
          Start Dolphin in root mode. It did show the damaged partition and all files. Everything intact.
          Search manually for the largest file/Trash file possible. I knew from fdisk and testdisk used in rescue mode that there had to be an extremely large file/directory or something like that. Also remembered that I had asked for a 'backup' in testdisk.
          Found a file "image.dd" in root directory (I believe) The file was huge. Took a guess and a chance by deleting it. Usage of the partition in question dropped by 75 percent to the expected 25 percent used.
          Tried to boot into 13.04 No luck because something with xserver is no longer installed right.

          But that can be corrected. Since I cannot use a installation DVD for 13.10 (my DVD drive is not detected though CD drive works just fine), I downloaded two Ubuntu mini.iso's for 13.04 and 13.10 each.

          OK, neither of the solution above work.
          That brings up an entirely new thread.

          This one is solved.

          Comment

          Working...
          X