How can I repair casper-rw file system file in LiveUSB

9,293

This seems to be a common issue and has been going for some time. Using the ubuntu-11.04-desktop-i386.iso I am still having issues with this. https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/125702

The way I have mounted the casper-rw file is doing the following.

  • Mount your USB key
  • sudo fsck -y -t ext3 /media/[drive]/casper-rw

Some users, including myself, are still reporting issues even after doing this so ymmv.

You might want to start backing up your loop file and keeping it only as large as you need. Before doing this resize make sure you back it up but here are the basics.

  • Boot without using persistent or use another system
  • Insert and mount your device that contains the loop file
  • dd if=/dev/zero bs=1M count=1024 >> casper-rw
    • Where 1024 is larger than your current used
  • resize2fs casper-rw

Using this method you should be able to keep your loop files only as large as needed, have some backups and if all else fails be able to fsck them.

Share:
9,293

Related videos on Youtube

Madhur Ahuja
Author by

Madhur Ahuja

“The best thing about a boolean is even if you are wrong, you are only off by a bit.” (Anonymous)

Updated on September 17, 2022

Comments

  • Madhur Ahuja
    Madhur Ahuja over 1 year

    While booting Ubuntu and mounting my casper-rw file for persistent storage, Ubuntu recommends me to check for errors using fsck. However, when I boot into my system, since the casper-rw is automatially mounted and cannot be unmounted, it refuses to repair errors in my casper file system.

    Even If I boot without persistent option, fsck cannot repair my casper-rw file saying that its read-only file system. Is there any way to check and repair errors in casper-rw ?

    • shroff
      shroff over 13 years
      Could you elaborate a little more on where you got the "read-only filesystem" error?
    • Bruno Pereira
      Bruno Pereira over 12 years
      This question seems abandoned, there is not further information or activity added to it for several months. I am flagging this to be closed by a moderator. If you think this issue is still affecting you you can flag a moderator to re-open it.
  • Michael
    Michael over 10 years
    How do you fsck the drive if you are booted off it? I don't get an option to boot without persistance.