Ubuntu Full USB Install
This web-page is part of a larger site giving examples of how to install Windows+Ubuntu Linux operating systems 'dual boot' in a computer. Illustrated Dual Boot HomePage
What you'll need:
This installation will show you
PLEASE BE EXTRA CAREFUL.
THERE MIGHT BE A FEW MISTAKES IN THIS PAGE THAT I HAVEN'T HAD TIME TO SPOT YET.
The iso file used for this installation was the ubuntu-10.04-beta2-desktop-i386.iso,
Checking the integrity of your .iso from a Linux live CD | Checking the integrity of your .iso in Windows
Advantages of having a full Ubuntu installation in a USB compared with the Live CD 'Persistence', aka 'Startup Disc' type of USB install,
THIS WEB PAGE IS NOT FINISHED YET, SORRY FOR ANY INCONVENIENCE THIS MAY CAUSE.
PLEASE BE EXTRA CAREFUL.
THERE MIGHT BE MISTAKES IN THIS PAGE
Booting the Live USBOkay, so we're going to boot the Ubuntu Live USB now.
This photo shows my EeePC with the USB Startup Disk plugged into a USB port, and I have a BIOS boot menu up in the screen.
To make my EeePC, (or most computers) boot from a USB drive instad of the first hard disk drive, (or SSD), in most computers it is possible to bring up a BIOS boot menu.
Here's a link about how to boot from a BIOS boot menu, How I boot from my BIOS.
If you have a PC with a working optical drive you can use a CD or DVD to install Ubuntu with if it's easier for you. I just think the USB Startup Disk works way better than installing from CD so I recommend that if you can.
PHOTO NOT ADDED YET
When the USB Startup Disk has booted up, I plug in my blank new USB flash memory stick that I want to install Ubuntu in.
When the Ubuntu Live USB has booted, you'll see the Ubuntu Live USB desktop, and if your have Ubuntu Lucid Lynx it will look something like the screencap on the left.
You can run Ubuntu from here without making any changes to your computer. I have another web page about that, - Live CD Page.
This web page is about how NOT to make changes to your computer.
The next job will be to open GParted and work on the partitions in the new USB flash memory stick.
This screencap shows where to find GParted partition editor in case everyone doesn't already know.
SCREENCAP NOT HERE YET
I need to make a new partition in my new empty flash memory to install Ubuntu in.
In order to do that, I will need to delete that partition that's aleady there, (of course), which is most commonly a FAT 32 file system. Just re-format to ext4.
It's probably best to re-format the existing partition as it could be located with the start point on a sector determined by the flash memory manufacturer to be an erase block boundary.
I am deleberately not creating any swap area, just one partition for the entire USB flash memory stick, formatted with the ext4 file system.
I have now closed GParted, and this is the Ubuntu Live USB Starter Disk's Desktop.
Starting the Ubuntu Installer
When you are ready to install Ubuntu, you may double-click on the 'Install Ubuntu' icon or else right-click on it and select 'Open' from the right-click menu.
ubuntu languages.png (above) - credit to Elabra Sanchez - (image under creative commons licence).
Ubuntu features language support for more languages than any other operating system.
Ubuntu language support link: Translations/ReleaseLanguages/9.10 - Ubuntu Wiki
English is set as the default language. Just click the 'Forward' button if English is your prefered language.
If you want to run the installer in a different language than English, you may use your mouse to select the language you want to use and click the 'Forward' button.
SORRY - SCREENCAP TO BE ADDED HERE
Keep an eye out for the option to install GRUB somewhere and make sure you install GRUB to the MBR in the USB drive, NOT your PC's internal hard disk drive's MBR!
Step 2 of 7The Lucid Lynx Live CD is pretty good at guessing what region of the world we may happen to be in.
Just check to make sure it has guessed correctly.
The important thing is to make sure the installer knows which time zone we're in.
For me it's 'Brisbane', but the Ubuntu installer guessed 'Sydney Australia', so I had to click on the map where Brisbane is to correct it.
Another way of correcting it would be to use the drop-down lists under the map.
Step 3 of 7
Most of us use a US English type of keyboard, even in Australia.
If you have a laptop and you're not sure, you probably have a standard US type of keyboard, at least for the purposes of installing Ubuntu.
If you do have a special type of keyboard, you will probably know about it and you should take the time to scroll through these lists, you'll probably find it here somewhere.
I always just click 'Forward' for this one.
The file system should be set to ext4, even though I have already formatted the partition with GParted, It doesn't matter if I format it again really, but there' s no need to, so I didn't click on the 'format the partition' box.
The most important thing here is to set the mount point as / ('root' - for the operating system files).
After everything's set I can click okay and close the 'edit partition' dialog.
Now I'm finished with designation of partitions and I can carry on with the rest of the installation.
I'm choosing to ignore this warning message because I'm planning on installing swap space manager in Ubuntu later on, after the installation has finished.
I'm also ignoring this warning because I know I have already re-formatted these partitionsusing GParted.
Step 6 of 8 - Who are you?
This panel asks me some easy questions.
I always make sure I choose a good secure password.
Here is a link to an easy way to choose a secure password that's easy to remember but hard to crack, password tip.
Since this installation installed GRUB to MBR in the USB flash memory stick instead of the first hard disk, I will need to do something special to get my new Ubuntu operating system to boot.
Boot from the BIOS boot menu, the following link explains how to do that, How I boot from my BIOS , (by pressing a special key at the right time while the computer is booting up).
NO SCREENCAP AVAILABLE YET, SORRY
This is my login screen.
NO SCREENCAP AVAILABLE YET, SORRY
This is a screencap of my new Ubuntu desktop.
It's a good idea to open up our repositories and get an update, install the software we want, and start configuring, personalizing and customizing our Ubuntu installations.
Here's a link to a page with some information to get you started, Post-install Page.
Settings and Tweaking
1. Change the IO Scheduler (Recommended for SSDs but optional, and not for hard disk drives)
The command for opening your /etc/default/grub file is shown on the below
Below you can see where in the file you should paste the words "elevator=noop", or "elevator=deadline".
Save and close the file.
You may run 'sudo update-grub', or 'sudo grub-mkconfig -o /boot/grub/grub.cfg', whichever you prefre, either command will update your /boot/grub/grub.cfg file with the new changes.
Since we installed in flash memory, it might be a good idea to edit GRUB with the boot option "elevator=noop", or "elevator=deadline", so the option will be passed on to the Linux kernel to use the noop or the deadline IO scheduler for reading and writing to the flash memory drives.
Noop scheduler - wikipedia.
Deadline scheduler - wikipedia.
The default IO scheduler for Ubuntu is CFQ, and the job of an IO scheduler is to organise hard disk reads and writes so they will be grouped according to where they need to go to or come from on the hard disk.
It saves a lot of time if the little read/write heads can be pivoted to one area and do some work while reads and writes to some other area are queued up in memory until it's time for the read/write heads to be pivoted to another area and do some work. That's better than snapping the little pivot arms from one spot to another like crazy just for each individual read or write.
The IO scheduler is great for hard disk drives, but SSD drives and other kinds of flash memory drives don't have any read/write heads to need to the data organised for, they work a completely different way.
That means the operating system can work a little bit faster when it's in an SSD or any kind of flash memory without the fancy CFQ IO scheduler, (sorry CFQ), the deadline or the noop IO scheduler are all that will be needed and the operating system will be free to work faster.
|2. Install Dynamic Swap Space Manager - Good for both HDDs and SSDs and other flash memory installations,
| Adding a swap area or file makes an improvement to the performance of any Linux installation.
Dynamic Swap Space Manager saves a lot of wasted disk space by creating a swap files for you on demand.
Most of the time we don't need to use very much swap areas these days with modern machines with plenty of RAM. It's only really needed to make the system happy and for hibernating. Dynamic Swap Space Manager.
| 3. Adjust Swappiness - For both hard disk drive and SSDs
Open your /etc/sysctl.conf with the gedit text editor,
Add the line 'vm.swappiness=10' to the end of the file,
Save and close the file.
Swap FAQ - Ubuntu Community Docs]
Linux Performance tuning - vm.swappiness - unixfoo.blogspot.com
What Is the Linux Kernel Parameter vm.swappiness? - Linux Open Source Blog
can speed up our operating systems even further by adjusting the priority Ubuntu
gives to using the PCs RAM modules compared with the swap file in our flash memory stick for storing short term memory items.
Solid state drives are faster than hard disks, but they're not as fast as the computer's RAM modules.
Flash memory sticks are a little slow and suffer from short pauses when the blocks are being erased and re-writtin and wear levelling actions are being carried out.
It's generally better to tell your operating system to prefer to use the faster RAM memory in your computer, and allow it to use the swap file, but only when it really needs to.
We can easily do that by setting a swappiness value in our /etc/sysctl.conf files.
Some web page authors recommend setting swappiness to 0, but I think that's a bit radical and it resulted in slowing down my system when I tried that. The default value is 60 and the maximum is 100.
After a few experiments, I found that a swappiness value of 10 seemed to work best for my computer. You may want to spend a little time running your own experiments, but I think 10 will work okay for most of us.
As a secondary consideration, using the swap area less saves wear on the flash memory.
| 4. Ext4 File System Alignment (Recommended for SSDs but optional, and not for hard disk drives)
|Earlier we used GParted to pre-partition our flash memory
devices and the default now is to create partitions starting at the erase block boundary, in sector
What we haven't done yet is tell our ext4 file system. We can easily do that with the tune2fs command.
These two commands on the left should fix that.
Before using these commands, check first to see if your ext4 partitions are /dev/sda1 and /dev/sdc1, yours might be different.
| 5. Install localepurge
|Ubuntu supports quite a few languages and contains some extra fonts and stores other stuff in case people
want to change languages at any time.
If you're at all cramped for disk space and you're only going to use one language, you can install and run localepurge to strip out all files that are only needed for other languages.
This will save you a heap of drive space and will run automatically in future every time you install software with foreign languages included, preventing future alien occupation of your drive space.
| 6. Get Rid of Un-needed packages
|This command empties your /var/cache/apt/archives/ of used .deb files.
This can reclaim some of your used disk space.
Some people like to keep them and include them in a backup because it can save bandwidth to use them again when re-installing or installing another other system of the same distro, same release and architecture.
They get out of date (superceded) quickly and mostly they can just be downloaded again if you have a normal internet connection so we don't have to keep them if disk space is at a premium.
|7. Cloud Computing - Ubuntu One - 'System', 'Preferences', Ubuntu One'
||Don't forget you can use Ubuntu One.|