nixCraft Poll

Topics

Ubuntu Linux Live CD: Save data & desktop information on USB device

Posted by Vivek Gite [Last updated: July 18, 2006]

Ubuntu Linux (other Linux distro also able to save data on external USB hard disk or USB pen drive) has this nifty feature that allows saving both data and desktop settings. Update: According to official web page you need to use casper-rw lable instead of casper-cow. So make sure you use casper-rw if you are using Ubuntu 6.06 LTS "Dapper Drake" release.

a) Use other Linux computer or boot from Ubuntu Linux live CD

b) Plug USB pen or USB external hard disk

c) Open terminal (or click on Applications -> Accessories -> Terminal)

d) Find out USB device name:

$ sudo fdisk -l

Now assign special label casper-cow to your USB pen or USB hard disk (assuming that your USB device already formatted with ext2/ext3 file system):

$ sudo e2label /dev/sda1 casper-cow

If you need to format USB device use the following command, else skip to next step:
Partition USB device:

$ sudo fdisk /dev/sda

Format usb device:

$ sudo mkfs.ext3 /dev/sda1

Now assign new disk lable casper-cow

$ sudo e2label /dev/sda1 casper-cow

Now your USB pen or hard disk is ready to use.


How do I test persistent mode?

Now Ubuntu will automatically scan your USB hard disk or pen drive. It will also save data, your desktop settings (such as wallpaper or other stuff ) or applications on this device.

More about casper-cow label

Please note that casper-cow is a special label on an ext2/ext3 filesystem or partition. You need to use e2label command to assign the label on USB pen or hard disk drive. If this label found Ubuntu Linux will use the USB device to store desktop information as well as your data/applications. The idea is very simply, "you should be able to carry your desktop anywhere, anytime".

Updated for accuracy.

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. devnet Says:

    It is important to note that MEPIS (based on Ubuntu) can do this via a boot option and mounts/unmounts the USB pendrive automatically. Much easier than this process.

  2. LinuxTitli Says:

    Thanks for update on MEPIS. The only question is does it saves desktop settings and retrieves automatically?

    Appreciate your post.

  3. Jon Says:

    Is there a distro/way to do this with a VFAT drive. I’d hate to have to carry two keys for this.

  4. Jon Says:

    Looks like this has been updated.

    https://help.ubuntu.com/community/LiveCDPersistence

  5. nixcraft Says:

    Jon,

    You can mount vfat partition with following command:

    sudo mkdir -p /usb/pen
    sudo mount -t vfat -o iocharset=utf8,umask=000 /dev/hda1 /usb/pen

    See forum topic for more

    http://forum.cyberciti.biz/livecd-question-vt542.html

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

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

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.