It seems that many articles focus on using various utilities, such as
Unetbootin or
Universal USB Installer to install Linux, but none of them consider it necessary to install Ubuntu on USB hard drives or flash memory with data encryption, considering the possibility of losing your portable OS containing personal data.
This guide will help you create an encrypted, portable OS that allows you to have a secure device on which to update and store files.
All that is in this document assumes that you are making a new installation of Ubuntu 10.04.2 (11.10 was also tested in the work) and repeat each step as it is presented here. Easy to follow
to this manual, if you disconnect all storage devices, with the exception of devices for working with CD / DVD (if the storage devices are still not disconnected, make sure you install Grub on the correct disk).
Before we begin the installation, I would like to say that Xubuntu will run faster on flash drives and will be able to run on computers with lower memory requirements than Ubuntu.
')
Encryption will help protect our data in case you lose your flash drive or it is stolen.
Ubuntu by default has built-in support for two types of encryption. Alternate Install CD includes full disk encryption and profile / home encryption. You can also add additional encryption with
TrueCrypt .
A USB flash drive can sometimes be slow (sometimes very slow), USB or eSATA hard drives will perform these functions much better.
Linux, unlike Windows, can be easily transferred from computer to computer and also allows you to boot from your portable device.
Try to stay away from limited features, such as support for 3D video during installation.
Boot from the Alternate Install CD Ubuntu or Xubuntu and select the installation from the menu. If you need to change the settings, simply select your language, location, keyboard layout, server name and time zone by default.
Setting up partitions is very important, and it is probably quite difficult to do it right away right away. I would like to know which file system is preferable? EXT3 and EXT4 are too slow, and the presence of swap partitions will also cause problems with speed. I found that FAT32 is better used as a partition for exchanging data between Windows computers, and EXT2 is great for installing Ubuntu. Select manual mode from the partition menu. Next, select your USB drive (and not existing partitions on it). You will be asked if you want to create an empty partition table, answer - yes. Your disk should now be designated as free space. Select it and create a new section. This new section will be in FAT32 for storing and exchanging data with computers under Windows. I had a 16 GB flash drive and I chose 3 GB for this section. Make it the primary partition at the beginning of the disk. The mount point is not required. Create this section.
Now create a boot partition (Boot partition), select the free space again, 256 MB - the most it. Make sure that you switch GB to MB, otherwise you simply won't have enough space. Make it
Primary , the file system is
EXT2 , the mount point is
/ boot, and select the
bootable flag.
From the remaining free space, create another Primary partition as an encrypted physical volume. Set a password. Now go back to the markup menu, and you will see the new encrypted disk in the list, select its partition (it will have the EXT4 file system), and press the Enter key.
Change the file system to EXT2, the mount point to -
/ . Finish the markup and confirm the changes. Warn about missing mount point for FAT32 and missing swap partition.
Continue the installation without choosing a home directory encryption. After installation, download all updates and reboot.
All is ready.
Commands to encrypt data
You can change and add passwords for your drive. Encryption allows 8 passwords if they are numbered from 0-7.
To find out which keys are used, run the following command:
sudo cryptsetup luksDump /dev/
change Password
To change your password, you first need to remove your old password, and then add a new one.
Add password
You can add a password with the following command:
sudo cryptsetup luksAddKey /dev/
Remove password
sudo cryptsetup luksDump /dev/
sudo cryptsetup luksKillSlot /dev/
sudo cryptsetup luksDump /dev/