How to get, JAM, and install Haiku in Ubuntu 8.10 (Intrepid Ibex)

“How to Get and JAM and Install Haiku in Ubuntu 8.10 (Intrepid Ibex)”
Written by Luposian (Nov. 23, 2008)
Version 1.0

*Thanks go out to Ryan Leavengood and Fredrik Ekdahl (as well as to the various people who commented to both original posts) for helping make it possible to write up this “all in one place” manual. My own struggles to get where I finally got to, are now “simplified” for one and all, so that others needn’t go through what I had to, to get here.

The battle was mine. The reward is yours. Enjoy.


These instructions assume you have/use a computer that you have been using BeOS (first partition) and Haiku (second partition) on previously. Having two partitions on your drive is also a requirement (leave a previous install of Haiku or Senryu on the second partition (i.e. when you install Ubuntu 8.10, don’t mess with the second partition! Ubuntu won’t know what the second partition is (“unknown”), but that doesn’t matter.)). And, as I have thus only installed Haiku, via Ubuntu 8.10, on an UDMA133 ATA drive, it is assumed your system is similarly equipped.

Ready to begin? Great! Let’s go!

Bring up the Terminal (it’s in Application → Accessories).

Type: sudo apt-get install subversion autoconf automake texinfo flex bison gawk build-essential

Type in your System password and hit [Enter]. Ubuntu will download/install various files.

When you see the Terminal prompt again, type:

mkdir develop
cd develop
mkdir haiku
cd haiku
svn checkout svn://svn.berlios.de/haiku/buildtools/trunk buildtools

The last command will download the the Haiku build tools.

When the Terminal prompt reappears, type:

cd buildtools/jam
make
sudo ./jam0 install
cd …/…

Use the same password you used before, when it asks. Now, to get the Haiku source tree! At the Terminal prompt, type:

svn checkout http://svn.berlios.de/svnroot/repos/haiku/haiku/trunk trunk

On my system (AMD Athlon XP 2000+, 512Mbytes RAM, Intel 10/100 NIC, nVidia GeForce 2 GTS, 20Gb UDMA133 ATA drive), with a 10Mbit/sec. Cox Cable Internet connection (Ethernet), the entire Haiku source tree was downloaded in 25 minutes. Oddly enough, in BeOS, on this same system, it takes about 2 hours! So, whatever time it takes for you, in BeOS, expect it to take a lot LESS time (just under ¼ the time, in my case), in Ubuntu 8.10! Naturally, future downloads (updates) won’t take as long.

Now, to build the cross-compiler tools! At the Terminal prompt, type:

cd ~/develop/haiku/trunk
./configure --build-cross-tools …/buildtools/

My efforts to build the GCC4 tools failed, for some reason, so until whatever caused my attempts to fail are no longer an issue, just use the above command (which builds the GCC 2.95 tools), which worked fine for me.

When the Terminal prompt reappears, to build an image of Haiku, just type:

jam -q haiku-image

This took only 45 minutes on my system, in Ubuntu 8.10, but BeOS takes about 2 hours on this task as well. So, expect MUCH faster JAM times as well.

Ok, everything went smooth as silk and you’ve got a copy of haiku.image in /generated, right? Now what? Gotta get the image over to that second partition, right? Well, not quite so fast… let’s get GRUB all set up and happy, first, shall we?

At the Terminal prompt, type:

sudo gedit /boot/grub/menu.lst

Type the same password… again! Sudo gets you places you can’t get, otherwise, but it’s kinda a pain to have to keep typing in the system password each time. Oh, well…

You should now see the contents of the menu.lst file. You only want to change a few areas and not mess with the rest.

In the menu.lst file, you will see some lines that look like this:

title Windows…
root (hd0,5)
chainloader +1

