haiku/docs/userguide/en/installation/install-usb.html
Joachim Seemer d616e43574 * Typo in keyboard-shortcuts.html
* Changes on all pages and CSS for
  - min/max width
  - topic title to the left under the logo
  - a new logo (thanks Jorge)
  - refurbished navi bar
  - some more printing tweaks

There are a few CSS issues where I can use some help. I'll post about it on the
documentation mailing list.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-24 12:41:43 +00:00

187 lines
10 KiB
HTML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"../html-dtd/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<!--
*
* Copyright 2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Socapex_2K <philippe_groarke@yahoo.ca>
*
-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="robots" content="all" />
<title>Installing on a USB flash drive</title>
<link rel="stylesheet" type="text/css" href="../../../Haiku-doc.css" />
</head>
<body>
<div class="logo">
<img src="../images/logo.png" alt="logo" class="noprint" id="logo" name="logo" />
</div>
<div class="topnav">
<p>
<a href="../contents.html" class="uplink">Contents</a>
</p>
</div>
<div class="content">
<div class="title">Installing on a USB flash drive</div>
<!-- This whole topic should be combined with install-raw.html -->
<!--
TODO
- Test out dd to usb stick on mac. Confirm it writes on byte 0 of the drive.
- Does BeOS, Freebsd and others (which?) use fdisk -l (For USB KEY install).
- Reformat my steps to remove the 15pt margin between terminal style text
-->
<h1><a id="usb" name="usb">Installing on a USB flash drive</a></h1>
<ul>
<li><a href="#unix">From a Unix system</a></li>
<li><a href="#windows">From Windows</a></li>
</ul><br />
<p>Booting Haiku from a USB memory stick is currently one of the best ways to test out the operating system. No changes will be made to your computer, so you can test a pre-Alpha OS without any worries. It is also the easiest method to install Haiku, so it is recommended for beginners. The installation process differs from a Unix system (This includes many operating systems like Linux, Mac OS X, FreeBSD and such) to that of Windows.</p>
<p> You will need a small USB memory stick (512MB should be more than enough) that you are ready to erase and a recent <a href="http://haiku-files.org/raw/index.php">HDD raw image</a>. Note that these are test images, they are not complete distributions that include a lot of software. Future releases will include a more complete set of software, obviously. Your motherboard should also support booting from USB Drives (most recent computers do).</p>
<h2><a id="unix" name="unix">Using a Unix system (Linux, Mac OS X, FreeBSD etc.)</a></h2>
<p>Now that you've downloaded the raw image, you will need to expand this image on your USB Drive you intend to install it to. You will first need to know the name of your drive (something like <span class="path">/dev/sdb</span>, <span class="path">/dev/disk1</span> or a variant).</p>
<p>First connect your flash drive.</p>
<p>Under Linux, open your shell and type:</p>
<pre class="terminal">fdisk -l</pre>
<p>On Mac OS X, open the terminal (<span class="menu">Utilities > Terminal</span>) and type:</p>
<pre class="terminal">df -hl</pre>
<p>The output should resemble something like,</p>
<pre>Disk /dev/sda: 4034 MB, 4034838528 bytes
255 heads, 63 sectors/track, 490 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000740f4
Device Boot Start End Blocks Id System
/dev/sda1 * 1 462 3710983+ 83 Linux
/dev/sda2 463 490 224910 5 Extended
/dev/sda5 463 490 224878+ 82 Linux swap / Solaris
<b>Disk /dev/sdb: 16.1 GB, 16139354112 bytes</b>
255 heads, 63 sectors/track, 1962 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf26d47c4</pre>
or
<pre>Filesystem Size Used Avail Capacity Mounted on
/dev/disk0s2 186Gi 112Gi 74Gi 61% /
<b>/dev/disk1s1 1.9Gi 265Mi 1.6Gi 14% /Volumes/KINGSTON</b></pre>
<p>Now you need to use the <span class="cli">dd</span> tool to extract the raw image to your USB Key. Make sure you have the right drive selected here, since this will erase all data on the specified location. Recheck with a partition tool to verify for example. You might need administrative rights, so add the <span class="cli">sudo</span> or <span class="cli">su</span> command before the next step to run the process as administrator (a password will be required).</p>
<p><b>Note:</b> <i>You will want to put the image at the absolute start of the drive, make sure that you write to the whole raw drive and not to a partition. You do that by specifying a raw device instead of a partition. Under Linux you would for example omit the partition number resulting in</i> <span class="cli">sdb</span> <i>instead of</i> <span class="cli">sdb1</span><i>. Under BeOS you would pick the</i> <span class="cli">.../raw</span> <i>path instead of one with a number. If you use such a command, you overwrite the MBR containing the partition table of your USB memory stick. This means, that all the partitions on that drive will become inaccessible (not only the first part of the drive). So be sure that you want to do such a destructive operation!</i></p>
<p>Still in the terminal, enter:</p>
<pre class="terminal">dd if=/path/to/image of=/dev/sdb</pre>
<p>Where <span class="path">/dev/sdb</span> stands for your USB memory stick's name found earlier.</p>
<p>Congratualtions! You have just installed Haiku to a USB memory stick. You can now restart your computer to boot from Haiku. Note that you will probably have to enable USB drive booting in your BIOS and change the hard drive boot priority order. If Haiku's splash screen stops in the middle of the icons, and then sends you to <i>Kernel Debug Land</i>, you might have to disable the <i>Plug and Play OS</i> option in your BIOS.</p>
<h2><a id="windows" name="windows">Using Windows</a></h2>
<p>You will need basic knowledge of your command prompt to go through this step-by-step guide. You can type <span class="cli">help</span> inside your command prompt to get some information on the required navigation commands.</p>
<p>You have to download and install the latest <a href="http://shounen.ru/soft/flashnul">Flashnul</a> utility.</p>
<p><b>Note:</b><i>The <span class="app">Flashnul</span> website isn't in English. You can simply click on the "Download" link and then select the upper-most entry (the latest version) to download.</i></p>
<p>Extract your raw image zip file and the <span class="app">Flashnul</span> program in the same directory (ex. <span class="path">c:\haiku</span>). Rename the raw image's extension to <span class="cli">.img</span> (ex. <span class="cli">haiku.img</span>).</p>
<p>Open your command prompt (go to <span class="menu">Start > Run</span>, then type <span class="cli">cmd</span> and press <span class="key">ENTER</span>). You will see a black window with a blinking cursor, this is your command line editor (commonly named command prompt or shell).</p>
<p><b>Note:</b><i>If you are using Windows Vista, you will need administrator rights to see the available physical drives. To run the command prompt in administrator mode, go to </i>Start > All Programs > Accessories > Command prompt<i>, right click on the program and select </i>Run as Administrator.</p>
<p>Navigate to the directory containing your raw image and the <span class="app">Flashnul</span> utility. For example,</p>
<pre class="terminal">cd \haiku</pre>
<p>if the directory is <span class="path">c:\haiku</span></p>
<p>You need to find the number of your USB flash drive. This is very important, because if you do not select the right drive, your whole hard drive <b><i>will be erased</i></b>. To find out your flashdrive's name, in the command prompt, type:</p>
<pre class="terminal">flashnul -p</pre>
<p>The output should resemble something like,</p>
<pre>Available physical drives:
0 size = 81961123328 (76 Gb)
<b>1 size = 1000341504 (954 Mb)</b></pre>
<p>You are now ready to extract the raw image over the memory stick. Make sure the number you have noted <i>is the one of your flash drive</i>. X being your memory stick's number, type:</p>
<pre class="terminal">flashnul X -L haiku.img</pre>
<p>And your shell should output:</p>
<pre>Disk PhysicalDrive1 (UNC name: \\.\PhysicalDrive1)
------------------------------------------------------------[Drive geometry]--
Cylinders/heads/sectors = 121/255/63
Bytes per sector = 512
CHS size = 995258880 (949 Mb)
---------------------------------------------------------------[Device size]--
Device size = 1000341504 (954 Mb)
delta to near power of 2 = 73400320 (70 Mb), 7%
Surplus size = 5082624 (4963 kb)
-----------------------------------------------[Adapter &amp; Device properties]--
Bus type = (7) USB
Removable device = Yes
Command Queue = Unsupported
Device vendor = Kingston
Device name = DataTraveler 2.0
Revision = PMAP
--------------------------------------------------------------[Hotplug info]--
Device hotplug = Yes
Media hotplug = No
Selected operation: load file content
Selected drive: PhysicalDrive1, 1000341504b (954 Mb)
THIS OPERATION IS DESTRUCTIVE!!!
Type 'yes' to confirm operation. All other text will stop it.
Really destroy data on drive PhysicalDrive1? :<b>yes</b>
-----------------------------------------------------------------------[Log]--
Running operation [load file content] for drive PhysicalDrive1
Writing 0xf9f0000 (250 Mb), 899733 b/s
image load finished
----------------------------------------------------------[Operation result]--
passes: 1
errors: 0
write bytes: 262144000 (250 Mb)
avg. write speed: 899731 (878 kb/s)
max/min write speed: 0 (0 b/s) / 0 (0 b/s)
Press ENTER to exit.</pre><br />
<p>Congratualtions! You have just installed Haiku to a USB memory stick. You can now restart your computer to boot from Haiku. Note that you will probably have to enable USB drive booting in your BIOS and change the hard drive boot priority order. If Haiku's splash screen stops in the middle of the icons, and then sends you to <i>Kernel Debug Land</i>, you might have to disable the option <i>Plug and Play OS</i> in your BIOS.</p>
<br />
</div>
<div class="bottomnav">
<p>
<a href="../contents.html" class="uplink">Contents</a>
</p>
</div>
</body>
</html>