Results 1 to 6 of 6

Thread: What is persistence?

  1. #1
    Join Date
    Sep 2009
    Beans
    32

    What is persistence?

    I'm about to install a version of Ubuntu onto a 32GB flash drive, I've downloaded are Universal USB installer that will do most of the work for me, however, it asks

    Step 4: Select a persistence option for your USB

    and the options are

    1GB CASPER -RW
    2GB CASPER -RW
    3GB CASPER -RW
    4GB CASPER -RW

    What is persistence? am I better off having more (ie 4GB) since my flash drive is a 32GB drive?

  2. #2
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,461

    Re: What is persistence?

    Persistence is the space on your USB key the will be used to store information, so that that information is still there after a reboot.

  3. #3
    Join Date
    Aug 2009
    Location
    UK
    Beans
    204
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What is persistence?

    Roclemir,

    Hi, as Sanderj stated Persistence is the space where you save your Docs, whatever, the max usage space on your list is 4GB, and that is all Fat 32 will allow, so your 32 GB is wasted, but try this tutorial from UbuntuGeek:-

    I was reading How to install Ubuntu Linux from USB Stick posted on this site a while ago, and found it to be quite some work to get Ubuntu working on a USB stick. Besides, having to prepare your USB device, creating a separate partition on it which will be more or less “useless” after the installation, giving up 750MB of space?
    There had to be a better way.
    Together with a colleague of mine, I decided to figure out whether there could be an easier way to install Ubuntu on a USB device.
    I found a way of doing it in a much simpler way… without creating the separate partition to store the LiveCD:
    A couple of assumptions to take into account when going through this manual:

    • My computer (Dell D820 laptop) has 1 internal disk, devided into 3 partitions (dell utility - windows - Ubuntu 8.04)
    • Just one USB device (in my case a 250GB harddisk
    • BIOS configured to enable boot from internal HDD, CD/DVD and USB Storage device

    (I didn’t take screenshots, so I will be explaining a lot about the screens… It looks like a lot of work, but trust me: it is not, and it really is easy

    1. Insert the LiveCD into your computer;
    2. Connect your USB device;
    3. Boot your computer from the liveCD;
    4. Once Ubuntu is started, go to System - Administration - Partition Manager
      This will open the Partion Editor. Select your USB device and delete all partitions on it. Click Apply and exit Partition Editor;
    5. Double Click the Install Icon. This will start the Installer;
    6. The Welcome Screen is shown. Choose your language and click Forward;
    7. Select your Time Zone and click Forward;
    8. Choose your Keyboard Layout and click Forward;
    9. The partitioner will be started, and you will be given the choice where to install Ubuntu. Choose Guided - Use entire disk, selecting your USB device (this will most likely be /dev/sdb, don’t choose /dev/sdb1!);
    10. The next sceen you will give your username/password information. Provide the required info and hit Forward;
    11. If there is anything to migrate from other installations on your computer (most likely not), do whatever you want, and click Forward;
    12. The next screen is important - It is titled: “Ready to Install”. Be careful here: before clicking on Forward, make sure you click on the “Advanced” Button!
      This will open a new screen, giving you the option whether and where to install the bootloader. Select your USB device (in my case it was /dev/sdb) to install the bootloader to;
      Exit this screen and click on Forward in the “Ready to Install” screen, which will be shown;
    13. The installation will be started now. Just be patient, grab a cup of coffee and come back 15 minutes later, your installation will be more or less finished by then.

    So you have finished the installation. However, when you will be restarting your system from USB, you will find out that the partition you just installed Ubuntu to cannot be mounted.
    Here comes the trick:

    1. Once the installation is finished, reboot your PC (this is the safest) from your LiveCD, with your USB device connected;
    2. Once started, open up a terminal (Applications - Accessories - Terminal);
    3. In the Terminal, type: sudo -i (which will give you root privileges, so be careful from now on!);
    4. Change directories to /media/disk/boot/grub - This will take you to the “/boot/grub” directory on the USB device;
    5. open menu.lst with vi (make a backup first!)
    6. Go to line 130 (or somewhere in that area).
      You will find a line looking like:
      ## ## End Default options ##
      And underneath it you will find three entries pointing to your Ubuntu you just installed:
      title Ubuntu 8.04, kernel 2.6.24-16-generic
      root (hd1,0)
      kernel /boot/vmlinuz………
      initrd /boot/initrd…….
      quiet
      (the above 5 lines repeat 3 times with slight differences)
    7. The magic trick is to change (hd1,0) into (hd0,0) for all these three entries.
      Why? Booting from USB device makes your USB device hd0, in stead of hd1 at time of installation.
    8. Search for the line starting with “# groot=(hd1,0)” and change (hd1,0) to (hd0,0) - Don’t delete the # at te beginning of this line!
    9. Once you did this, you can optionally remove the remaining of the file
      (everything underneath ### END DEBIAN AUTOMATIC KERNELS LIST);
    10. Save the file, make sure it is owned by root:ubuntu (chgrp ubuntu menu.* will do)
    11. Edit device.map (in the same directory) and change the mapping of hd0 to /dev/sdb.
    12. Reboot your machine, from USB, choose the Ubuntu installation from the Boot Loader and you are one happy person.

    I guess that is it. If I missed something, please comment.
    Regards,


    It worked for me on my 16 Gb drive, and it runs sweet as you like.

    Try.

    Jim

  4. #4
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,461

    Re: What is persistence?

    jimmers,

    I think your quoted description does a normal installation to a USB device.

    If so: I've tried that in the past to a USB stick, and the performace was horrible; each few minutes the whole desktop would halt and grey out for 10 - 30 seconds, and then become responsive again. My hypothesis: my USB stick was too slow to be handled as a normal drive.

    On the other hand, a live-USB-stick is not a normal insallation; I think it regards the USB-stick as a slow, fixed device (just like a CD), and takes care of that by reading only once the live-USB-stick and putting as much as possible into RAM. That way the booted system stays responsive.

    It could be a USB *disk* is fast enough for a normal installation, but I feat a USB *stick* is not fast enough for a normal installation. And thus you need the "usb-creator-gtk" to create a live-USB-stick, which seemed to be maxed to 4GB persistence size.

  5. #5
    Join Date
    Aug 2009
    Location
    UK
    Beans
    204
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What is persistence?

    I have never had any gray outs, and I am using the flash drive as I write, but you could try this tutorial from an other thread:-
    Create a larger casper-rw loop file in Linux

    The following tutorial explains how to create a larger casper-rw loop file for your Ubuntu based flash drive install. For example on: Ubuntu, Xubuntu, Kubuntu, Crunchbang or Linux Mint. A larger casper-rw loop file is particularly useful for those who have performed a Linux install to a large thumb drive using a Windows USB tutorial and need more persistent storage space for saving changes. The default casper-rw loop file we used in the Windows USB installation tutorials is only 1GB.
    Notes: You will need to perform the following steps from a booted Linux system other than the USB Linux installation. I typically boot from the Live CD and then (once the system is up and running) insert the USB flash drive that contains my Linux install and small casper-rw.
    Warning: Block file size must be less than < 4096 MB on a fat32 formatted flash drive due to the 4GB file size limitation of a fat32 partition.
    Creating a NEW larger casper-rw loop file

    The following method will create a NEW casper-rw file that will replace the old one. If you want to resize an existing image see the next section.

    1. After your up and running in Linux, insert the flash drive that contains your casper-rw loop file
    2. Open a terminal
    3. Type the following into the terminal window and press enter
      dd if=/dev/zero of=casper-rw bs=1M count=1024
      (replacing 1024 with the "size in MB" you wish to use for saving changes persistently)
    4. Type the following into the terminal and press enter
      mkfs.ext3 -F casper-rw
    5. Copy the new casper-rw file to your USB flash drive
    6. Restart your computer, booting from the USB flash drive and enjoy using the larger casper-rw loop block file you have just created.

    Resize an existing casper-rw loop file

    The following method will allow you to resize your existing casper-rw image (expand casper-rw). You should create a backup just in case before proceeding.

    1. After your up and running in Linux, insert the flash drive that contains your casper-rw loop file
    2. Open a terminal and change directory (CD) to the location of your casper-rw file
    3. Type the following into the terminal window and press enter
      dd if=/dev/zero bs=1M count=1024 >> casper-rw
      (replacing 1024 with the size in MB you wish to increase the original size by)
    4. Type the following into the terminal window and press enter
      resize2fs casper-rw

    If all goes well, you should now have a larger casper-rw loop file to use for saving your persistent changes.


    I can't vouch for the above, as I have never used it, using the previous tutorial is the only way!!! I can utilise all the free space on my flash drive.
    By the way my flash drive is a Kingston Data Traveller, I have tried other makes, but this brand is by far the best so far.

    Good Luck

    Jim

  6. #6
    Join Date
    May 2010
    Beans
    1

    Re: What is persistence?

    I have kubuntu. Some people in the past asked how to delete casper-rw so they don't have to replace the whole os. Here is a hint I have used several times so far has worked. I save an old casper-rw to my computer hard drive. When I kill my os, I just replace the casper-rw with the old (working one). I get back all my desktop, downloads, my pass word, etc.
    Jeff

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •