个人工具

“UbuntuHelp:Installation/FromUSBStick”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Installation/FromUSBStick}}
 
{{From|https://help.ubuntu.com/community/Installation/FromUSBStick}}
 
{{Languages|UbuntuHelp:Installation/FromUSBStick}}
 
{{Languages|UbuntuHelp:Installation/FromUSBStick}}
== Install Ubuntu from a USB stick ==
+
== Outline ==
This pages describes how to install Ubuntu by copying the contents of the installation CD to an USB drive (such as a self-contained flash drive or a Memory Stick or SD card reader) and making the USB drive bootable. This is handy for machines like ultra-portable notebooks that do not have a CD drive but can boot from USB media.
+
The recommended way to install Ubuntu 9.10 from a USB flash drive is to use the usb-creator program, point it at a CD ISO image, and let it create a bootable USB that you can use instead of the CD.
The main steps are:
+
<ol><li>Acquire the correct Ubuntu installation files and tools
* Prepare the USB drive
+
</li><li>Put Ubuntu onto your USB drive
* Boot the computer from your USB drive.
+
</li><li>Configure your computer to boot from USB drive and boot from it
* Install Ubuntu as you would from a normal boot CD
+
</li><li>Try Ubuntu or install to your hard drive.</li></ol>
''Note:'' It is highly recommended to use the latest version of Ubuntu to prepare your USB drive.
+
 
See also the [https://help.ubuntu.com/9.04/installation-guide/i386/boot-usb-files.html instructions for USB drives] from the official Install Guide.
+
== Introduction ==
If you have downloaded a .img file, please refer to the [[UbuntuHelp:Installation/FromImgFiles|.img writing documentation]]
+
This page gives instructions on how to run Ubuntu from a USB flash drive for installation or to try it out.  This may be necessary for netbooks and other computers without CD drives and is handy for others because a USB flash drive is so convenient.  The Ubuntu 9.10 CD/DVD ISO images come with the necessary Windows and Linux utilities to get the system on a USB drive.
=== Check your USB drive ===
+
For custom, manual, older versions, and technical instructions and troubleshooting see [[UbuntuHelp:USB Installation Media|USB Installation Media]].  There are also network installation options available.  You can also see the [https://help.ubuntu.com/9.04/installation-guide/i386/boot-usb-files.html instructions for USB drives] from the official Install Guide.  
Booting from USB storage can be very handy, but there is no guarantee that it will work with your particular combination of computer and USB drive. Even if you are able to boot from your USB drive on one computer, this does not mean that it is going to work with the next one. You can try experimenting with different settings in your PC's BIOS to make it work.
+
Note: This article uses the terms USB stick, USB drive, thumb drive and flash drive interchangeably.
Make sure to pick a drive that is large enough to hold the contents of the installation CD (about 700MB), 1GB is recommended. Versions of SYSLINUX 3.53 and before require the use of a FAT16 file system, which most 2GB or smaller USB drive come formatted with anyway. This is the most compatible file system, and is recommended. As of version 3.00, SYSLINUX works with FAT32 as well, which is handy for users of larger drives.
+
== Known Issues ==
Insert the USB drive you want to use for the installer. A few seconds after plugging in the USB drive run the ''dmesg'' command or ''sudo fdisk -l'' to find the device name it was assigned. The rest of the instructions refer to ''/dev/sdX1'', remember to replace X with your device location.
+
The 9.10 CDs and DVDs are missing the usb-creator.exe program used by the Windows installation processes discussed below. To install the i386 desktop version to a flash drive from a disk image on Windows, use the incredibly easy process described at [http://www.pendrivelinux.com/create-a-ubuntu-9-10-live-usb-in-windows/ http://www.pendrivelinux.com/create-a-ubuntu-9-10-live-usb-in-windows/] . When you boot the resulting live persistent USB, you can install to your hard disk if you wish at any time, or not.
=== Automatic Approaches ===
+
If you just get a black screen when running from USB, using the setting "Discarded on shutdown, unless you save them elsewhere" in usb-creator might help. [http://forum.eeeuser.com/viewtopic.php?pid=658619 Forum: 9.10 NBR issues]
=== Ubuntu USB desktop image creator ===
+
9.10 Netbook Remix does not bring up Broadcom WIFI automatically. Poll and install a few packages manually with dpkg to get networking up.  https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/449268
'''Recomended Default method'''
+
If you get "Incorrect CD-ROM detected" error on detection stage, reboot, press F6 and then ESC to go to manual boot line editing, and add the option 'cdrom-detect/try-usb=true'. On Ubuntu 9.10 server edition the install menu will be shown right after reboot. Chose "Help" and then press F6. At the boot prompt type "install cdrom-detect/try-usb=true" and hit enter.
Ubuntu USB desktop image creator (usb-creator)
+
Some BIOS's (eg., the Eee PC netbook') have trouble recognizing that the USB is bootable. You may have to trick it into booting using the following method: At boot, enter the BIOS by pressing F2. Then, right as you exit the BIOS, hit the Esc key. For some systems, this will bring up the boot menu.
From the 8.10 release on, Ubuntu includes the usb-creator by default on all liveCDs and installations.
+
"Can not mount /dev/loop1 on /cow" message because usb-creator.exe is not creating a valid casper-rw file holding ext2/ext3 filesystem. Fix: After running usb-creator.exe, recreate casper-rw using cygwin tools or http://www.pendrivelinux.com/casper-rw-creator-make-a-persistent-file-from-windows/. (As of April 2010)
This is a simple utility designed to make bootable USB desktop images from
+
There is an unresolved issue in that you cannot create a bootable USB stick from within Mac OSX.  You must create the stick in Linux or Windows.
Ubuntu CDs. Booting from this USB drive will behave just as if you had booted from the install CD.  It will show the language selection and then the install menu, from which you can install Ubuntu onto the computer's hard drive or launch the [[UbuntuHelp:LiveCD|LiveCD]] environment.
+
== Prerequisites ==
You can find it in intrepid in System-->Administration-->Create a USB startup disk, if it is not there then as normal run the following command in the terminal :
+
=== Source machine ===
 +
==== Windows ====
 +
* Virtual Clone Drive or other ISO-reading software (or Ubuntu installation CD)
 +
==== Mac OS X ====
 +
* Administrator privileges on computer used to set up thumb drive
 +
==== Linux ====
 +
* Administrator privileges on computer used to set up thumb drive
 +
* Install and run usb-creator
 +
=== Target machine ===
 +
==== Netbook ====
 +
* 1GB thumb drive with everything backed up elsewhere, because these commands will over write the partition table.
 +
* ISO image file, or CD and another computer ubuntu-netbook-remix ISO, or kubuntu-netbook ISO, or
 +
* Optional, large capacity SD card for storing ISO and or backing up data
 +
==== Desktop or Server ====
 +
* 2GB thumb drive, or just do network install
 +
=== Ubuntu CD or ISO ===
 +
Ubuntu
 +
* Netbook: http://www.ubuntu.com/getubuntu/download-netbook
 +
* 32bit/64bit: http://www.ubuntu.com/getubuntu/download
 +
Derivatives
 +
* http://www.ubuntu.com/products/whatisubuntu/derivatives
 +
Get a disk from a friend, download, order one ... etc.
 +
== Copying Files to USB Stick ==
 +
=== From Ubuntu Linux ===
 +
* The usb-creator utility can be installed using [[UbuntuHelp:SynapticHowto|Synaptic|Package Manager]] if not already present on your system. Some people have problems with usb-creator. You can also install and use UNetbootin to do the same thing.
 +
* Run usb-creator
 +
* Top pane, you will have to click "other", locate and select the ISO image
 +
* Plug the to-be-nuked USB stick into the computer, it should show up in the bottom pane titled "USB disk to use". (You may have to use [[UbuntuHelp:GParted|GParted]] to format the USB Stick--I used 'ext3' as the format and it worked.)
 +
* Make sure you have the correct device selected before proceeding to create a USB startup disk!
 +
* There may be bugs during the formatting which will show up as two partitions when booting from the USB stick. Try selecting each of them and one should work. If not, restart the computer and try booting from the USB stick again.
 +
If you get a DBus error with usb-creator, this bug report may be helpful: https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/458334
 +
=== From Windows ===
 +
You can use Unetbootin to create a bootable usb drive. http://unetbootin.sourceforge.net/
 +
You won't be able to select the USB drive if it wasn't formatted in a way that Windows can see it. You may have to format it using explorer, then it will show up in the creator tool.
 +
Versions of Ubuntu before Ubuntu 9.10 (Karmic Koala) included a file called usb-creator.exe in the CD image. To install one of these versions, download the ISO file and burn the Ubuntu ISO file to a disk or mount the ISO file in a virtual drive to access the files within the image. You can also use [http://www.7-zip.org/ 7Zip] to extract the ISO so you can work with the files inside.
 +
== Booting the Computer From USB ==
 +
Most newer computers can boot from USB. If your computer does not automatically do so, you might need to edit the BIOS settings.
 +
Restart your computer, and watch for a message telling you which key to press to enter the BIOS setup. It will usually be one of F1, F2, DEL, ESC or F10. Press this key while your computer is booting to edit your BIOS settings. (On HP Mini Netbooks, they correct key is usually F9.)
 +
You need to edit the Boot Order. Depending on your computer, and how your USB key was formatted, you should see an entry for "removable drive" or "USB media". Move this to the top of the list to force the computer to attempt to boot from USB before booting from the hard disk.
 +
== Alternative method ==
 +
Some computers can see the USB thumb drive and have the option to boot from USB but cannot actually boot from USB. All hope is not lost.
 +
=== Requirements ===
 +
* Windows running on the computer
 +
* USB drive, ready to boot (shown below)
 +
* PLoP Boot Manager - Your alternative USB boot method (http://www.plop.at/en/bootmanager.html#runwin)
 +
Just follow the instructions on the PLop website.
 +
Note: When you use this method, the files on the USB drive are changed during boot. To use this method more than once, you must delete all files from the USB drive and prepare the USB drive again as described below.
 +
=== Creating a bootable USB Drive ===
 +
* Check the USB drive for files and back them up if needed, all contents will be destroyed.
 +
* A minimum of 1GB space is required for a netbook install. Other install types may require more space.
 +
* The Windows utility won't let you select the USB drive if the drive isn't properly formatted and mounted.
 +
Booting from a USB drive created with this utility will behave just as if you had booted from the install CD.  It will show the language selection and then the install menu, from which you can install Ubuntu onto the computer's hard drive or launch the [[UbuntuHelp:LiveCD|LiveCD]] environment.
 +
==== Linux ====
 +
The Ubuntu USB desktop image creator is available in the package '''usb-creator''', '''usb-creator-kde''' on Kubuntu, or '''usb-creator-gtk''' on 9.10.
 +
From the 8.10 release on (9.10 on for Kubuntu), Ubuntu includes the usb-creator by default on all [[UbuntuHelp:LiveCD|LiveCD]]s and installations.
 +
You can find it in System-->Administration-->Create a USB startup disk (Ubuntu Desktop) or K-Menu-->Applications-->System-->USB Startup Disk Creator (Kubuntu), if it is not there then run the following command in the Terminal :
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install usb-creator
 
sudo apt-get install usb-creator
 
</nowiki></pre>
 
</nowiki></pre>
Make sure the software-sources are activated if you are on a live cd
+
Make sure the software-sources are activated if you are on a [[UbuntuHelp:LiveCD|LiveCD]]
 
(software sources or `sudo gedit /etc/apt/sources.list`).  You may need to install the python-gnome2 package as well.
 
(software sources or `sudo gedit /etc/apt/sources.list`).  You may need to install the python-gnome2 package as well.
It should do everything needed you just need to have a live cd in you CD-Rom or show the usb-creator the ISO image of it and the rest of the process is automatic!
+
It should do everything needed you just need to have a [[UbuntuHelp:LiveCD|LiveCD]] in you CD-Rom or show the usb-creator the ISO image of it and the rest of the process is automatic! (for more info on how to use this tool by just popping in a [[UbuntuHelp:LiveCD|LiveCD]] to a drive in a computer running Ubuntu desktop see "Live USB creator" below, note that it also works with downloaded .iso images).
(for more info how to use this tool directly by just popping in a liveCD to a Drive in a running Ubuntu desktop see also "Live USB creator" below, note that it also works directly with downloaded .iso images)
+
If the progress bar proceeds very slowly (1% every 10 seconds or so) you may want to make sure your USB stick is mounted without the "sync" option.  This seems to work around [https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/313364 single-byte writes bug] in Jaunty's usb-creator.
'''Other external methods'''
+
{{https://wiki.kubuntu.org/Kubuntu/Netbook?action=AttachFile&do=get&target=screenshot-usb-creator.png}}
==== UNetbootin (GUI-based, runs from either Windows or Linux) ====
+
==== Windows ====
[http://unetbootin.sourceforge.net/ UNetbootin] automates this task by providing a GUI to create a bootable Ubuntu Live USB drive from an ISO file, and can be run from both an installed Windows or Linux system, or from a liveCD.
+
This method is recommended if you are creating Linux installation to coexist with your existing Windows installation.
{{http://sourceforge.net/dbimage.php?id=167328}}
+
* Find a usb-creator app and run it
(optional) If you need to activate the original Ubuntu livecd boot menu, for example if you want to disable the framebuffer or read the Ubuntu livecd HELP screens and cheatcodes, please make these changes to your USB drive after your UNetbootin installation is completed:
+
== Installing Ubuntu directly on a USB Flash drive ==
1) Delete the SYSLINUX.CFG file or rename it to be SYSLINUX.OLD
+
In order to install a fully working Ubuntu operating system on your USB Flash drive make sure that:
2) Enter the ISOLINUX folder and rename the ISOLINUX.CFG file to be SYSLINUX.CFG
+
* Your Flash Drive has more than 2GB of memory
3) Move up to the top level and rename the ISOLINUX folder to be SYSLINUX
+
* Your Flash Drive is bootable
''Comment: Does not work with 8.10 intrepid net install - fails to detect available hard drives - any ideas?''
+
* Your Flash Drive has a high read/write speed and is USB 2.0 enabled
==== Portable Linux ====
+
The process is described in detail in an [http://iwebdevel.com/2010/02/13/how-to-install-portable-linux-ubuntu-on-a-bootable-usb-flash-drive-from-sun-virtualbox/ external source].
{{http://rudd-o.com/new-projects/portablelinux/screenshot}}
+
== 9.04 and Earlier .img for Netbook ==
This will install the [[UbuntuHelp:LiveCD|LiveCD]] environment from your install CD onto the USB drive.  When you boot from USB, it will show you a GRUB menu with one option in it, which will then take you directly into the [[UbuntuHelp:LiveCD|LiveCD]] environment.
+
If you have downloaded an .img file, please refer to the [[UbuntuHelp:Installation/FromImgFiles|.img writing documentation]]
You can use this to install Ubuntu onto the computer's hard drive by using the ''Install'' icon on the desktop.
+
== Create Bootable USB Manually  ==
Persistence is setup automatically, so it will remember any changes you make between reboots.  You can also use the built-in GRUB to launch other disk images, like [http://rudd-o.com/new-projects/portablelinux/documentation/questions-and-tips/how-do-i-boot-ms-dos-using-my-usb-drive MS-DOS] or [http://rudd-o.com/new-projects/portablelinux/documentation/questions-and-tips/how-do-i-run-memtest86-from-my-usb-drive memory test]. The USB drive has a single normal partition on it, with a casper-rw image and a boot directory for GRUB. You can use the drive normally when not in the Live environment, and access it from the Live environment through a [http://rudd-o.com/new-projects/portablelinux/documentation/questions-and-tips/how-do-i-mount-the-windows-volume-in-my-usb-drive-while-using-my-portable-linux loopback].
+
Here is a way to create bootable USB manually. The advantage is you don't have to empty your USB as long as you have enough space for the files. Also it allow multi boot, so you can have your USB holding both 32bits and 64bits Ubuntu and so other Boot CD tool.
==== Live USB creator (GUI-based, runs from Live CD) ====
+
In order to do so you need :  
Live USB creator automates the process of creating a bootable Live USB system from a running Ubuntu Live CD. Simply run the Live CD, install the tool and start the Live USB installation from the System administration menu.
+
* Bootable Flash Drive ( NTFS / FAT32 / FAT 16 ), Disk with MBR, you can do this with gparted in linux or HP format in Win, fdisk ....etc
https://launchpad.net/liveusb -- probono
+
* Ubuntu ISO of your choice
{{http://klik.atekon.de/liveusb/screenshot.png}}
+
* Tools to extract files in the ISO ( ISO Mount, WinZIP, WinRAR, 7Zip, etc....)
You can run the tool from your normal desktop, just insert the Ubuntu Live CD and run it.
+
* Grub4Dos
''Comment: I don't use the Live CD, but have Ubuntu 8.10 installed in my hard disk. Yet, I found this very handy tool already installed in my system, under the System administration menu.''
+
<ol><li>[http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial Grub4DOS' Tutorial]
You may encounter an error when trying to boot from the USB drive, something like "Missing operating system". Make sure that you can mount the USB drive on a normal Ubuntu install, and that you can browse it in the file browser. If you can't, it hasn't been created properly. I found that using fdisk to delete the partition on the drive first, then running liveusb, worked nicely.
+
</li><li>[http://download.gna.org/grub4dos/grub4dos-0.4.4-2009-06-20.zip  Grub4DOS 0.4.4 for WIN9x/DOS/Linux(Download Here)]
==== isotostick.sh (Command-line shell script, runs from Linux) ====
+
</li><li>[http://download.gna.org/grubutil/grubinst-1.1-src-2008-01-01.zip  Grub4DOS GUI for WINXP/Vista/7]</li></ol>
''Warning:'' Running scripts from untrusted websites is potentially dangerous!
+
 
The easiest way, which also works with the Desktop installer, is to use the isotostick.sh script from http://www.startx.ro/sugar/ Download the script, make it executable and run the script like this ( alternate link : http://download.ubuntu-fr-secours.org/isotostick.sh ):
+
First you need to install grub on to the USB's MBR. Follow the link to the Grub4DOS Wiki:
 +
Simple example:
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install syslinux mtools
+
./bootlace /dev/sdx
wget http://download.ubuntu-fr-secours.org/isotostick.sh
+
chmod +x isotostick.sh
+
sudo ./isotostick.sh ubuntu-7.10-desktop-i386.iso /dev/sdX1
+
 
</nowiki></pre>
 
</nowiki></pre>
Don't forget to replace /dev/sdX1 with the partition name of your USB drive found in the previous section!
+
For more details, visit:  
You will see some "operation not permitted" errors when the script tries to copy the symlinks for /dists/stable and /dists/unstable. This is because fat16 file systems do not handle symlinks, but it will not cause any problems.
+
[http://grub4dos.sourceforge.net/wiki/index.php/Installation]
Now you can boot from the USB drive and install Ubuntu like as if you had booted from the Desktop CD.
+
Next, you open up the ISO file and extract the files in casper directory.
''Comment: Does not work with ubuntu-8.10-server-amd64.iso - says a common cdrom drive could not be found and won't proceed with installation - any ideas?''
+
''Comment:  Trying to use this on a Feisty machine to copy a Gutsy (livecd) iso. The script does not appear to copy all of the folders. It also looks for /usr/bin/syslinux/mbr -- which is not present with syslinux from the Feisty repos. --JulesTheMisfit''
+
''Comment:  Seems to work, hardy.iso on a hardy machine. ---Bas''
+
''Comment:  When using isotostick.sh, some versions of udev >127, udevinfo needs to be created as a symlink to udevadm. On my gentoo system, I ran: cd /sbin; ln -s udevadm udevinfo The other option is to just change udevinfo reference in isotostick.sh to udevadm ---rejon''
+
==== ubuntu-server-flashdrive-installer.sh (Command-line shell script, runs from Linux) ====
+
The [[UbuntuHelp:UbuntuServerFlashDriveInstaller|UbuntuServerFlashDriveInstaller]] was developed from the instructions at [http://ubuntuforums.org/showthread.php?p=4404569 this forum post].
+
''Comment: Does not work with ubuntu-8.10-server-amd64.iso - says no usable ISO found - any ideas?''
+
==== liveusb-creator (from Fedora) ====
+
If you are currently running Fedora you can use the [https://fedorahosted.org/liveusb-creator/ liveusb-creator] to create a live Ubuntu USB drive. Use the Use existing live CD option to select an Ubuntu Live CD that you have downloaded.
+
=== Manual Approach ===
+
In short here's what you have to do:
+
* Make the USB flash drive bootable using SYSLINUX.
+
* Copy the contents of the Ubuntu CD to your flash drive (make sure you include hidden files/directories).
+
* Rename the <code><nowiki>isolinux</nowiki></code> directory to <code><nowiki>syslinux</nowiki></code> and the file <code><nowiki>isolinux.cfg</nowiki></code> to <code><nowiki>syslinux.cfg</nowiki></code>
+
* ''only for old versions of syslinux:'' Copy some files from sub-directories to the root directory and edit <code><nowiki>syslinux.cfg</nowiki></code> a bit.
+
* Boot the computer from your USB flash drive.
+
* ''only for the Alternate installer CD and pre-7.04 versions:'' Create a fake CD-ROM drive and mount the flash drive to <code><nowiki>/cdrom</nowiki></code> during the Ubuntu installation process.
+
* ''only for the Alternate installer CD and Ubuntu 8.04:'' See [http://ubuntuforums.org/showthread.php?p=4404569 a forum post] on a file system support issue.
+
==== Make your USB stick bootable with SYSLINUX ====
+
SYSLINUX is a boot loader that operates off an MS-DOS/Windows FAT filesystem. Most USB flash drives come with a FAT filesystem. Here's how you can add a SYSLINUX bootblock to your USB drive:
+
<ol><li>Make sure that "syslinux" is installed. SYSLINUX is available for both Linux and MS Windows (the executable is in the archive under \win32\syslinux.exe). For more information check the SYSLINUX homepage: http://www.syslinux.org/. On Ubuntu Linux, install it with:</li></ol>
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install syslinux mtools</nowiki></pre>
+
total 701060
<ol><li>Attach your USB drive to your computer and mount it. This may happen automatically. If you are using Linux and it does not get mounted automatically, you can mount it by using a command such as <code><nowiki>mount -t vfat /dev/sda1 /mnt </nowiki></code>. Note the mountpoint (i.e. <code><nowiki>/mnt</nowiki></code> in the example. If you are using Windows, it should get mounted automatically. (If it doesn't your version of Windows is probably pretty old, and you'll need to install a driver for the USB drive first. Check the vendor's homepage.) Note the drive letter that Windows assigns to it (for example <code><nowiki>F:</nowiki></code>).
+
-rwxrwxrwx 2 adrian adrian 704487424 2010-04-29 05:38 filesystem.squashfs*
</li><li>Make the USB drive bootable. If you're using Linux and your USB drive is mounted as in the above example, use: <code><nowiki>syslinux -s /dev/sda1</nowiki></code>. If you are using Windows and the flash drive has the letter <code><nowiki>F:</nowiki></code> assigned to it as in the above example, use: <code><nowiki>syslinux -s -m F:</nowiki></code>
+
-rwxrwxrwx 1 adrian adrian  9365872 2010-04-29 05:34 initrd.lz*
</li><li>You should see a new file called <code><nowiki>ldlinux.sys</nowiki></code> in the root directory of your flash drive. (Note that it is a hidden file, you might not see it in Windows Explorer; try <code><nowiki>dir /a F:</nowiki></code> from a command prompt). Now you can boot from your USB drive. Read on once you get a SYSLINUX message and a ""boot:"" prompt.</li></ol>
+
-rwxrwxrwx 1 adrian adrian  4029792 2010-04-16 06:01 vmlinuz*
 
+
/media/Fujitsu 60GB USB/bootimg/ubuntu.10.4.x86$
''Regarding the IDE disk: When in the USB cradle, the disk is sda,
+
</nowiki></pre>
whereas when I mount it in the Libretto as the primary IDE disk,
+
Copy grldr to the root of the drive.
it is of course hda.
+
(I shot myself in the foot a couple of times because of this ...)''
+
''The automatic mounting is a bit distracting at times. My recommendation would be
+
to <code><nowiki>pumount</nowiki></code> any device you intend to do any low-level operations on,
+
and then <code><nowiki>mount</nowiki></code> and <code><nowiki>unmount</nowiki></code> as root as necessary.'' -- Ubuntu:Era
+
''Make sure to include the -m option with the Windows version of syslinux, to
+
ensure that it copies a fresh ISOLINUX master boot record (MBR.) Otherwise
+
the preexisting MBR may be used, which therefore may not point to
+
your syslinux.cfg file.''
+
==== Copy the Ubuntu CD to your USB stick ====
+
Copy the ''contents'' of the Ubuntu installation CD to your USB drive (i.e. all files and directories that are on the installation CD). Please do ''not'' copy an ISO image of the installation CD. Note that you don't have to burn the iso to copy it's contents, from linux it can be mounted like so:
+
 
<pre><nowiki>
 
<pre><nowiki>
mount -o loop /path/to/ubuntu.iso /path/to/mount/point</nowiki></pre>
+
drwx------ 1 adrian adrian  4096 2010-05-05 16:49 bootimg/
Make sure you also copy hidden files and directories (eg. ones with names beginning with a "."). In Gnome, press ctrl-H to see hidden files. In MS Windows you can use the following command, assuming that D: is your CD-ROM drive and F: is the USB drive:
+
-rwxrwxrwx 1 adrian adrian 220049 2009-09-24 17:30 grldr*
<pre><nowiki>
+
-rwxrwxrwx 1 adrian adrian  2760 2010-05-04 23:08 menu.lst*
xcopy /e /h /k d:\*.* f:</nowiki></pre>
+
/media/Fujitsu 60GB USB$
==== Move files to the root directory ====
+
</nowiki></pre>
'' This step is not needed if you prepared the flash drive with syslinux 3.35 or newer (Ubuntu 7.10).''
+
Now create menu.lst at the root of USB.
Copy (or move) the files stated from the following directories to the root directory of your USB drive:
+
Example of menu.lst:
* isolinux (all files)
+
* casper (vmlinuz and initrd.gz)
+
* install (all files)
+
- ''Downloaded Jaunty Desktop i386 iso and followed the manual procedure here, moving the files from the above folders. Got a similar result to a user below (could not install), so don't '''move''' the files from isolinux, casper and install folders, just '''copy''' them to the root directory. [I could then boot and install on my Thinkpad X60s without problems. From Hardy to Jaunty inside 30 minutes!!]'' -- badwolf
+
==== Move dapper/intrepid to stable ====
+
''Only needed for Ubuntu 6.06 Alternate install CD''
+
Rename the directory <code><nowiki>dists/dapper</nowiki></code> to <code><nowiki>dists/stable</nowiki></code>.
+
''I think this depends slightly on which CD and which installer you're using.
+
I've had problems when <code><nowiki>dists/dapper</nowiki></code> was missing and when <code><nowiki>dists/stable</nowiki></code>
+
was missing and I'm not sure what the circumstances were.
+
When it happens, just switch to a shell and rename it on the fly,
+
then return to the installer and ask it to retry.
+
(The <code><nowiki>vfat</nowiki></code> filesystem doesn't support symlinks, unfortunately.
+
If you have spare disk space and a little patience, you could copy
+
one to the other for the total belt and suspenders solution.)'' -- Ubuntu:Era
+
''For anyone trying to install the new Ubuntu 7.04 (Feisty) with this guide: You can
+
skip this step. In fact, it doesn't matter if you delete the file named <code><nowiki>dists/stable</nowiki></code>
+
and rename the <code><nowiki>dists/feisty</nowiki></code> to <code><nowiki>dists/stable</nowiki></code>.'' -- Boo
+
''Alternate installer for Intrepid x86 also complains about missing stable
+
directory. Removed "stable" file and renamed "intrepid" to "stable" fixed it. -- Tung
+
==== Adjust SYSLINUX.CFG ====
+
For recent versions of syslinux, you just need to rename the <code><nowiki>isolinux</nowiki></code> directory to <code><nowiki>syslinux</nowiki></code> and rename the file <code><nowiki>isolinux.cfg</nowiki></code> inside this directory to <code><nowiki>syslinux.cfg</nowiki></code> .
+
''For older versions:'' Copy (or rename) the file <code><nowiki>isolinux.cfg</nowiki></code> to <code><nowiki>syslinux.cfg</nowiki></code>. Then edit the file and remove the <code><nowiki>/casper/</nowiki></code> or <code><nowiki>/install/</nowiki></code> reference in all paths.  For example you would change the line containing <code><nowiki>DEFAULT /casper/vmlinuz</nowiki></code> to <code><nowiki>DEFAULT vmlinuz</nowiki></code>. Save the file, and make sure it is called <code><nowiki>syslinux.cfg</nowiki></code>. It does not matter whether the line breaks are in DOS or Linux format.
+
''Again, for anyone installing Ubuntu 7.04 (Feisty):
+
Just remove the <code><nowiki>/install/</nowiki></code> reference. The only line it is found is
+
<code><nowiki>kernel /install/mt86plus</nowiki></code>, which must be changed to <code><nowiki>kernel /mt86plus</nowiki></code>. -- Boo''
+
''no, it is not. there were 23 entries on isolinux.cfg'' -- capi
+
''I found twenty one, with Feisty, and syslinux 3.51'' -- Gedanken
+
==== Boot from the USB stick ====
+
Boot the computer from the USB drive. The installation can now be done as if you would be booting from the installation CD.
+
==== Mounting the USB stick as /cdrom ====
+
''This step is only needed for the Alternate install CD and Ubuntu 6.10 or older.''
+
Switch to the second virtual console during the first couple of dialogs (when asked about your preferred language for the installation etc.) by pressing the ""ALT-F2"". Do the following:
+
* <code><nowiki>mkdir /cdrom /dev/cdroms</nowiki></code>
+
* <code><nowiki>cd /dev/cdroms</nowiki></code>
+
* <code><nowiki>ln -s ../sda1 cdrom0</nowiki></code> (where sda1 is your USB drive)
+
* <code><nowiki>mount -t vfat /dev/cdroms/cdrom0 /cdrom</nowiki></code>
+
Then switch back to the first virtual console by pressing ""ALT-F1"". Continue installing Ubuntu as if you were running from CD.
+
''This was a bit tricky until I got the hang of it.
+
You need to have the hardware detection detect your <code><nowiki>hda</nowiki></code> before you can mount it!
+
But just wait until it complains about a missing CD-ROM, then
+
''don't'' try to helpfully tell it where to look.
+
Just accept the dialog where it says that this stage failed, ''then''
+
switch over to the virtual console and <code><nowiki>mount -t vfat /dev/hda3 /cdrom</nowiki></code>.
+
(I skipped the gyrations with <code><nowiki>/dev/cdroms</nowiki></code>, they don't seem to be necessary.)
+
Back in the installer, you should now be able to proceed from the next point in the dialog.
+
(Remember, I'm talking about the text-only installer. It might be different in the GTK install.)
+
-- Ubuntu:Era''
+
''I think just ran into https://launchpad.net/distros/ubuntu/+source/casper/+bug/63277'' -- Ubuntu:SvenHerzberg
+
''When installing Ubuntu 7.04 (Feisty), there was no need for me to mount the flash.'' -- Boo
+
''This is does not work for me using the alternate gutsy iso - i.e. mount -t vfat usbdev target fails with "no such device". There is a forum thread here: http://ubuntuforums.org/showthread.php?t=405008  Currently I know of no solution but to use the regular iso.'' -- Stenico
+
=== After Installing ===
+
After finishing the installation, edit <code><nowiki>/etc/fstab</nowiki></code> and make sure that /media/cdrom0 points to the CD drive and not to the USB drive. If you don't, you might get this error when trying to mount a USB drive: "Cannot mount volume. Invalid mount option when attempting to mount the volume."
+
This is because the installer believes it is installing from a CD drive ([https://launchpad.net/bugs/150872 bug 150872]).
+
Open /etc/fstab for editing, e.g.
+
<code><nowiki>sudo gedit /etc/fstab</nowiki></code>
+
Find a line like this (usually at the end):
+
<code><nowiki>/dev/sdb1      /media/cdrom0  udf,iso9660 user,noauto,exec,utf8 0      0</nowiki></code>
+
and comment it out by placing a # at the beginning:
+
<code><nowiki>#/dev/sdb1      /media/cdrom0  udf,iso9660 user,noauto,exec,utf8 0      0</nowiki></code>
+
You can also rename the real cdrom mount point to <code><nowiki>/media/cdrom0</nowiki></code> if you like.
+
Save the file, and you're done.
+
=== See also ===
+
* https://wiki.ubuntu.com/LiveUsbPendrivePersistent
+
=== Comments and Troubleshooting ===
+
- ''For an alternative method that works with Feisty see: https://help.ubuntu.com/7.04/installation-guide/i386/boot-usb-files.html)'' -- Monkeymind
+
- ''The instructions there work great with gutsy as well, but on my machine i needed to add "vesa vga=771" to the "append=" line in syslinux.cfg.  After that the process was completely unproblematic'' -- Matt Price
+
- ''I also succeeded in installing on a Libretto 100CT by using a 2.5" IDE disk in one of those cheap USB cradles. This machine has no CD-ROM, no floppy (on my unit), no USB. I've taken the liberty to annotate my experiences in an indented style, like this.'' -- Ubuntu:Era
+
- ''I installed on an IBM X40 using the contents of the mini.iso for edgy on a USB stick instead of using the iso for the bulkier alternate CD. I only had to install syslinux and rename isolinux.cfg to syslinux.cfg (I didn't have to change the contents of the file). It was very easy. I didn't have to try fooling the installer into thinking the stick was the CD and mess with symlinks etc.'' -- [[UbuntuHelp:MikkelErup|MikkelErup]]
+
- ''I succeeded installing Ubuntu 7.04 (Feisty) with this guide and just a few changes I added. Ubuntu is running stable and without any problems'' -- Boo
+
- ''Short guide (to get the idea):
+
mkfs.vfat /dev/<usbstick>; fdisk /dev/<usbstick> (make bootable); ./isostick.sh ubuntu-7.10-desktop-i386.iso /dev/<usbstick>;'' -- Syke
+
- ''Thanks for the advice guys, it also worked on my laptop: got it installed with 7.10 (and the encrypted LVM partitions I needed). I needed''
+
''a) a network link and install mini.iso http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/netboot/mini.iso,''
+
''b) a working 7.10 system with syslinux and mtools (On feisty: apt-get install syslinux).''
+
''c) cat /etc/mtab to find out my usb was at /dev/sdb1, mounted as /media/Flashdisk:''
+
*  syslinux -s /dev/sdb1
+
*  mount -o loop /home/stilus/Desktop/mini.iso /media/cdrom0/
+
*  cp -r /media/cdrom0/* /media/Flashdisk
+
*  cd /media/Flashdisk
+
*  mv isolinux.cfg syslinux.cfg
+
*  cd /
+
*  umount /media/Flashdisk
+
''Plugged this Flashdisk in my to-be-installed system, and that was that: let the netinstall begin!!''  -- stilus
+
- ''This does not work, at least for me. Boot fails in syslinux already: selecting "install" boot menu option shows a dialog "install./vm" with button "Start", which does nothing. It seems it somehow tries to interpret the path "install/vmlinuz" as a single 8.3 filename, resulting in the nonsense "install./vm". Same happens for all other boot options. After booting manually, I got further errors later on when trying to find the packages to install.''
+
- ''What about a howto or tutorial about use Grub instead of syslinux ?''
+
- ''(Hardy) I had to toggle the bootable status of the USB stick using parted, as per the instructions isotostick.sh prints out:''
+
''Partition isn't marked bootable!''
+
''You can mark the partition as bootable with ''
+
''# /sbin/parted /dev/sdc''
+
''(parted) toggle N boot''
+
''(parted) quit''
+
- ''Jaunty Install from the alternate CD failed for me after following these instructions with "failed to determine the codename for the release". I could go no further.'' -- naught101
+
- ''I had to manually set the partition as bootable after following the instructions for syslinux above to install from my external harddrive. That is, I used gparted to set the "boot" flag to on. There should be some program to do this under Windows as well''
+
- ''In two steps, run the Ubuntu Live system from a USB stick already bootable with GRUB (without deleting what's on it): 1) from the (K/X)Ubuntu installation CD, copy the <code><nowiki>casper</nowiki></code> directory to the USB stick. 2) add the following entry to the GRUB menu.lst file on the USB stick :
+
 
<pre><nowiki>
 
<pre><nowiki>
  title Ubuntu
+
default /default
  root (hd0,0) # Assuming /casper on first partition of USB stick
+
title Ubuntu 10.04 LiveCD
  kernel /casper/vmlinuz file=/cdrom/preseed/kubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash ignore_uuid
+
find --set-root /bootimg/ubuntu.10.4.x86/initrd.lz
    initrd /casper/initrd.gz
+
kernel /bootimg/ubuntu.10.4.x86/vmlinuz boot=casper live-media-path=/bootimg/ubuntu.10.4.x86/ ignore_uuid
 +
initrd /bootimg/ubuntu.10.4.x86/initrd.lz
 +
boot
 
</nowiki></pre>
 
</nowiki></pre>
The above is a 1:1 translation of the syslinux/isolinux boot settings plus the <code><nowiki>ignore_uuid</nowiki></code> option necessary to tell casper not to specifically look for the CD image by UUID but accept any other root device, too. Note that this is for the Live system only. Trying to install Ubuntu with this setup to a local disk is likely to fail.'''
+
Make sure the path match where the files you copy to.
==== On Partitioning the Flash drive ====
+
Now, reboot.
- ''I partitioned the disk for installation with room for several boot images.
+
[[category:CategoryLive]] [[category:CategoryInstallation]] [[category:CategoryInstallation]] [[category:CategoryInstallation]]
I created <code><nowiki>hda1</nowiki></code> for <code><nowiki>/boot</nowiki></code> (in retrospect, maybe not necessary),
+
<code><nowiki>hda2</nowiki></code> for swap (again in retrospect, could go in an extended partition;
+
if I do it again I'll add the good old Woody installer <code><nowiki>rescue288</nowiki></code> disk image
+
-- still viable and valuable as a rescue disk!),
+
<code><nowiki>hda3</nowiki></code> for the Dapper 6.06 server install CD filesystem
+
(this is a low-memory system which can't boot the regular live CD, I have been told),
+
and <code><nowiki>hda4</nowiki></code> as an extended partition for the remaining BIOS hibernation and
+
actual root filesystem partitions.''
+
''At this stage, I only marked the installer partition as bootable.
+
It's a FAT16 partition (partition type 06).''
+
''Since there is no filesystem yet, the newly created partition needs to be formatted.
+
<code><nowiki>mkfs -t vfat /dev/sdXY</nowiki></code> ... and be real careful to not format the wrong disk by mistake.
+
(So in my case, this would be <code><nowiki>sda3</nowiki></code> here.)''
+
''No need to mount any other partitions than <code><nowiki>hda3</nowiki></code>/<code><nowiki>sda3</nowiki></code>)
+
although Ubuntu will in fact automatically try to mount all the ones which
+
have a filesystem on them.
+
Actually, I momentarily unplugged and then replugged the USB cable at this point
+
to make sure the partition table was synced OK, and then the new partition
+
was automatically mounted on <code><nowiki>/media/usbdisk</nowiki></code>
+
(and <code><nowiki>usbdisk-1</nowiki></code>, <code><nowiki>usbdisk-2</nowiki></code> etc for additional partitions or devices
+
... <code><nowiki>mount</nowiki></code> with no arguments will tell you what's where, if you're unsure).''
+
''Unable to boot the USB drive?  Two suggestions: 1) Run <code><nowiki>install-mbr</nowiki></code> (from the <code><nowiki>mbr</nowiki></code> package) on your drive (<code><nowiki>/dev/sde</nowiki></code> for example) and 2) Ensure the partition (<code><nowiki>/dev/sde1</nowiki></code> for example) is bootable. In my experience, some machines require the partition to be flagged bootable; some don't!''
+
Is this page about installing Ubuntu from a USB stick, or installing it to a USB stick?  Those are completely different things, you know...
+
There seem to be many different methods for doing these things, with necessarily similar names.  They should all be summarized at the top.
+
----
+
[[category:CategoryLive]]
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 22:50的最新版本


Outline

The recommended way to install Ubuntu 9.10 from a USB flash drive is to use the usb-creator program, point it at a CD ISO image, and let it create a bootable USB that you can use instead of the CD.

  1. Acquire the correct Ubuntu installation files and tools
  2. Put Ubuntu onto your USB drive
  3. Configure your computer to boot from USB drive and boot from it
  4. Try Ubuntu or install to your hard drive.

Introduction

This page gives instructions on how to run Ubuntu from a USB flash drive for installation or to try it out. This may be necessary for netbooks and other computers without CD drives and is handy for others because a USB flash drive is so convenient. The Ubuntu 9.10 CD/DVD ISO images come with the necessary Windows and Linux utilities to get the system on a USB drive. For custom, manual, older versions, and technical instructions and troubleshooting see USB Installation Media. There are also network installation options available. You can also see the instructions for USB drives from the official Install Guide. Note: This article uses the terms USB stick, USB drive, thumb drive and flash drive interchangeably.

Known Issues

The 9.10 CDs and DVDs are missing the usb-creator.exe program used by the Windows installation processes discussed below. To install the i386 desktop version to a flash drive from a disk image on Windows, use the incredibly easy process described at http://www.pendrivelinux.com/create-a-ubuntu-9-10-live-usb-in-windows/ . When you boot the resulting live persistent USB, you can install to your hard disk if you wish at any time, or not. If you just get a black screen when running from USB, using the setting "Discarded on shutdown, unless you save them elsewhere" in usb-creator might help. Forum: 9.10 NBR issues 9.10 Netbook Remix does not bring up Broadcom WIFI automatically. Poll and install a few packages manually with dpkg to get networking up. https://bugs.launchpad.net/ubuntu/+source/jockey/+bug/449268 If you get "Incorrect CD-ROM detected" error on detection stage, reboot, press F6 and then ESC to go to manual boot line editing, and add the option 'cdrom-detect/try-usb=true'. On Ubuntu 9.10 server edition the install menu will be shown right after reboot. Chose "Help" and then press F6. At the boot prompt type "install cdrom-detect/try-usb=true" and hit enter. Some BIOS's (eg., the Eee PC netbook') have trouble recognizing that the USB is bootable. You may have to trick it into booting using the following method: At boot, enter the BIOS by pressing F2. Then, right as you exit the BIOS, hit the Esc key. For some systems, this will bring up the boot menu. "Can not mount /dev/loop1 on /cow" message because usb-creator.exe is not creating a valid casper-rw file holding ext2/ext3 filesystem. Fix: After running usb-creator.exe, recreate casper-rw using cygwin tools or http://www.pendrivelinux.com/casper-rw-creator-make-a-persistent-file-from-windows/. (As of April 2010) There is an unresolved issue in that you cannot create a bootable USB stick from within Mac OSX. You must create the stick in Linux or Windows.

Prerequisites

Source machine

Windows

  • Virtual Clone Drive or other ISO-reading software (or Ubuntu installation CD)

Mac OS X

  • Administrator privileges on computer used to set up thumb drive

Linux

  • Administrator privileges on computer used to set up thumb drive
  • Install and run usb-creator

Target machine

Netbook

  • 1GB thumb drive with everything backed up elsewhere, because these commands will over write the partition table.
  • ISO image file, or CD and another computer ubuntu-netbook-remix ISO, or kubuntu-netbook ISO, or
  • Optional, large capacity SD card for storing ISO and or backing up data

Desktop or Server

  • 2GB thumb drive, or just do network install

Ubuntu CD or ISO

Ubuntu

Derivatives

Get a disk from a friend, download, order one ... etc.

Copying Files to USB Stick

From Ubuntu Linux

  • The usb-creator utility can be installed using Synaptic|Package Manager if not already present on your system. Some people have problems with usb-creator. You can also install and use UNetbootin to do the same thing.
  • Run usb-creator
  • Top pane, you will have to click "other", locate and select the ISO image
  • Plug the to-be-nuked USB stick into the computer, it should show up in the bottom pane titled "USB disk to use". (You may have to use GParted to format the USB Stick--I used 'ext3' as the format and it worked.)
  • Make sure you have the correct device selected before proceeding to create a USB startup disk!
  • There may be bugs during the formatting which will show up as two partitions when booting from the USB stick. Try selecting each of them and one should work. If not, restart the computer and try booting from the USB stick again.

If you get a DBus error with usb-creator, this bug report may be helpful: https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/458334

From Windows

You can use Unetbootin to create a bootable usb drive. http://unetbootin.sourceforge.net/ You won't be able to select the USB drive if it wasn't formatted in a way that Windows can see it. You may have to format it using explorer, then it will show up in the creator tool. Versions of Ubuntu before Ubuntu 9.10 (Karmic Koala) included a file called usb-creator.exe in the CD image. To install one of these versions, download the ISO file and burn the Ubuntu ISO file to a disk or mount the ISO file in a virtual drive to access the files within the image. You can also use 7Zip to extract the ISO so you can work with the files inside.

Booting the Computer From USB

Most newer computers can boot from USB. If your computer does not automatically do so, you might need to edit the BIOS settings. Restart your computer, and watch for a message telling you which key to press to enter the BIOS setup. It will usually be one of F1, F2, DEL, ESC or F10. Press this key while your computer is booting to edit your BIOS settings. (On HP Mini Netbooks, they correct key is usually F9.) You need to edit the Boot Order. Depending on your computer, and how your USB key was formatted, you should see an entry for "removable drive" or "USB media". Move this to the top of the list to force the computer to attempt to boot from USB before booting from the hard disk.

Alternative method

Some computers can see the USB thumb drive and have the option to boot from USB but cannot actually boot from USB. All hope is not lost.

Requirements

Just follow the instructions on the PLop website. Note: When you use this method, the files on the USB drive are changed during boot. To use this method more than once, you must delete all files from the USB drive and prepare the USB drive again as described below.

Creating a bootable USB Drive

  • Check the USB drive for files and back them up if needed, all contents will be destroyed.
  • A minimum of 1GB space is required for a netbook install. Other install types may require more space.
  • The Windows utility won't let you select the USB drive if the drive isn't properly formatted and mounted.

Booting from a USB drive created with this utility will behave just as if you had booted from the install CD. It will show the language selection and then the install menu, from which you can install Ubuntu onto the computer's hard drive or launch the LiveCD environment.

Linux

The Ubuntu USB desktop image creator is available in the package usb-creator, usb-creator-kde on Kubuntu, or usb-creator-gtk on 9.10. From the 8.10 release on (9.10 on for Kubuntu), Ubuntu includes the usb-creator by default on all LiveCDs and installations. You can find it in System-->Administration-->Create a USB startup disk (Ubuntu Desktop) or K-Menu-->Applications-->System-->USB Startup Disk Creator (Kubuntu), if it is not there then run the following command in the Terminal :

sudo apt-get install usb-creator

Make sure the software-sources are activated if you are on a LiveCD (software sources or `sudo gedit /etc/apt/sources.list`). You may need to install the python-gnome2 package as well. It should do everything needed you just need to have a LiveCD in you CD-Rom or show the usb-creator the ISO image of it and the rest of the process is automatic! (for more info on how to use this tool by just popping in a LiveCD to a drive in a computer running Ubuntu desktop see "Live USB creator" below, note that it also works with downloaded .iso images). If the progress bar proceeds very slowly (1% every 10 seconds or so) you may want to make sure your USB stick is mounted without the "sync" option. This seems to work around single-byte writes bug in Jaunty's usb-creator. 模板:Https://wiki.kubuntu.org/Kubuntu/Netbook?action=AttachFile&do=get&target=screenshot-usb-creator.png

Windows

This method is recommended if you are creating Linux installation to coexist with your existing Windows installation.

  • Find a usb-creator app and run it

Installing Ubuntu directly on a USB Flash drive

In order to install a fully working Ubuntu operating system on your USB Flash drive make sure that:

  • Your Flash Drive has more than 2GB of memory
  • Your Flash Drive is bootable
  • Your Flash Drive has a high read/write speed and is USB 2.0 enabled

The process is described in detail in an external source.

9.04 and Earlier .img for Netbook

If you have downloaded an .img file, please refer to the .img writing documentation

Create Bootable USB Manually

Here is a way to create bootable USB manually. The advantage is you don't have to empty your USB as long as you have enough space for the files. Also it allow multi boot, so you can have your USB holding both 32bits and 64bits Ubuntu and so other Boot CD tool. In order to do so you need :

  • Bootable Flash Drive ( NTFS / FAT32 / FAT 16 ), Disk with MBR, you can do this with gparted in linux or HP format in Win, fdisk ....etc
  • Ubuntu ISO of your choice
  • Tools to extract files in the ISO ( ISO Mount, WinZIP, WinRAR, 7Zip, etc....)
  • Grub4Dos
  1. Grub4DOS' Tutorial
  2. Grub4DOS 0.4.4 for WIN9x/DOS/Linux(Download Here)
  3. Grub4DOS GUI for WINXP/Vista/7

First you need to install grub on to the USB's MBR. Follow the link to the Grub4DOS Wiki: Simple example:

./bootlace /dev/sdx

For more details, visit: [1] Next, you open up the ISO file and extract the files in casper directory.

total 701060
-rwxrwxrwx 2 adrian adrian 704487424 2010-04-29 05:38 filesystem.squashfs*
-rwxrwxrwx 1 adrian adrian   9365872 2010-04-29 05:34 initrd.lz*
-rwxrwxrwx 1 adrian adrian   4029792 2010-04-16 06:01 vmlinuz*
/media/Fujitsu 60GB USB/bootimg/ubuntu.10.4.x86$

Copy grldr to the root of the drive.

drwx------ 1 adrian adrian   4096 2010-05-05 16:49 bootimg/
-rwxrwxrwx 1 adrian adrian 220049 2009-09-24 17:30 grldr*
-rwxrwxrwx 1 adrian adrian   2760 2010-05-04 23:08 menu.lst*
/media/Fujitsu 60GB USB$

Now create menu.lst at the root of USB. Example of menu.lst:

default /default
title Ubuntu 10.04 LiveCD
find --set-root /bootimg/ubuntu.10.4.x86/initrd.lz
kernel /bootimg/ubuntu.10.4.x86/vmlinuz boot=casper live-media-path=/bootimg/ubuntu.10.4.x86/ ignore_uuid
initrd /bootimg/ubuntu.10.4.x86/initrd.lz
boot

Make sure the path match where the files you copy to. Now, reboot.