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?

  • Attach USB pen/hard disk to system.
  • Boot from Ubuntu Linux Live CD
  • At boot menu you need to type persistent word and press enter key to continue.

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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 10 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
10 comments… add one
  • devnet Jul 7, 2006 @ 20:19

    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.

  • 🐧 nixCraft Jul 7, 2006 @ 23:00

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

    Appreciate your post.

  • Jon Jul 18, 2006 @ 16:49

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

  • Jon Jul 18, 2006 @ 16:56

    Looks like this has been updated.


  • 🐧 nixCraft Jul 18, 2006 @ 17:08


    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


  • Digital Brands Nov 8, 2008 @ 8:59

    Thanks so much for this post. I’ve always wanted to know how to save settings to a usb drive from a live CD. Now I know! A Stumble for your efforts.

  • Web design Brisbane Feb 20, 2009 @ 13:25

    Once Ubuntu gets it’s act together in terms of reliable persistent USB boot versions, and 16 Gig USB drives come donw to the $20 mark, Linux will take over the world, finally !

    Governments everywhere will give away live and bootable Ubuntu USB drives and provide cheap and diskless workstations connected to the internet.

    I can’t wait.

  • David King Apr 24, 2009 @ 20:32

    I am using Ubuntu Netbook Remix 9.04, installed onto a USB flash drive, which is bootable and plugged into my Asus Eee PC 901, so that it boots into Ubuntu, or into Xandros if I prefer.
    How do I make it so that the settings of the UNR are saved each time, so that things like codecs, software, settings, etc., are all restored every time I boot it? The advantage of a USB flash drive over a live CD is that the flash drive is writeable. I made the UNR 9.04 USB flash drive following instructions on the Ubuntu website, but there is nothing I can see there that describes how to make it persistent. https://wiki.ubuntu.com/UNR
    I used the usb-imagewriter tool.

  • Fergus Apr 27, 2009 @ 19:39

    I’d like to echo David’s comment above – very similar scenario, I’ve installed UNR 9.04 onto a 16GB USB Key to use with my Samsung NC10 (running Windows 7 Beta) .. boots wonderfully but I’d love to know how to save OS and user session settings back to the same USB key for reloading on boot. Help would be appreciated.

  • Linux GNUbe Jan 17, 2010 @ 23:21

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

    I’m running Simply MEPIS 8.0.12 from live CD right now and this info. does not seem to be in the manual. Googling for it brought me here.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum