1

I have installed Xubuntu on a USB stick and created some files. Later there was a problem with Xubuntu, so I made a backup and re-installed it.

The wayt I made the backup, isn't exacly the right way of doing it (I'm not so familiar with this subject :) ):

I cnnected the USB stick to a running Windows computer and just copied all the files I found there form the USB stick ("My Computer") to the windows computer.

The files I copied are some folders (e.g. .disk, boot, casper, dists, EFI and some more.) and some files (e.g. casper-rw, md5sum.txt, menu.c32, README.diskdefines, syslinux.cfg and more.)

Now I want to recover some files from my desktop in Xubuntu in order to edit them in Windows or even linux.

I notices in the folder casper there are few files:

  • filesystem.manifest
  • filesystem.manifest-remove
  • filesystem.size
  • filesystem.squashfs
  • initrd.lz
  • vmlinuz.efi

The biggest file there, filesystem.squashfs, weights almost 1 GB, so I have a reason to beleive that this file contains my files from Xubuntu.

How can I exctract them? I can use linux (I have a new, working version of Xubuntu on the same USB stick, while the "backup" is located on the C drive of the hosting computer)

Thanks!!

Reuven Karasik
  • 115
  • 1
  • 6
  • Basically you need to mount the file. Please read http://www.tldp.org/HOWTO/SquashFS-HOWTO/whatis.html and then http://unix.stackexchange.com/questions/80305/mounting-a-squashfs-filesystem-in-read-write – Rinzwind Jan 22 '15 at 09:04
  • Thanks! I installed the squashfs tools and I'm trying this right now. It takes a lot of time, (157627 files ;) ) but from what I can see now, it looks just like what I needed. Thank you so much! I'll update you when it's over. – Reuven Karasik Jan 22 '15 at 09:50
  • ... :'( the `home` folder is empty... Perhaps the file I found is... Some sort of initial backup the installer created automatically. Perhaps there's a different file which actually has **my** files? – Reuven Karasik Jan 22 '15 at 10:31
  • How did you "install" onto the USB? I usually see `filesystem.squashfs` as part of the live ISO, and "casper" part of the persistent feature, I think `casper-rw` used to be the "filesystem in a file" that stored your changed/personal files... – Xen2050 Jan 22 '15 at 11:24
  • The files you create in a LiveUSB are saved in the `casper-rw` file. – Eric Carvalho Jan 22 '15 at 14:29
  • possible duplicate of [How to access my saved files on a persistent LiveUSB?](http://askubuntu.com/questions/311508/how-to-access-my-saved-files-on-a-persistent-liveusb) – Eric Carvalho Jan 22 '15 at 14:29
  • Xen2050- i ran a diskless virtual machine with an iso as a "cd drive", and booted from the "cd". – Reuven Karasik Jan 22 '15 at 15:55
  • Eric Carvalho - looks like what I need... I'll check it out soon – Reuven Karasik Jan 22 '15 at 15:56

1 Answers1

0

From your overall question, and comments like:

  • i ran a diskless virtual machine with an iso as a "cd drive", and booted from the "cd".

It sounds to me like you may have only been running "live" with no persistence. Especially given the iso in the VM's "cd drive", I'm suspecting there might not be any saved files to recover, unless the VM saved them somehow...

But, maybe using a USB it did let you save persistent data. If there is a casper-rw file then you should be able to mount it and take a look, as Eric's comment suggests, with

mkdir /tmp/casper
sudo mount -o loop /path/to/casper-rw /tmp/casper
Xen2050
  • 8,588
  • 4
  • 32
  • 51
  • I **do** have persistence, sorry I didn't mention it. Where can I find this `casper-rw` file? – Reuven Karasik Jan 22 '15 at 17:53
  • Ok. Then it should be in the files you copied, you mentioned *"some files (e.g. casper-rw,..."* – Xen2050 Jan 22 '15 at 18:04
  • Dude, you saved my life! It's amazing! always fun to learn something new :) – Reuven Karasik Jan 22 '15 at 20:04
  • Actually... hold on.. I copied the files, they contain `ry_Certification_Authority_-_G3.crt, mozilla/GeoTrust_Universal_CA.crt, mozilla/GeoTrust_Universal_CA_2.crt, mozilla/GlobalSign_Root_CA.crt, mozilla/GlobalSign_Root_CA_-_R2.crt, mozilla/GlobalSign_Root_`.... WHY??? – Reuven Karasik Jan 22 '15 at 20:10
  • I guess it's my fault, because the XFCE config files were recovered correctly... I don't know why it happened to these files, but fine. thanks again! Next time I'll know not to create files on linux without Dropbox or some other automatic backup services. – Reuven Karasik Jan 23 '15 at 09:38
  • Always best to have a good backup of important data (on a hard drive, another USB/DVD, online... encrypted is good too) – Xen2050 Jan 24 '15 at 04:56