29 Comments

  1. Roelof

    Hi,

    I've just solved a problem with making my Mint 17 amd64 MATE persistent.
    I followed every instruction mentioned in this tutorial, but for some reason, my Live USB kept booting without persistence.

    After browsing many many postings about persistence problems I decided to take a look at the two config files that initiate the persistence during boot:
    - syslinux.cfg (/ folder if you access the USB using another running Linux distro OR /cdrom folder if you access from your Live USB)
    - grub.cfg (/boot/grub if you access the USB using another running Linux distro OR /cdrom/boot/grub folder if you access from your Live USB

    I noticed two things:

    1) In the file syslinux.cfg the word "persistent" was placed at the very end of every boot options command line, after the "- -".
    In every posting about persistence problems, the instructions are to place the word "persistent" right after "boot=casper", so I did.

    Nothing really changed after this; I still had no persistence. I did notice though, that there were far more boot options in syslinux.cfg than I saw when booting my Live USB. So that inspired me to look at the grub.cfg, where I found my 3 boot options.

    2) in the file grub.cfg there was no "persistent" at all in the boot option command lines. So I added "persistent" right after "boot=casper" in every command line and rebooted...

    Voila! Persistence was finally there!

    I'm still a bit of a newbie, so I'm not sure what I did wrong in the first place. Is there an error in the latest version of Unetbootin?
    Or perhaps the Live USB isn't supposed to boot using GRUB?
    Mine does, and changing the grub.cfg (and syslinux.cfg, though I'm not sure whether that changed much) solved my problem.

    NOTE: while following the steps in the tutorial when installing Unetbootin, I did get a warning that a certain module was missing, and that I should install syslinux to be able to use Unetbootin to install onto ext2 partition, but since I was installing to a fat32 partition, I ignored that warning. Unetbootin was still working without it.
    Perhaps that sparked Unetbootin to set the boot handler to GRUB?

    NOTE: I had to use another Linux distro to be able to change the syslinux.cfg and grub.cfg files. You cannot do that from the Live USB, because the files are 'read only', even when opened as superuser (because the system thinks they're on a CD, which is read-only by definition)

    Reply

    • Thanks for sharing your solution.

      Reply
  2. Rus

    I was able to get the process to work however I noticed a significant slowdown in system speed when using a usb key set for persistent mode vs one that was not. Are there some additional parameters that can be adjusted?

    Thanks for the fantastic tutorial.

    Reply
    • Roelof

      I noticed a big difference in performance too, but that's the price to pay for persistency. Especially browsing is very slow.
      One tweak that really helps speeding up your web browser: turn of the caching to disk. Web browsers send a lot of cache files to disk and Casper keeps storing these, while you don't really need these files.

      Here's the tweak for Firefox:

      - in the addres field type "about:config" and confirm that you'll be careful.

      Find the following parameters and turn them all to 'false' (by doubleclicking on them):
      - browser.cache.disk.enable
      - browser.cache.disk_cache_ssl
      - browser.cache.offline.enable

      - Close your browser and restart it.

      You now have a non-caching browser. It should be a lot faster.
      There are some downsides:
      - some Java-scripts cause errors, because they need caching (just continue and tick the 'remember this' box)
      - speed now fully depends on your internet connection, which may be slower when opening frequently used pages

      Good luck!

      Reply

      • Thanks for the speed tips.

        Reply
  3. TK

    Just to clarify, for newbies like me: the persistent partition MUST be named "casper-rw", as the tutorial states.
    If it's named anything else, the changes and settings *won't* persist.

    Thus, this comment (below) from March 31, 2014 is not true: "...I believe that one could name the persistent partition anything in addition to the "casper-rw" suggested in the article..." -- That mistaken advice threw me for a loop for a couple hours, before I corrected the naming.

    Otherwise, this works perfectly with Mint 17. I also liked LesStrater's syslinux.cfg edits to get rid of the Unetbootin menu (comment: Aug 20 2014 ). Though the default Unetbootin menu can be handy for a rescue disk or troubleshooting, it was mighty annoying for my use, which was to send a customized, ready-to-go Live Mint USB to a non-tech friend, that she could install on her old computer.

    Reply
  4. Juna

    Thanks for the tutorial!
    I am quite new to this, and chose this option as my HDD stopped working when I tried to install Mint, so I removed it with the intention of replacing it eventually. For now I wanted to run Mint from USB with the option to download things like skype and to save some downloads.

    So, Everything is running, but extreeeemly slow and I cant seem to download skype through package manager. Would it help (with speed and downloads) if I made the iso partition bigger? I have 60Gb to play with.

    Reply
    • Chris

      Bump! Having the same problem.

      Reply

      • I don't think increasing the size of the iso partition will help. All of the persistent storage is going in the casper-rw partition. Speed will be controlled by the read/write speed of the flash memory. A live USB is not really intended to be a full replacement for a hard drive installation.

        Reply
  5. tachibana

    To the ones that are getting stuck at 6x%.
    Wait for it. It happened to me (67%) but it resumed after a while. I guess it's just a big file and it seems like it has stopped when it has not.

    Thanks for the guide!

    Reply
  6. Joey

    My UNetbootin keeps hanging at 64% during step 2 of the process. Any suggestions?

    Reply
  7. Robert

    Hi, you're tutorial worked great for me until I tried UNetbootin. UNetbootin keeps on "hanging"/gets "stuck" at around 65% during step 2. Is there any way to fix this? I have tried UNetbootin with Ubuntu and the same problem occurs at a different percentage. Please help ! Thanks.

    Reply
  8. WMarkH

    Very helpful, thank you. This worked like a champ and I'm betting it would be fantastic with USB 3. As-is, it is usable, but slow. I'm not willing to run without updates and the first full update ate up over 2 GB of data space, but my experience is that this shouldn't grow that much more. (I built this for a friend whose on-board HDD controller went bad. He should be able to get another year or two on that old laptop just running from a thumb drive.)

    I'm betting USB 3 and systems with more memory will open up some very interesting possibilities in persistent Linux. What I'd really like to see is a major distro that loads as much as possible into memory at all times (like Puppy) in order to minimize reads/writes to storage. That way it would be possible to just install to a thumb drive and not mess around with all the work-arounds in Live / Persistent Linux configurations. I could carry my "personal computer" around with me on my key chain (encrypted of course).

    Reply
  9. LesStrater

    Thank you for this excellent tutorial! I followed it to the letter and it worked perfectly. I have a couple comments that may help others in the future.

    I didn't have a Linux system to use, so I download a live version of GParted. After burning the iso file to a CD, I booted up on it and followed the above instructions. I started with a clean format on an 8GB flash drive, so before I could hit "New" for the first time, I had to "Create Partition Table" in the "Device" menu.

    I set the Fat32 partition at 2500 MiB to allow allow a bit more space for the OS in case of updates, addons, etc. And finally, when finished with everything above, I browsed the flash drive in Windows Explorer and opened syslinux.cfg with Notepad. I deleted everything, then added the following:

    default live
    label live
    say Loading Linux Mint 17 Cinnamon 64 bit
    kernel /casper/vmlinuz
    append initrd=/casper/initrd.lz file=/cdrom/preseed/linuxmint.seed boot=casper quiet splash noprompt -- persistent

    The above gets rid of that uglyass UNetbootin menu and starts the Linux Mint OS right away. (I recommend renaming the original syslinux.cfg file to something like syslinux.old before saving the new version.)

    Reply

    • Thanks for your comment. I'll have to try your syslinux.cfg trick.

      Reply
  10. klaup

    I don't know but it doesn't work with me.
    I tried installing linux mint debian edition cinnamon, but it just boots without persistence.Now I'm going to try with regular linux mint and how it goes...

    Reply
    • klaup

      Ok with regular mint, not with debian edition it works.
      Now I'm gonna try and set an encrypted persistent space, let's see how it goes

      Reply
  11. Jacob

    Linerd, thanks for the tutorial.

    I would like to add 1 important suggestion: Adding a 3rd partition for data. I've noticed that casper-rw partition is readable/writeable ONLY from the thumb drive OS; so you can't copy any data between computers. The 3rd partition (I've created fat32) allows for both, the thumb drive OS and any other OS running on other computers, to read/write.

    Now you can copy your data/settings from a desktop PC and carry with you; AND for protection, you can encrypt the data partition.

    Reply
  12. Alonzo

    I think it's important to make the persistent partition ext2. The ext2 file system is not a journaling file system, while ext3 and ext4 are. Journaling continually writes to the USB flash pen drive and will cause it to wear out sooner. The down side to not using a journaling file system is that error recovery is slower and the file system is more likely to become irrecoverably corrupted.

    Reply
  13. Paul

    I tested the above approach and it works very well in my experience so far.

    The advantages I can see are that the persistence space is not limited by Unetbootin limits, the persistence size can be modified as needed by a Gparted resizing of the partitions, the entire USB stick space can be used, the persistence space is separately readable/writable by just mounting the USB partition on a computer running Linux.

    I read somewhere that journaling file systems should not be used with USB sticks, so EXT2 would be the preferred option for the persistence space.

    Reply
    • Bradley

      Yeah, I used ext3 journaling file system on my 16GB data traveller. It's slowing to glacial pace, I think it's about had it! I want to use this approach on my 750GB external drive with a large FAT32 partiton for storage. I've tried a few times with another method that hasn't been booting.

      Reply
      • Gerard

        Did it work? I've been reading this page and thinking I want to try it on a USB HDD

        Reply
  14. Brian Cantin

    I've had good luck with 64 bit Mint Mate versions 15 & 16 in creating and using a persistent live usb drive created by UNetbootin. However, no matter what I specify, or how big the usb drive is, the space available is silently limited to 2GB. Which is ok with me because I have not been able to figure out how to create live usb that is encrypted. Without encryption, I would not want to carry around most of my data on the drive.
    Thanks for showing how to use gparted to create the data partition. Maybe I can figure out how to encrypt the data partition in conjuction with the live usb. That would not be as good as having the whole lot encrypted, but it would be pretty close.

    Reply
  15. espinozahg

    Is there any reason why you coose ext2? Why not ext3 or ext4?

    Reply

    • No particular reason. I assume ext3 and ext4 will work just as well.

      Reply
  16. Dan Saint-Andre

    I believe that one could name the persistent partition anything in addition to the "casper-rw" suggested in the article. For the media created using this article, I created "TH-Mnt16Sys" and "TH-Mnt16Dat."

    I tend to label my removable media "XX-name" where 'XX' is one of TH (thumb drive), SD (SD media), CF (compact flash media), EX (external drive) and so on. I have not mastered the scripting needed to use a fixed mount point for my removables and this is the next best thing. Remember, that FAT32 volume names which are 8.3 names or 11 characters.

    One can alter partition labels using 'gparted' or 'dosfslabel' or 'mlabel' or 'ntfslabel.' However, I've had trouble getting win-dose to honor labels written by linux tools.

    Reply
  17. Albin

    Is there some performance improvement from creating a partition and deleting the casper-rw file as you've done? I'm using a Persistent Live USB with Mint 16 XFCE writing this: runs very quick on a low-powered netbook. The default Unetbootin installation is much simpler: no partioning and maintain the casper-rw as the "persistence".

    I've installed and updated and configured the heck out of third party software on a 16gb drive. The only thing I do NOT do on Live USB is update the operating system.

    Mint is a good choice since it seems increasingly developed for use on Live USB: it used to be these installations would just go wonky after a couple of weeks (and still do on other distros.) Mint 15 and 16 keep on ticking.

    Reply

    • There's no performance improvement that I know of. My experience in the past has been that using the default UNetbootin process resulted in a Live USB that wasn't actually persistent. The forum post I linked to was for Mint 14 and I know I had the same problem with Mint 15 64 bit. To be honest, I have not tried the default persistent process with Mint 16.

      One advantage I can think of is that I could re-image the live partition with a newer version of Mint while keeping my personal files intact on the persistent partition. It may take a little file cleanup on the casper-rw partition though, depending on what you've updated or installed on the live system.

      Reply
      • Albin

        Thanks. I've had very good expeience with default Unetbootin persistence on 32 bit (older machines) on recent Mint versions, noting that I don't try to update the OS or any really large third party software like LibreOffice or GIMP and limit updates to one or two apps at a time. USB 2 is just too slow to handle really big updates reliably.

        I should have said I also run Mint 16 on dual booted laptop and netbook hard drives, but I find a Persistent Live USB is a fantastic way to test out all the intriguing tips, tricks, and various software suggestions for Mint BEFORE risking my hard drive installations. Users who want the performance of a hard drive install should still keep a Live USB around as a Guinea Pig for all those brilliant experiments that might not work.

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>