Using dd for Windows to install Haiku

This advice is for woz who is trying to use dd in Windows to create a USB install disk for Haiku.

(this post has turned into a novel, so I’ve split it into two parts)

Woz, you have done most of the hard stuff already, IMO. You have downloaded and extracted
the Haiku anyboot image. You have found the “dd for Windows” utility and downloaded it. And
you have already created a partition to install Haiku on – easily the hardest part of all.

From here, you will need to:
1. run dd to create the USB install disk
2. reboot from this USB disk
3. run the Haiku installer
4. run BootManager
5. reboot and enjoy

Firstly, the error you are getting about “dd is not recognized…” is because you don’t have dd.exe
located in a path that the command shell knows about. This means you either have to enter the full path
of the dd program at the command line, or better yet, just change to this directory first.

For simplicity, we’ll assume that dd.exe is at the root of the C drive
In fact, you can just copy it there, then the remainder of the commands shown below will work perfect.

From the Windows taskbar, enter “cmd” (no quotes, of course) to bring up the command shell.
No, you don’t have to run this as administrator – regular user is fine.
By default, the command shell will be in the Users<username> directory, so

	cd C:\

to change to the root of the C drive, where we have put dd.exe.

Incidentally, for those reading who don’t have “dd for Windows”, go here:

http://www.chrysocome.net/dd

You can download dd from there, and it also has some nice instructions covering its use.

Now run

	dd --list

and it will show all the drives.

First do this without the USB stick in, then again after inserting the USB stick.
The new entry that shows up the second time will obviously be the drive info for the USB stick.

As an example, mine reads:

	\\.\Volume<01a7cdb7-2ce8-11e0-868f-0013721d25ab>\
	link to \\?\Device\HarddiskVolume6
	removeable media
	Mounted on \\.\g:

The fact that it shows “removeable media” is a good hint that we’ve got the right drive.
Furthermore, it shows that it is mounted as “g:”, which is easy to verify as my USB stick shows
as G: in Explorer when I browse the files. Of course, your info will be different.

So, using this example, we would use “\?\Device\HarddiskVolume6” as the drive path
for the USB stick. Thus we can construct a sample command line for dd

dd if=haiku-hrev43898-anyboot.image of=\\?\Device\Harddisk6\Partition0 bs=1M --size --progress

Naturally, use the correct revision number if its not hrev43898.
Notice that we append “\Partition0” to the USB drive path. This is essential.
You have to write to partition 0 on the drive you are writing to.

After you have run this dd command, and it is finished, you can power off the computer.
Leave the USB stick in.
Now power back on.

See next post for more.

Ok, assume we finished the steps in the post above…

If you’re lucky, the computer will automatically boot off the USB stick. If not, you’ll have
to jump into the BIOS at startup (usually F2 or F12 – it will show which key on the screen)
and run through the BIOS menu to select a startup drive. It really just depends. I have two
desktop computers – one will boot off a USB stick automatically, and the other one I have to
go into the BIOS and tell it boot from the USB drive each time.

You should boot into Haiku now. If it starts up fine and you get to the Haiku desktop, then
all is fine. If not, then you may have unsupported hardware. And that is a whole other topic.
If that’s the case, sorry, you’ve got a lot of work and research to do, to figure out if
you can get Haiku running on your machine or not. I can’t cover that huge issue here.

Assuming that you can do get to the Haiku desktop, you are running a Live version.
Kind of like a Live CD, only this is a Live USB. It’s not restricted in any way and you can
use the system normally as if it were installed to a hard drive. Except that it will be a
tiny bit slower, and you will have won’t have a lot of space on the boot drive to work with.

Now run the Haiku installer. From the ‘Applications’ menu of the Deskbar (you know – click on
the little blue leaf). Select the 6 gig partition that you created for Haiku and then go.
The instructions shown by the Installer are pretty self-explanatory.
This should take only a few minutes to install to the partition.

Once the install has finished, exit the Installer. Now, even though you have installed Haiku
onto the partition, you have no boot manager in order to select it at boot time. So we’ll use
Haiku’s own boot manager.

Yes, you could use GRUB. Most folks who multi-boot into Linux or BSD systems use it. But it’s
a little bit tricky to set up. If you’re going to only multi-boot between Windows and Haiku,
then I would use Haiku’s BootManager instead. It’s extremely easy to install and use. And it works
perfectly.

From the ‘Applications’ menu of the Deskbar, choose ‘Terminal’ to bring up a Terminal window.
In the Terminal window, run

	BootManager

This will bring up the BootManager (duh). Just answer the questions on each screen.
Select the drive you want to boot, and it will show the two partitions that you have.
You give a readable name for each partition – e.g. “Windows” and “Haiku” – which is what will
display at boot time. And decide which partition is the default one to boot from, etc.
So install it and go.

Once the BootManager is installed, you can power off.
Remove the USB stick.
Power back on.

It should load the BootManager which will display the two choices you have.
Select “Haiku” (or whatever you called it) and you’re on your way.

Congrats!

While ‘DD’ is the program to in Haiku, I recommend you google for ‘Win32DiskImager’ for a Windows program to use to read or write flash drives.