LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 03-30-2013, 12:46 AM   #1
steak1987
Member
 
Registered: Jan 2012
Posts: 128

Rep: Reputation: Disabled
Question Persistent USB backups ?


Hey, im running linux (mint, 14, XFCE)off of a USB drive with persistence. The only issue is, occasionally, some config files get buggered, forcing me to re-create a USB drive with persistence (because I lack the expertise to rectify the issues).

Reading these instructions:

http://www.linuxliveusb.com/en/help/...rsistent-data-

it seems to be a fairly trivial job of backing up persistent files. When I copy the 'casper-rw' files, exactly what is saved ?

Do I get a copy of any wireless drivers, or dekstop configurations, or 3rd party applications installed onto the system ?

Is there any way to browse these persistent files and extract documents and images?
 
Old 03-30-2013, 06:36 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,488

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
<caveat> I am not a Ubuntu user - haven't been for quite a while.</caveat>

I would expect that "casper-rw" file (singular) to be a loop-mountable file-system - using Linux. You should then be able to investigate the files there-in.
Looking on the web indicates any changes you make - software installs included - should be retained there.
 
Old 03-30-2013, 08:19 AM   #3
steak1987
Member
 
Registered: Jan 2012
Posts: 128

Original Poster
Rep: Reputation: Disabled
Thanks for your input. Would anybody else have some information or idea as to what sort of information would be retained in the persistence file ? I tried looking it up but haven't been able to find any conclusive information. All the information seems to be focused around making these files and using them with various OSs.
 
Old 03-30-2013, 01:28 PM   #4
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Not sure if this is really going to answer your question, but I use the latest Lubuntu customised on a usb stick and my casper-rw file is actually a persistent partition. In your case I suspect it would be a directory somewhere that is used, and when you, or the operating system makes changes to the file or directory, the files and directory and written to the persistent directory, which will be relevant to the root directory, eg if you modify the /etc/resolv.conf, then it would create a directory /etc under the persistent directoy, with the resolve.conf in it, so any files like your wireless drives should be in this persistent directory, i'm really only making a guess with this since mines is actually a partition which I can backup the files normally, such as buring them to disc, or across the network to another loaction, etc..

If you would like to use a persistent partition with yours, it's quite easy to setup, or you need is GParted, and UnetbootIn, these can be installed the usual way

sudo apt-get install gparted unetbootin

First use gparted to make 2 partitions on your usb stick, make the first partition a few hundred mb bigger than your iso image, eg. if your iso is 700mb, make your fist partition 1000mb. Then use the rest of the space for your second partition, then give the second partition a label called casper-rw. Ubuntu iso's and it's variants, through the boot process, any partition label as casper-rw found during bootup, is considered a persistent, writeable partition and will write all files and directories which are modified during the normal course of operation.

Once you have finished creating your partitions and exited GParted, open UnetbootIn, use the iso button to find your downloaded iso image you wish to use, then there is a section that asks for the size of your persistent paritition, I set this to 9999mb, not sure if this really makes a difference because one of my usb sticks actually has a 28gb partition and it uses the whole 28gb for the second casper-rw partition. then write the iso image to the usb stick will take a few minutes, then you should have a new usb stick with 2 partitions that you can easily backup, the casper-rw partition will be visible under your file manager, so you can easily backup your files anyway you see fit. I'm currently running 4 usb sticks this way for the last 6mmonths with no problems.

I not sure why yours is corrupting the files all the time, you may have a bad usb stick, or possible bad ram.
 
Old 03-30-2013, 11:05 PM   #5
steak1987
Member
 
Registered: Jan 2012
Posts: 128

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fotoguy View Post
Not sure if this is really going to answer your question, but I use the latest Lubuntu customised on a usb stick and my casper-rw file is actually a persistent partition. In your case I suspect it would be a directory somewhere that is used, and when you, or the operating system makes changes to the file or directory, the files and directory and written to the persistent directory, which will be relevant to the root directory, eg if you modify the /etc/resolv.conf, then it would create a directory /etc under the persistent directoy, with the resolve.conf in it, so any files like your wireless drives should be in this persistent directory, i'm really only making a guess with this since mines is actually a partition which I can backup the files normally, such as buring them to disc, or across the network to another loaction, etc..

If you would like to use a persistent partition with yours, it's quite easy to setup, or you need is GParted, and UnetbootIn, these can be installed the usual way

sudo apt-get install gparted unetbootin

First use gparted to make 2 partitions on your usb stick, make the first partition a few hundred mb bigger than your iso image, eg. if your iso is 700mb, make your fist partition 1000mb. Then use the rest of the space for your second partition, then give the second partition a label called casper-rw. Ubuntu iso's and it's variants, through the boot process, any partition label as casper-rw found during bootup, is considered a persistent, writeable partition and will write all files and directories which are modified during the normal course of operation.