Uncomment those three lines (remove the # symbol on each line) to “activate” them and then make sure they look like this:

title Haiku
rootnoverify (hd0,1)
chainloader +1

Now, go to the “timeout 5” line and change it to “timeout 10” (this gives you a little more time to decide which OS you want to boot into).

Comment out (add a # symbol in front of) “hiddenmenu”. This will then allow you to SEE the OS menu!

Go to “Pretty colours” and uncomment the line below it (if you want a color menu, otherwise ignore it)

Ok, now click on the Save menu option in gedit and the GRUB menu is now changed.

Close all the windows and reboot. When the GRUB menu pops up, just sit back and wait til it times out. The topmost OS in the menu will be loaded by default (the menu is displayed in alphabetical order), so Haiku/Senryu will be the OS that loads when it times out.

Did it come up? It should have. If your second partition is shown as ”/dev/sda2” in Partition Editor, then it should work, unless you don’t have Haiku/Senryu on that second partition. This “test bootup” allows you to see that the GRUB menu works as expected, and loads the previous OS from your second partition, before you actually JAM Haiku over to the second partition.

Now, for the final move… JAM’ing Haiku onto that partition.

Reboot and select the Ubuntu OS option just under Haiku. You’re now back in Ubuntu 8.10.

Go to “UserBuildConfig.sample” and open 'er up in gedit. You will see four lines:

Install Haiku on device /dev/sda57. Be sure you know what you’re doing!

HAIKU_IMAGE_DIR = /dev ;
HAIKU_IMAGE_NAME = sda2 ;
#HAIKU_DONT_CLEAR_IMAGE = 1 ;

Uncomment the two lines in the middle (as shown) and make sure they match the above example. Save it. Now, just rename the file to “UserBuildConfig” (drop “.sample” from the filename) and you’re ready to go!

In Terminal, get to Haiku’s /trunk directory and type:

jam -q

Hey, wait a second… it didn’t work! Why? I dunno, but it doesn’t. But you HAVE to do it the wrong way first, for some reason. No worries, though… it’ll work this next time (it did for me). Type:

sudo jam -q

Aw, man… sudo AGAIN? Type the password… one…more… time. :slight_smile:

And, BINGO! It works like a charm! Or at least it should… it did for me.

Reboot your computer and watch your latest revision of Haiku come up.

Enjoy!

Luposian

I followed your instructions up to the point of:
./configure --build-cross-tools …/buildtools/

Everything appeared to be working perfectly. However, the output of the previous command is:

make[3]: Entering directory `/home/cjaysson/haiku/trunk/generated/cross-tools-build/binutils/libiberty/testsuite' make[3]: Nothing to be done for `install'. make[3]: Leaving directory `/home/cjaysson/haiku/trunk/generated/cross-tools-build/binutils/libiberty/testsuite' make[2]: Leaving directory `/home/cjaysson/haiku/trunk/generated/cross-tools-build/binutils/libiberty' make[1]: Nothing to be done for `install-target'. make[1]: Leaving directory `/home/cjaysson/haiku/trunk/generated/cross-tools-build/binutils' Configuring for a x86_64-unknown-linux-gnu host. Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized Unrecognized host system name x86_64-unknown-linux-gnu.

I am using an Intel Core 2 Duo 3.16Ghz processor, which it seems might be important since there is an architecture in the error message. Unfortunately, I do not know make or gcc well enough to understand these errors. Just for s&g, I tried jam -q and sudo jam -q, but I receive the error:

No `BuildConfig’ found in generated/build!
Run ./configure in the source tree’s root directory first!

Which tells me that the configure didn’t work, and brought me to look back at those error messages.

Does anyone have any idea why this isn’t working? Is there perhaps something I need to do to let ./configure know my processor type?

Thanks in advance for any input.

Also, the above guide is not an official guide, and the use of “sudo jam” is not recommended…

First: You might not have all the sources properly downloaded

run “svn up” in the buildtools and haiku dirs again just to make sure.

Second: building Haiku on a 64bit linux host requires some extra tricks.

First, you need to add --use-32bit to your ./configure line - but that’s not going to solve the problem of gcc2 not compiling on a 64bit host. Fact is, gcc2 was not ported to 64bit linux, so it won’t compile. You’ll need to either use linux32, or compile only a gcc4 version of Haiku.

–use-32bit is required because many of the tools built on the host platform (such as fs_shell, etc) are not 64bit-clean yet. In order to use 32bit to compile them, you’ll need to install 32bit libs for gcc - on ubuntu/debian this is the “multi-lib” package I think.

Once you get the build tools compiled successfully, then you can worry about jamming :wink:

The easy way is to use a 32bit linux host platform.

Thanks for that quick response. ./configure --build-cross-tools --use-32bit is throwing errors as well. How would I “compile only a gcc4 version of Haiku”?

I suppose if absolutely necessary I could throw together a USB stick with Ubuntu 32bit and do it that way, but I’d prefer to avoid that. The downloads of the .isos take forever.

Assuming your environment, probably this:

./configure --use-32bit --build-cross-tools-gcc4 x86 ../buildtools
</pre

Anyone know why, when I “jam -q” the latest version of Haiku, I keep getting an offset of 0? It won’t boot off the partition with that offset. This seems to happen somewhat sporadically, but happens more often than not, lately. In times past, it would correctly install the proper offset and I was able to boot into Haiku without issue.

Also concerning not using “sudo jam -q”, I have found that if I type “jam -q”, it comes back with an error (failed…) at the end and will not install haiku to the partition… even if it comes up with the right offset! But I type "sudo jam -q"and it goes through just fine, but often gives an offset of 0 (which is, of course, unbootable)!

This also frequently happens when I do a “jam haiku-image”, too.

What is screwing up and why?

Hi, I’ve followed your instructions. Everything worked nice and smooth.
But now, Haiku doesn’t boot, just stay frozen up to the third icon on the startup logo.
My guesses for the problem are: lack of ram, wrong file system type.
Do you have any suggestions?
Thanks!
F.

[quote=zerofrancisco]Hi, I’ve followed your instructions. Everything worked nice and smooth.
But now, Haiku doesn’t boot, just stay frozen up to the third icon on the startup logo.
My guesses for the problem are: lack of ram, wrong file system type.
Do you have any suggestions?
Thanks!
F.[/quote]

As long as you get the Haiku Startup Screen, at least you know that the build (JAM) went ok. As for why it’s stuck on the 3rd Icon, I can’t say. My Intel Core2Quad system (Intel DG33BU motherboard) with 2Gbytes of RAM and SATA hard drive gets stuck on the “chip” icon (5th?).

I know, from personal experience, Haiku will boot/run in 128Mb of RAM. It will run on a Pentium II 266 on a 440BX chipset and a Celeron 700 (a crippled Pentium III 700) on a Via chipset.

Hi, I have a similar problem. The boot process is successful, but after it nothing happens, only shows dark screen.

Asus X80L, Celeron, 1Gb Ram