PDA

View Full Version : [ubuntu] How do I run Ubuntu from a flash drive?



metrogdor22
January 19th, 2011, 12:22 AM
Hi, I'm a complete beginner at Ubuntu. I have Windows XP on my computer, but would like to run Ubuntu. However, I don't want to install it on my hard drive. So I figured I would just install it to, and run it from, a flash drive. I've seen some mixed instructions on how to do this. I want to have Ubuntu(and nothing else) on a flash drive. When I plug the flash drive in, I boot from it via BIOS setup. Then it's running Ubuntu directly from the flash drive. Anything I do, save, or install is saved to the flash drive. When I shut down the computer, and unplug the flash drive, then reboot it,nothing in XP has changed. Next time I boot from the flash drive, everything that was previously on it, is still on it(I plan to use a 32 or 64GB flash drive, or I might even step up to a portable hard drive). How do I do this? I've heard something about a "live" installation of Ubuntu? Can someone give me a link to it(not just www.ubuntu.com)? (http://www.ubuntu.com%29?) Also, a step-by-step guide would be very helpful(if it's not just as simple as installing to the flash drive). Thank you!

jimmers
January 19th, 2011, 07:23 PM
Try this tutorial
p { margin-bottom: 0.21cm; }a:link { } I was reading How to install Ubuntu Linux from USB Stick (http://www.ubuntugeek.com/how-to-install-ubuntu-linux-from-usb-stick.html) posted on this site a while ago, and found it to be quite some work to get Ubuntu working on a USB stick. Besides, having to prepare your USB device, creating a separate partition on it which will be more or less “useless” after the installation, giving up 750MB of space?
There had to be a better way.
Together with a colleague of mine, I decided to figure out whether there could be an easier way to install Ubuntu on a USB device.
I found a way of doing it in a much simpler way… without creating the separate partition to store the LiveCD:
A couple of assumptions to take into account when going through this manual:


My computer (Dell D820 laptop (http://www.ubuntugeek.com/a-much-easier-way-to-install-ubuntu-on-a-usb-device-stick-or-hd.html#)) has 1 internal disk, devided into 3 partitions (dell utility - windows - Ubuntu 8.04)
Just one USB device (in my case a 250GB harddisk
BIOS configured to enable boot from internal HDD, CD/DVD and USB Storage (http://www.ubuntugeek.com/a-much-easier-way-to-install-ubuntu-on-a-usb-device-stick-or-hd.html#) device

(I didn’t take screenshots, so I will be explaining a lot about the screens… It looks like a lot of work, but trust me: it is not, and it really is easy:-)


Insert the LiveCD into your computer;
Connect your USB device;
Boot your computer from the liveCD;
Once Ubuntu is started, go to System - Administration - Partition Manager
This will open the Partion Editor. Select your USB device and delete all partitions on it. Click Apply and exit Partition Editor;
Double Click the Install Icon. This will start the Installer;
The Welcome Screen is shown. Choose your language and click Forward;
Select your Time Zone and click Forward;
Choose your Keyboard Layout and click Forward;
The partitioner will be started, and you will be given the choice where to install Ubuntu. Choose Guided - Use entire disk, selecting your USB device (this will most likely be /dev/sdb, don’t choose /dev/sdb1!);
The next sceen you will give your username/password information. Provide the required info and hit Forward;
If there is anything to migrate from other installations on your computer (http://www.ubuntugeek.com/a-much-easier-way-to-install-ubuntu-on-a-usb-device-stick-or-hd.html#) (most likely not), do whatever you want, and click Forward;
The next screen is important - It is titled: “Ready to Install”. Be careful here: before clicking on Forward, make sure you click on the “Advanced” Button!
This will open a new screen, giving you the option whether and where to install the bootloader. Select your USB device (in my case it was /dev/sdb) to install the bootloader to;
Exit this screen and click on Forward in the “Ready to Install” screen, which will be shown;
The installation will be started now. Just be patient, grab a cup of coffee and come back 15 minutes later, your installation will be more or less finished by then.




I guess that is it. If I missed something, please comment.
Regards,

jimmers
January 19th, 2011, 07:26 PM
Try this tutorial :-
p { margin-bottom: 0.21cm; }a:link { } I was reading How to install Ubuntu Linux from USB Stick (http://www.ubuntugeek.com/how-to-install-ubuntu-linux-from-usb-stick.html) posted on this site a while ago, and found it to be quite some work to get Ubuntu working on a USB stick. Besides, having to prepare your USB device, creating a separate partition on it which will be more or less “useless” after the installation, giving up 750MB of space?
There had to be a better way.
Together with a colleague of mine, I decided to figure out whether there could be an easier way to install Ubuntu on a USB device.
I found a way of doing it in a much simpler way… without creating the separate partition to store the LiveCD:
A couple of assumptions to take into account when going through this manual:


My computer (Dell D820 laptop (http://www.ubuntugeek.com/a-much-easier-way-to-install-ubuntu-on-a-usb-device-stick-or-hd.html#)) has 1 internal disk, devided into 3 partitions (dell utility - windows - Ubuntu 8.04)
Just one USB device (in my case a 250GB harddisk
BIOS configured to enable boot from internal HDD, CD/DVD and USB Storage (http://www.ubuntugeek.com/a-much-easier-way-to-install-ubuntu-on-a-usb-device-stick-or-hd.html#) device

(I didn’t take screenshots, so I will be explaining a lot about the screens… It looks like a lot of work, but trust me: it is not, and it really is easy:-)


Insert the LiveCD into your computer;
Connect your USB device;
Boot your computer from the liveCD;
Once Ubuntu is started, go to System - Administration - Partition Manager
This will open the Partion Editor. Select your USB device and delete all partitions on it. Click Apply and exit Partition Editor;
Double Click the Install Icon. This will start the Installer;
The Welcome Screen is shown. Choose your language and click Forward;
Select your Time Zone and click Forward;
Choose your Keyboard Layout and click Forward;
The partitioner will be started, and you will be given the choice where to install Ubuntu. Choose Guided - Use entire disk, selecting your USB device (this will most likely be /dev/sdb, don’t choose /dev/sdb1!);
The next sceen you will give your username/password information. Provide the required info and hit Forward;
If there is anything to migrate from other installations on your computer (http://www.ubuntugeek.com/a-much-easier-way-to-install-ubuntu-on-a-usb-device-stick-or-hd.html#) (most likely not), do whatever you want, and click Forward;
The next screen is important - It is titled: “Ready to Install”. Be careful here: before clicking on Forward, make sure you click on the “Advanced” Button!
This will open a new screen, giving you the option whether and where to install the bootloader. Select your USB device (in my case it was /dev/sdb) to install the bootloader to;
Exit this screen and click on Forward in the “Ready to Install” screen, which will be shown;
The installation will be started now. Just be patient, grab a cup of coffee and come back 15 minutes later, your installation will be more or less finished by then.




I guess that is it. If I missed something, please comment.
Regards,

oldfred
January 19th, 2011, 07:51 PM
Similar to jimmers, with screen shots. With Maverick you have to use manual install and choose partitions to get the combo box on where to install grub. Otherwise it will overwrite the windows boot loader on your hard drive unless you disconnect it so it only sees the flash drive.

It does not have to be encrypted:
Standard full install to flash or SSD:
Ubuntu Encrypted Flash Memory Installation
http://members.iinet.net/~herman546/p19.html
More discussion Dec 2010
http://ubuntuforums.org/showthread.php?t=1643591

Recognize that both flash drive is slower with writes and USB is slower than hard drive. But it still works better than the liveCD.

C.S.Cameron
January 19th, 2011, 11:14 PM
You might be able to get by with a persistent install using usb-creator from the Live CD, a Windows version is in the iso.

Following is step by step for Ubuntu 10.10, above step by step is for 10.04 LTS.

Turn off and unplug the computer. (See note at bottom)
Remove the side from the case.
Unplug the power cable from the hard drive.
Plug the computer back in.
Insert the flash drive.
Insert the Live CD.
Start the computer, the CD should boot.
Select language
Select install Ubuntu.
Select Download updates while installing and Select Install this third-party software.
Forward
At "Allocate drive space" select "Specify partitions manually (advanced)".
Forward
Confirm Device is correct.
(Optional partition for use on Windows machine)
Select "New Partition Table" click Continue on the drop down.
Click "Free space" and "Add".
Select "Primary".
Make "New partition size..." about 4GB.
Location = Beginning.
"Use as:" = "FAT32 file system"
And "Mount point" = windows.
Select "OK"
Click "free space" and then "Add".
Select "Primary", "New partition size ..." = 4 to 6 GB, Beginning, Ext4, and Mount point = "/" then OK.
(Optional home partition)
Click "free space" and then "Add".
Select "Primary", "New partition size ..." = 4 to 8 GB, Beginning, Ext2, and Mount point = "/home" then OK.
(Optional swap space, allows hybernation)
Click "free space" and then "Add".
Select "Primary", "New partition size ..." = remaining space, (1 to 2 GB, same size as RAM), Beginning and "Use as" = "swap area" then OK.
(Important)
Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged.
Click "Install Now".
Select your location.
Forward.
Select Keyboard layout.
Forward.
Insert your name, username, password, computer name and select if you want to log in automatically or require a password.
Selecting "Encrypt my home folder" is a good option if you are worried about loosing your USB drive.
Select forward.
Wait until install is complete.
Turn off computer and plug in the HDD.
Stick the side panel back on.

Note:
You may omit disabling the hard drive if after partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR.
At boot you will then be given the option to boot your computer's hard drive, even when booting another computer.

wiggy25
January 20th, 2011, 06:57 PM
Thansk for all of this information.

I have installed Ubuntu 10.10 on a 16GB USB 2 USB stick.
It runs VERY slowly!!
It took hours to update!
The download was fast but installing took forever, it was much slower than when running the Live CD.

Could this be a problem with my USB ports or would this be normal when running from USB.

Any info would be great.

Cheers

Ian

wiggy25
January 20th, 2011, 07:06 PM
I've installed Ubuntu to a 16GB USB 2 flash drive and it runs very slow!!
The live CD is much quicker as is a Live USB stick.

Anything I could try to speed it up, the PC is about two years old, so all of the USB ports are USB 2.0
Just seems odd that it's really slow, I know it won't be as fast as hard drive install but this is a nightmare.

Any ideas anyone?

Cheers

Ian

wiggy25
January 20th, 2011, 07:06 PM
I've installed Ubuntu to a 16GB USB 2 flash drive and it runs very slow!!
The live CD is much quicker as is a Live USB stick.

Anything I could try to speed it up, the PC is about two years old, so all of the USB ports are USB 2.0
Just seems odd that it's really slow, I know it won't be as fast as hard drive install but this is a nightmare.

Any ideas anyone?

Cheers

Ian