Installing Linux Mint on 32 GB USB drive with separate home folder.

Linux Mint/Ubuntu on 32 GB USB drive with persistent home folder.

Regular install attempt with Ubiquity:

With large capacity USB drives becoming cheap, it is axiomatic that an installation of Ubuntu/Linux should be desired thereon. That would be so nice to carry a pendrive in pocket instead of laptop. But it is not easy. On every try Regular installer of Mint 15, Olivia (13, Maya is a stable LTS version) ubiquity, the installer would crash and hang without a clue. A little research revealed an interesting paradoxical result. The USB in question was 3.0 and class 10 which is fastest, yet it was slower than the hard drive. As per specification the read speed was about 70 mb per second but write speed was 20 mb per second. Another problem is the way data is written on USB. To simplify suffice it to say, USB is not made for regular, long-term simultaneous r/w by OS. Speed becomes irrelevant. So what was the option?

A hybrid persistent ‘Live’ install with separate ‘home’:

A live CD installation has a more convenient way of running the system in which least rather no attempt is made to write on USB. Though we shall change that a little, yet the following installation has much less write attempts.

Partitioning the USB:

A achieve this hybrid installation we need to partition the USB in following manner, as shown in the snap shot of gparted:

USB Partition by Gparted

Make sure that disk partition type remains ms-dos. Gparted has tendency to favour GPT. These are the specifications of other partitions:

  • 4400 mb (A fat 32 partition visible to windows)
  • 1010 mb (A fat 32 for Linux Mint Live install)
  • 1050 mb (An ext4 partition to be labelled as ‘casper-rw’)
  • default or all that is left (An ext4 partition to be labelled as ‘home-rw’ )

[left about 1MB at end]

It is going to be a long journey, get a coffee or something.

Installing Live Mint/Ubuntu:

Now our USB being ready, we shall install the Live mint with Unetbootin. For help about Unetbootin, read here. We need a running system with Ubuntu/Mint. Start Unetbootin, choose image. I chose Linux Mint 15, Nadia. Hopw it will work on other versions as well.
Do not choose persistent option. Select second partition which would be sdb2 or something. Now install the Live Cd. Once done remove it and reinsert. Now open syslinux.cfg file and add the word ‘persistent’ at two places, at the end of lines ending with — i.e. double hyphen. Both edited lines should look like this:

append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- persistent

Save the file. Unmount and remove the USB pen-drive. Reboot with this USB drive. Do not be disappointed if it automatically mounts three partitions. Shut down. Restart. Now only two partitions should be visible, at the most. the ms-dos is fully accessible for r/w and casper is mounted under media folder and is used by system. the Home partition is now your new home. read write save or install a dropbox like I did. Your Porta-Drive is ready but there is one problem. The login is with default super user mint. We need to add user.

Adding new user:

Let’s first create a new user and add him/her to sudo group. Use following two commands, one after another at the terminal (replace xyz with name of your user):

sudo useradd -m xyz
sudo passwd xyz

Now enter the password for new user xyz, twice. Thereafter to add this user to sudo, enter following command:

sudo adduser xyz sudo

It will give following output:

Adding user `xyz' to group `sudo' ...
Adding user xyz to group sudo

Changing mdm login settings:

Now new user is in place but there is problem automatic login by mint at restart. We need to set that setting right. From the Menu choose and start ‘Login Window’ and disable first two check boxes like this:

Login window settings Mint-15

Now it will boot into MDM, log in screen. but there is another problem. First two items on Unetbootin Boot Menu has two items. First, default boot has been taken care of. Now reboot into the second option and repeat the procedure above, log-in settings. Done.

Now we are ready to go with our Porta-drive.

All the best.

2 thoughts on “Installing Linux Mint on 32 GB USB drive with separate home folder.

  1. Thanks to you for very nice tutorial.

    How is it possible to encrypt the persistent areas such as the casper -rw and /home? Can they be made into separate partitions or what? How exactly can you guide us to do these things?


    • Casper and home are on separate partitions. But encryption is not possible because it is live CD install and not a regular installation. I have not tried unetbootin with frugal install option. You may try that and let me know.


Please share your views.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.