I love Linux Mint. I like that it is a fully featured, easy-to-use desktop, and it is very user-configurable. I particularly like Linux Mint Debian Edition, because it's semi-rolling and it's fast. I wanted a full, personalized version of Mint Debian on a USB thumb drive that I could boot from any machine.
There are several tools available to install Mint and other distros on USB drives: Startup Disk Creator (within an installation of Ubuntu), write the ISO image to USB and boot from that, Universal USB Installer, UNetbootin, LinuxLive USB Creator, and probably others. None of these met my needs completely.
You can also do a full install onto a USB thumb drive, hard drive, or flash card, like this. However, I have found this to be extremely slow in operation. Also, you might be stuck with using it on only one computer because of UUID specifications in GRUB.
I found two primary hurdles that needed to be overcome.
- The first of these was persistence. Universal USB Installer and UNetbootin both advertise the ability to create bootable USB installations. The image I created using Universal USB Installer hung during boot. UNetbootin creates a partition for persistence formatted to ext2 and labeled "casper-rw." Unfortunately, that only works for Ubuntu and Ubuntu-based distros (works for Linux Mint main edition). Debian and Debian-based distros look for a partition with the label "live-rw" when there's a persistent flag in the boot line.
- Second, once I created my live installation, I kept running afowl of the unknown/unknowable root password (for example, in order to execute any "sudo" commands, including reading data on my host system's hard drive).
This is a pretty simple procedure, but it requires another working Linux installation (either on a hard drive or live media) for at least one step. The rest can be done from Windows and from your new USB install.
1. Download a copy of the latest Linux Mint Debian iso. Check the MD5 sum. If you have no other bootable linux distribution, burn it to disc. Otherwise, there is no need to burn the iso to disc.
2. Download a copy of UNetbootin.
3. Plug in your target USB drive and use UNetbootin to install a live instance of LMDE. Do not create any persistence at this time.
4. Boot into your new LMDE install to ensure it works. Reboot into any working Linux distribution.
5. From within a Linux operating system, connect your new USB install and use GParted (or your favorite partition editor) to shrink the LMDE partition and create a new one with the remaining space, formatted to ext2 and labelled "persistence". I used an 8 GB SanDisk Cruzer drive. Here's how I did it using GParted (I've added screenshots):
- Click on GParted --> Devices to select your USB drive (probably sdb). - Click on the /dev/sdb1 partition. Click on Partition --> Unmount (if it is mounted).
- Click on Partition --> Resize/Move and then drag the end of the partition to your desired size. - Click on the unallocated space.
- Click on Partition --> New (or use the far-left icon in the toolbar). Select ext2 for the File system and type in "persistence" for the Label (without quotation marks). Click "Add."
- Click on Edit --> Apply All Operations (or use the far-right icon in the toolbar).
- When that's done, exit GParted.
6. Mount your new "persistence" partition and add a file in it titled "live-persistence.conf" with the contents "/ union" (one line only).
- Remove and reinsert the USB drive (if still unmounted from the GParted operation).
- Right-click inside the "persistence" partition and select "Open in Terminal"
- In the terminal, type
Code: Select all
sudo gedit live-persistence.conf
- Inside the new document, type "/ union" (without the quotes).
- Save the document. It should appear inside the "persistence" partition.
7. From within a Linux or Windows operating system, change your new syslinux.cfg file to allow for persistence.
- Connect and mount your USB drive (it should still be mounted if you just finished adding the file to the "persistence" partition).
- Using any text editor, add "persistence" after "boot=live" in the "append" lines of both the unetbootindefault and ubnentry0 sections, so that those two sections look like this:
Code: Select all
label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit boot=live persistence config live-media-path=/casper quiet splash --
label ubnentry0
menu label Start Linux Mint
kernel /casper/vmlinuz
append initrd=/casper/initrd.lz boot=live persistence config live-media-path=/casper quiet splash --
- Reboot into your USB LMDE. It will boot into the live instance, with user "mint". Your DE will depend on which iso you dowloaded and installed, Mate or Cinnamon.
For Cinnamon:
- Click Menu --> Administration --> User Accounts
- Click + to add a new user.
- Click on "Account disabled" to open a window to add a strong password. Give your user a strong password.
- Close User Accounts
- Open a terminal. Type
Code: Select all
sudo adduser [youruser] sudo
- Click Administration --> Login Window.
- Select the Security tab. Uncheck "Enable Automatic Login" and uncheck "Enable Timed Login" (if checked). Click Close.
For Mate:
- Click Menu --> Control Center --> Users and Groups
- Click + Add. Add your desired name and username. When prompted, give your user a strong password.
- Click Manage Groups. Click on "sudo" and then click Properties. Check the block next to your new user to add to the sudo group. Click OK. Click Close to exit Users and Groups.
- (Still in Control Center), click on Login Window.
- Select the Security tab. Uncheck "Enable Automatic Login" and uncheck "Enable Timed Login" (if checked). Click Close.
For Both:
- Open a terminal. (This must be done as user "mint" since that user is configured to automatically escalate privileges as root. Your new user won't be able to do this.)
Type:
Code: Select all
sudo su
passwd
Code: Select all
exit
exit
8. Voila! Click Menu --> Logout --> Switch User and log in as your new user. Your changes will be saved, you will be able to use your password when required, and you will also be able to input root's password when needed.
A couple of last notes. Mint Update doesn't work automatically in Live mode, even though it's enabled in Startup Applications, so you'll have to run that manually (I check at least weekly). Also, when you shut down, you will be cycled through MDM. Just click on the gear and select shutdown (or restart, or whatever you want) again. This is an artifact of the live version with an added user. For me, Mint 201303 live USB shutdown hangs, requiring a hard power-off.