User:UNiversal

From XBMC
Revision as of 13:50, 20 December 2012 by UNiversal (Talk)

Jump to: navigation, search

Contents

1 Installation/FromUSBStick

These instructions have been adapted from the Ubuntu Community Documentation and credits for its creation are attributed Ubuntu Documentation Team as per their creative commons licence 3.0. This is a wip

2 Outline

The general procedure to install Ubuntu from a USB flash drive is:

1. Acquire the correct Ubuntu installation files ('the ISO')
1. Put Ubuntu onto your USB flash drive
1. Configure your computer to boot from USB flash drive and boot from it
1. Try Ubuntu or install it to your hard drive.

3 Introduction

XBMCbuntu or Ubuntu can be installed from a USB flash drive. 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. Also, you can be configured on the USB flash drive to save changes you make, unlike a read-only CD-ROM drive.

Booting from a USB flash 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.

Note: This article uses the term "USB flash drive" instead of: USB stick, USB drive, thumb drive and USB flash drive.

4 Prerequisites

To create a USB installation disk, you will need:

  • A 2 GB USB flash drive. Files on this USB disk will be erased, so previously backup your documents. Make sure this USB disk is properly formatted and mounted.
  • An XBMCbuntu ISO file see XBMC Download to download it.
  • An Ubuntu image file see Supported Linux distributions to download it)

5 Creating a bootable Ubuntu USB flash drive

5.1 From Ubuntu

  • Install and run usb-creator

You can find usb-creator-gtk in the Unity Dash by typing "Startup Disk Creator" (Ubuntu Desktop) or usb-creator-kde in K-Menu-->Applications-->System-->Startup Disk Creator (Kubuntu). If it is not there, then you can install it using the Synaptic Package Manager or Ubuntu Software Center

  • Insert and mount the USB drive. Inserting the USB drive should auto-mount it.
  • Start usb-creator. It looks like this:

Example.jpg



  • in the top pane of usb-creator, pick the .iso file that you downloaded.
  • if the .iso file isn't listed, click "Other" to locate and select the .iso file that you downloaded.
  • Alternately, if you have a CD or DVD-ROM with the Ubuntu version you want to install on the USB flash drive, insert it in your CD-ROM drive and usb-creator can use that.
  • It is not necessary to erase the USB flash drive, however it is advisable that you do so.
  1. . Select the first bootable partition on the USB device as the disk to use
  2. . The bootable partition should be formatted as either a FAT16 or FAT32 filesystem. This is the default for most USB flash drives.

Notes

  • NEVER use one of your hard drive partitions in this process unless you really know what you are doing, as data will get erased.
  • There may be a bug during the formatting which will cause two partitions to appear when booting from the USB flash drive. Try selecting each of them and one should work. If not, restart the computer and try booting from the USB flash drive 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


5.2 From Mac OSX

See How to install Ubuntu on MacBook using USB flash drive

5.3 From Windows

Download and use [Live Usb Creator].

Once you have usb-creator.exe, run it and follow the same steps as described for Linux (point it at your .iso file or your Ubuntu CD-ROM, point it at your USB flash drive, make sure you have the right device selected, then "Make Startup Disk").

Notes

  • Instead of usb-creator.exe you can use Unetbootin to create a bootable USB flash drive. http://unetbootin.sourceforge.net/
  • You won't be able to select the USB flash drive if it wasn't formatted in a way that Windows can see it. You may have to format it using Windows Explorer in order for it to show up in a creator tool.

6 Booting the Computer from USB

Remove all unneeded USB items, but keep the network cable attached.

Insert the bootable USB flash drive that you just created in your target computer and restart it. Most newer computers can boot from a USB flash drive. 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.)

Instead of editing BIOS settings, you can chose a boot device from the boot menu. Press the function key to enter the boot menu when your computer is booting. Typically, the boot screen displays which key you need to press. It maybe one of F12, F10. Note: with some motherboards you have to select 'hard disk/USB-HDD0' to choose the USB flash disk.

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 make the computer attempt to boot from the USB device before booting from the hard disk.


7 Alternative methods

7.1 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

7.2 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 USB flash drive has more than 2GB of space
  • Your USB flash drive is bootable
  • Your USB flash drive has a high read/write speed and is USB 2.0 enabled

The process is described in detail in an [source].

7.3 Create Bootable USB Manually

Here is a way to create a bootable USB flash drive manually. The advantage is you don't have to empty your USB flash drive as long as you have enough space for the files. It also allows multi boot, so you can, for example, have your USB flash drive holding both 32bit and 64bit versions of Ubuntu and other Boot CD tools at the same time.

In order to do so you need :

* Bootable USB 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 from the ISO ( ISO Mount, WinZIP, WinRAR, 7Zip, etc....)
* Grub4Dos 
  1. [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 onto 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. The size (and possibly manifest) are needed if you want to install from the USB flash drive otherwise the install will fail.

total 701060
-rwxr-xr-x 1 adrian adrian     38784 2010-07-27 16:15 filesystem.manifest
-rwxr-xr-x 1 adrian adrian        10 2010-07-27 16:15 filesystem.size
-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.

7.3.1 Simpler way using the ISO file

Another way is just using the ISO file as it is on an already bootable USB flash drive that uses Grub (to create one, see above).

  • copy the iso file onto the USB flash drive in the root (top) directory
  • add these lines to the menu.lst file:

{{{ title Ubuntu 11.04 i386 find --set-root /ubuntu-11.04-desktop-i386.iso map /ubuntu-11.04-desktop-i386.iso (0xff) map --hook root (0xff) kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/ubuntu-11.04-desktop-i386.iso splash quiet -- initrd /casper/initrd.lz }}}

Note: this might not work with all versions of grub. It was tested with GRUB4DOS 0.4.4 2008-11-11

8 Known Issues

Ubuntu 11.04 is having issues with USB flash drives from SanDisk that have U3 Launchpad. You can either use another brand or use either u3-tool from Ubuntu Repositories or SanDisk's [Launchpad Removal Tool] to remove U3.

Ubuntu 10.04.3 is having issues. You might get a segmentation fault if used from command line. There are many launchpad bugs regarding segmentation fault (eg: 572611).

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.

The error "Can not mount /dev/loop1 on /cow" is because usb-creator.exe is not creating a valid casper-rw file holding ext2/ext3 filesystem. Fix: 1) Use Unetbootin or 2) 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)


You need Mac OS X to create a USB flash drive that can boot on Macs. Even so, the process is less reliable than using a CD, as the USB flash drive is not always recognized on boot. Reversely, you can't create bootable USB flash drives for other platforms than Macs from withing Mac OS X. This is because Macs use a custom EFI bios with a custom boot-loader and need a special filesystem layout to boot correctly.

9 See also

  • USB Installation Media: custom, manual, older versions, and technical instructions and troubleshooting. There are also network installation options available.

9.1 templates to be


greenv

-->
{{{1}}} {{{1}}}
[create] Documentation
{{{1}}} {{{1}}}
[create] Documentation
{{{1}}} {{{1}}}
[create] Documentation
{{{1}}} {{{1}}}
[create] Documentation
{{{1}}} {{{1}}}
[create] Documentation
{{{1}}}
[create] Documentation
Personal tools
Namespaces

Variants
Actions
Google Search
Navigation
Wiki help
Toolbox