Another lost article, originally from May 4, 2009
Putting Ubuntu on a flash drive, can seem a daunting task. But if you follow these steps, you’ will have a portable secure operating system.
Here’s what you”ll need:
A computer with:
USB Ports
256 meg of ram
cdrom
USB flash drive (at least 4 G)
32 bit Ubuntu 9.04 Install CD (desktop)
(download from here: Download Ubunutu)
A live (hot) internet connection
WARNING: CHOOSING THE WRONG DEVICE CAN RENDER YOUR HARD DRIVE UNBOOTABLE. IF YOU’RE NOT SURE, YOU MAY WANT TO REMOVE THE PLUGS FROM YOU HARD DRIVE BEFORE STARTING.
1. Boot off the install cd.
2. Choose Install Ubuntu and hit enter
3. When you come to the screen that says: “Prepare disk space” (step 4 of 7) on top,
choose “specify partitions manually (advanced)”
4. the usb drive (on my system) is called /dev/sdc
5. delete the partition on this drive, so you can start fresh.
6. It should show /dev/sdc
free space (size of drive — 8065 mb in my case — 8 G)
7. Select the “free space” for the usb drive by single clicking it (left mouse button)
8. Select “new partition” on the bottom of the screen.
We are going to create a 1 G fat32 partition for windows, and then the rest for linux.
Windows (will become /dev/sdc1)
New Partition should read: Primary
Size should be: 1024 meg
Beginning
Use as FAT32 file system
Mount Point: /dos
Select the remaining “free space” for the usb drive by single clicking it (left mouse button)
8. Select “new partition” on the bottom of the screen.
Linux (will become /dev/sdc2)
New partition should read: Primary
Size should be the remaining full size of the USB Drive (7039 meg)
Beginning
Use as ext2 file system (we want a “non-journaled” file system)
(USB flash drives do NOT have a fast transfer rate (4-5 meg tops), so we want a non-journaled file system)
Mount Point should be / (root directory)
The great thing is that windows will NOT see any of the Linux on the flash drive. However, Linux WILL see the windows partition. So you can easily exchange information between Windows and Linux.
to see the Windows Partition in Linux simply go into terminal mode (after the install of course) and type:
cd /dos (that was the mount point we created above)
So it should look like this before proceeding to the next step:
Devices Type Size
/dev/sdc1 fat32 1023
/dev/sdc2 ext2 7039
9. Hit forward and you will see “Who are you?” (screen 5 of 7) fill out as desired.
10. if you get the message “there are no users or operating system suitable for importing from” error – that’s normal – (step 6 of 7) just go forward.
11. When you arrive at step 7 of 7, this is the tricky part. “Ready to Install” We need to make the flash drive bootable.
There is an “advanced” tab at the bottom right of the screen. Click on that.
Click on “Install Boot Loader” and choose the correct DEVICE (not partition) device. In my case /dev/sdc
WARNING: CHOOSING THE WRONG DEVICE CAN RENDER YOUR HARD DRIVE UNBOOTABLE. IF YOU’RE NOT SURE, YOU MAY WANT TO REMOVE THE PLUGS FROM YOU HARD DRIVE BEFORE STARTING.
12. Click on install, and sit back. Like Alton Brown says: “Your patience WILL be rewarded!”
13. Boot up off your usb drive, and we are going to make a performance enhancement.
14. Open up a terminal window and type
cd /etc # go to the /etc directory
sudo cp fstab fstab.org # make a copy of the file structure table (always have a path back!)
sudo nano fstab
change “relatime” to “noatime”
from: http://en.wikipedia.org/wiki/Fstab
By default Linux records when files are last accessed, modified and created. This behaviour can be controlled with the noatime option, which will prevent this information from being recorded. The advantage might be a performance increase, especially when files are accessed and modified often.
control+o to write the file changes, then control+x to exit.
(hold down the control key, and hit the letter)
NOTE: if you screw up fstab, your system may NOT boot. DON’T panic!
boot into recovery mode, then choose “Drop to root shell prompt with out networking”
mount -o remount rw / # mount root as read/write access
cd /etc # change to /etc
rm fstab # removes the existing (hosed) fstab
cp fstab.org fstab # copy back the original fstab
15. Install updates and enjoy! You now have in your pocket, a secure, portable operating system.
if you do a df (display free) at terminal mode you will see that Linux
has used approximately 2.5 G (yes with “X” installed) and have about 4G free!
16. One caution. In order to avoid file corruption, I always “shutdown” when done using my ubuntu2go flash drive. Removing the flash drive before the system has shutdown, may result in file corruption.
Related Articles
No user responded in this post