Once you have finished creating your partitions and exited GParted, open UnetbootIn, use the iso button to find your downloaded iso image you wish to use, then there is a section that asks for the size of your persistent paritition, I set this to 9999mb, not sure if this really makes a difference because one of my usb sticks actually has a 28gb partition and it uses the whole 28gb for the second casper-rw partition. then write the iso image to the usb stick will take a few minutes, then you should have a new usb stick with 2 partitions that you can easily backup, the casper-rw partition will be visible under your file manager, so you can easily backup your files anyway you see fit. I'm currently running 4 usb sticks this way for the last 6mmonths with no problems.

I not sure why yours is corrupting the files all the time, you may have a bad usb stick, or possible bad ram.
Thanks for your detailed reply. Should the second persistence file be formatted as FAT32 ? Or Ext4 ? What filesystem should I use ?

Also, so just to confirm, if I create a flashdisk with 2 partitions, one for the bootable ISO, and the other labelled casper-rw, ubuntu will boot up but all modifications and settings, and wireless drivers and things like that will be installed and run from the casper-rw partition ?
 
Old 03-31-2013, 02:33 AM   #6
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Quote:
Originally Posted by steak1987 View Post
Thanks for your detailed reply. Should the second persistence file be formatted as FAT32 ? Or Ext4 ? What filesystem should I use ?

Also, so just to confirm, if I create a flashdisk with 2 partitions, one for the bootable ISO, and the other labelled casper-rw, ubuntu will boot up but all modifications and settings, and wireless drivers and things like that will be installed and run from the casper-rw partition ?
You can have either format for your partitions, I have all mine formatted to ext4, the ext4 is a better file system for flash drives, takes advantage of things like trim and other improvements the later filesystems support, also fat32 has a 4gb file limit.

Yes when Ubuntu boots, all files that are modified or create during and after the boot up process will be stored on the second partition (casper-rw). You should be able to backup that partition. You can test this after you have installed everything on the usb stick, just create a blank file in your home directory and reboot, it should be there when you boot back up again. Also if you want you can also create a separate partition for the home directories as well, just have to create a third patition at the same times as the first two and label it home-rw Ubuntu will then give you a separate persistent home partition as well.

Last edited by fotoguy; 03-31-2013 at 02:34 AM.
 
Old 03-31-2013, 10:31 PM   #7
steak1987
Member
 
Registered: Jan 2012
Posts: 128

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fotoguy View Post
You can have either format for your partitions, I have all mine formatted to ext4, the ext4 is a better file system for flash drives, takes advantage of things like trim and other improvements the later filesystems support, also fat32 has a 4gb file limit.

Yes when Ubuntu boots, all files that are modified or create during and after the boot up process will be stored on the second partition (casper-rw). You should be able to backup that partition. You can test this after you have installed everything on the usb stick, just create a blank file in your home directory and reboot, it should be there when you boot back up again. Also if you want you can also create a separate partition for the home directories as well, just have to create a third patition at the same times as the first two and label it home-rw Ubuntu will then give you a separate persistent home partition as well.
Thanks for your explanations, Ill wait for my new flashdrive to come in, then I'll update this thread as necessary.
 
Old 04-01-2013, 01:27 AM   #8
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Glad I could help, let me know how's things go when you get the new flash drive.
 
Old 04-09-2013, 03:05 AM   #9
steak1987
Member
 
Registered: Jan 2012
Posts: 128

Original Poster
Rep: Reputation: Disabled
I finally got my USB Flash Drive the other day, and followed the steps. It booted up fine, but any changes I made didnt persist. Furthermore I wasnt able to install any applications/packages. I reverted to using the tool I have always used to make a normal flashdrive, with a 4gb persistance file :

http://www.pendrivelinux.com/univers...easy-as-1-2-3/

That seemed to work well, as usual.
 
Old 04-09-2013, 07:26 AM   #10
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Sorry to hear it's not working for you, can't understand why, I have no trouble doing it this way.
 
Old 04-10-2013, 02:42 AM   #11
steak1987
Member
 
Registered: Jan 2012
Posts: 128

Original Poster
Rep: Reputation: Disabled
Ill experiment on it some more with my spare machine that I got lying about
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB persistent and personalized installation SignorX Arch 4 05-27-2012 05:59 PM
Will Deleting 70-persistent-cd.rules and 70-persistent-net.rules Work As a "Live USB" Konphine Linux - General 1 10-09-2011 04:55 PM
[Knoppix] How to make a Persistent USB in 6.2 JmaJeremy Linux - Distributions 5 12-17-2009 04:49 PM
Slackware on Persistent USB drive? SiegeX Slackware 1 01-09-2009 12:16 PM
how do I get a persistent usb hd device name in mandriva rockets Linux - Newbie 3 06-19-2007 12:09 PM


All times are GMT -5. The time now is 10:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration