特殊:Badtitle/NS100:Installation/FromUSBStick
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Installation/FromUSBStick }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/af | • {{#if: UbuntuHelp:Installation/FromUSBStick|Afrikaans| [[::Installation/FromUSBStick/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ar | • {{#if: UbuntuHelp:Installation/FromUSBStick|العربية| [[::Installation/FromUSBStick/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/az | • {{#if: UbuntuHelp:Installation/FromUSBStick|azərbaycanca| [[::Installation/FromUSBStick/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/bcc | • {{#if: UbuntuHelp:Installation/FromUSBStick|جهلسری بلوچی| [[::Installation/FromUSBStick/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/bg | • {{#if: UbuntuHelp:Installation/FromUSBStick|български| [[::Installation/FromUSBStick/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/br | • {{#if: UbuntuHelp:Installation/FromUSBStick|brezhoneg| [[::Installation/FromUSBStick/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ca | • {{#if: UbuntuHelp:Installation/FromUSBStick|català| [[::Installation/FromUSBStick/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/cs | • {{#if: UbuntuHelp:Installation/FromUSBStick|čeština| [[::Installation/FromUSBStick/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/de | • {{#if: UbuntuHelp:Installation/FromUSBStick|Deutsch| [[::Installation/FromUSBStick/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/el | • {{#if: UbuntuHelp:Installation/FromUSBStick|Ελληνικά| [[::Installation/FromUSBStick/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/es | • {{#if: UbuntuHelp:Installation/FromUSBStick|español| [[::Installation/FromUSBStick/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/fa | • {{#if: UbuntuHelp:Installation/FromUSBStick|فارسی| [[::Installation/FromUSBStick/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/fi | • {{#if: UbuntuHelp:Installation/FromUSBStick|suomi| [[::Installation/FromUSBStick/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/fr | • {{#if: UbuntuHelp:Installation/FromUSBStick|français| [[::Installation/FromUSBStick/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/gu | • {{#if: UbuntuHelp:Installation/FromUSBStick|ગુજરાતી| [[::Installation/FromUSBStick/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/he | • {{#if: UbuntuHelp:Installation/FromUSBStick|עברית| [[::Installation/FromUSBStick/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/hu | • {{#if: UbuntuHelp:Installation/FromUSBStick|magyar| [[::Installation/FromUSBStick/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/id | • {{#if: UbuntuHelp:Installation/FromUSBStick|Bahasa Indonesia| [[::Installation/FromUSBStick/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/it | • {{#if: UbuntuHelp:Installation/FromUSBStick|italiano| [[::Installation/FromUSBStick/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ja | • {{#if: UbuntuHelp:Installation/FromUSBStick|日本語| [[::Installation/FromUSBStick/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ko | • {{#if: UbuntuHelp:Installation/FromUSBStick|한국어| [[::Installation/FromUSBStick/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ksh | • {{#if: UbuntuHelp:Installation/FromUSBStick|Ripoarisch| [[::Installation/FromUSBStick/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/mr | • {{#if: UbuntuHelp:Installation/FromUSBStick|मराठी| [[::Installation/FromUSBStick/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ms | • {{#if: UbuntuHelp:Installation/FromUSBStick|Bahasa Melayu| [[::Installation/FromUSBStick/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/nl | • {{#if: UbuntuHelp:Installation/FromUSBStick|Nederlands| [[::Installation/FromUSBStick/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/no | • {{#if: UbuntuHelp:Installation/FromUSBStick|norsk| [[::Installation/FromUSBStick/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/oc | • {{#if: UbuntuHelp:Installation/FromUSBStick|occitan| [[::Installation/FromUSBStick/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/pl | • {{#if: UbuntuHelp:Installation/FromUSBStick|polski| [[::Installation/FromUSBStick/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/pt | • {{#if: UbuntuHelp:Installation/FromUSBStick|português| [[::Installation/FromUSBStick/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ro | • {{#if: UbuntuHelp:Installation/FromUSBStick|română| [[::Installation/FromUSBStick/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/ru | • {{#if: UbuntuHelp:Installation/FromUSBStick|русский| [[::Installation/FromUSBStick/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/si | • {{#if: UbuntuHelp:Installation/FromUSBStick|සිංහල| [[::Installation/FromUSBStick/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/sq | • {{#if: UbuntuHelp:Installation/FromUSBStick|shqip| [[::Installation/FromUSBStick/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/sr | • {{#if: UbuntuHelp:Installation/FromUSBStick|српски / srpski| [[::Installation/FromUSBStick/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/sv | • {{#if: UbuntuHelp:Installation/FromUSBStick|svenska| [[::Installation/FromUSBStick/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/th | • {{#if: UbuntuHelp:Installation/FromUSBStick|ไทย| [[::Installation/FromUSBStick/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/tr | • {{#if: UbuntuHelp:Installation/FromUSBStick|Türkçe| [[::Installation/FromUSBStick/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/vi | • {{#if: UbuntuHelp:Installation/FromUSBStick|Tiếng Việt| [[::Installation/FromUSBStick/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/yue | • {{#if: UbuntuHelp:Installation/FromUSBStick|粵語| [[::Installation/FromUSBStick/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/zh | • {{#if: UbuntuHelp:Installation/FromUSBStick|中文| [[::Installation/FromUSBStick/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/zh-hans | • {{#if: UbuntuHelp:Installation/FromUSBStick|中文(简体)| [[::Installation/FromUSBStick/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/FromUSBStick | UbuntuHelp:Installation/FromUSBStick | {{#if: | :}}Installation/FromUSBStick}}/zh-hant | • {{#if: UbuntuHelp:Installation/FromUSBStick|中文(繁體)| [[::Installation/FromUSBStick/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:Installation/FromUSBStick|:Installation/FromUSBStick|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Installation/FromUSBStick/zh | | {{#ifexist: Installation/FromUSBStick/zh | | {{#ifeq: {{#titleparts:Installation/FromUSBStick|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Installation/FromUSBStick|1|-1|}} | zh | | }}
Install Ubuntu from a USB stick
This pages describes how to install Ubuntu by copying the contents of the installation CD to an USB drive such as a memory stick (or flash drive) and making the USB stick bootable. This is handy for machines like ultra portable notebooks that do not have a CD drive but can boot from USB media. The main steps are:
- Prepare the USB stick
- Boot the computer from your USB stick.
- Install Ubuntu as you would from a normal boot CD
Note: It is highly recommended to use the latest version of Ubuntu to prepare your USB stick. See also the [for USB sticks] from the official Install Guide.
Check your USB stick
Booting from USB stick can be very handy, but there is no guarantee that it will work with your particular combination of computer and USB stick. Even if you are able to boot from your USB stick 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. Make sure to pick a memory stick that is large enough to hold the contents of the installation CD (about 700MB), 1GB is recommended. Versions of SYSLINUX before 3.00 require the use of a FAT16 file system, which most USB sticks come formatted with anyway. This is the most compatible file system, and is recommended. As of version 3.00, also FAT32 is supported by SYSLINUX. Insert the USB stick you want to use for the installer. A few seconds after plugging in the USB stick 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.
Automatic Approaches
UNetbootin (GUI-based, runs from either Windows or Linux)
[[1]] 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. 模板:Http://sourceforge.net/dbimage.php?id=167328 (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: 1) Delete the SYSLINUX.CFG file or rename it to be SYSLINUX.OLD 2) Enter the ISOLINUX folder and rename the ISOLINUX.CFG file to be SYSLINUX.CFG 3) Move up to the top level and rename the ISOLINUX folder to be SYSLINUX
Live USB creator (GUI-based, runs from Live CD)
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. https://launchpad.net/liveusb -- probono 模板:Http://klik.atekon.de/liveusb/screenshot.png
isotostick.sh (Command-line shell script, runs from Linux)
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:
sudo apt-get install syslinux mtools wget http://www.startx.ro/sugar/isotostick.sh chmod +x isotostick.sh sudo ./isotostick.sh ubuntu-7.10-desktop-i386.iso /dev/sdX1
Don't forget to replace /dev/sdX1 with the partition name of your USB stick found in the previous section! 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. Now you can boot from the USB stick and install Ubuntu like as if you had booted from the Desktop CD. 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
ubuntu-server-flashdrive-installer.sh (Command-line shell script, runs from Linux)
The UbuntuServerFlashDriveInstaller was developed from the instructions at [forum post].
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
isolinux
directory tosyslinux
and the fileisolinux.cfg
tosyslinux.cfg
- only for old versions of syslinux: Copy some files from sub-directories to the root directory and edit
syslinux.cfg
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
/cdrom
during the Ubuntu installation process. - only for the Alternate installer CD and Ubuntu 8.04: See [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 stick:
- 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:
sudo apt-get install syslinux mtools
- Attach your USB stick 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
mount -t vfat /dev/sda1 /mnt
. Note the mountpoint (i.e./mnt
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 stick first. Check the vendor's homepage.) Note the drive letter that Windows assigns to it (for exampleF:
). - Make the USB stick bootable. If you're using Linux and your USB stick is mounted as in the above example, use:
syslinux -s /dev/sda1
. If you are using Windows and the flash drive has the letterF:
assigned to it as in the above example, use:syslinux -s -m F:
- You should see a new file called
ldlinux.sys
in the root directory of your flash drive. (Note that it is a hidden file, you might not see it in Windows Explorer; trydir /a F:
from a command prompt). Now you can boot from your USB stick. Read on once you get a SYSLINUX message and a ""boot:"" prompt.
Regarding the IDE disk: When in the USB cradle, the disk is sda,
whereas when I mount it in the Libretto as the primary IDE disk,
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 pumount
any device you intend to do any low-level operations on,
and then mount
and unmount
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 stick (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:
mount -o loop /path/to/ubuntu.iso /path/to/mount/point
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 stick:
xcopy /e /h /k d:\*.* f:
Move files to the root directory
This step is not needed if you prepared the flash drive with syslinux 3.35 or newer (Ubuntu 7.10). Copy (or move) the files stated from the following directories to the root directory of your USB stick:
- isolinux (all files)
- casper (vmlinuz and initrd.gz)
- install (all files)
Move dapper to stable
Only needed for Ubuntu 6.06 Alternate install CD
Rename the directory dists/dapper
to dists/stable
.
I think this depends slightly on which CD and which installer you're using.
I've had problems when dists/dapper
was missing and when dists/stable
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 vfat
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 dists/stable
and rename the dists/feisty
to dists/stable
. -- Boo
Adjust SYSLINUX.CFG
For recent versions of syslinux, you just need to rename the isolinux
directory to syslinux
and rename the file isolinux.cfg
inside this directory to syslinux.cfg
.
For older versions: Copy (or rename) the file isolinux.cfg
to syslinux.cfg
. Then edit the file and remove the /casper/
or /install/
reference in all paths. For example you would change the line containing DEFAULT /casper/vmlinuz
to DEFAULT vmlinuz
. Save the file, and make sure it is called syslinux.cfg
. 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 /install/
reference. The only line it is found is
kernel /install/mt86plus
, which must be changed to kernel /mt86plus
. -- 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 stick. 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-2"". Do the following:
mkdir /cdrom /dev/cdroms
cd /dev/cdroms
ln -s ../sda1 cdrom0
(where sda1 is your USB stick)mount -t vfat /dev/cdroms/cdrom0 /cdrom
Then switch back to the first virtual console by pressing ""ALT-1"". 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 hda
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 mount -t vfat /dev/hda3 /cdrom
.
(I skipped the gyrations with /dev/cdroms
, 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 /etc/fstab
and make sure that /media/cdrom0 points to the CD drive and not to the USB stick. If you don't, you might get this error when trying to mount a USB stick: "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 ([150872]).
Open /etc/fstab for editing, e.g.
sudo gedit /etc/fstab
Find a line like this (usually at the end):
/dev/sdb1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
and comment it out by placing a # at the beginning:
#/dev/sdb1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
You can also rename the real cdrom mount point to /media/cdrom0
if you like.
Save the file, and you're done.
See also
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. -- 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
On Partitioning the Flash drive
- I partitioned the disk for installation with room for several boot images.
I created hda1
for /boot
(in retrospect, maybe not necessary),
hda2
for swap (again in retrospect, could go in an extended partition;
if I do it again I'll add the good old Woody installer rescue288
disk image
-- still viable and valuable as a rescue disk!),
hda3
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 hda4
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.
mkfs -t vfat /dev/sdXY
... and be real careful to not format the wrong disk by mistake.
(So in my case, this would be sda3
here.)
No need to mount any other partitions than hda3
/sda3
)
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 /media/usbdisk
(and usbdisk-1
, usbdisk-2
etc for additional partitions or devices
... mount
with no arguments will tell you what's where, if you're unsure).