Installing Haiku via linux and grub?

Dear all,

I have a quick question regarding installing of Haiku. Basically, I fail to get R5 PE or Max running on my machine, and thus have no way to build Haiku on my own.

Is it possible to somehow write Haiku disk images to the drive in linux, and load it up using grub or similar? (is it multiboot compatible actually?)

As Haiku progresses its development at the speed of light these days, I’m beginning to get interested in running it without VMWare. Still uncericant if it will actually boot my machine, it would be interesting to have the option of a linux install script that writes an image to a partition, and shows the proper grub settings to enter.

Would this be a very hard thing to do?

Best,
. Knutsi :slight_smile:

actually, can I resurrect this thread and ask for some Linux dudes to help with this?

I’ve got a nice 30GB partition on my main machine, which I’d really like to use for Haiku - testing and eventual use. The machine also has two other partitions used by WinXP and Ubuntu respectively.

Would it be possible to format the currently unpartitioned part to OBFS, and then copy the contents of a nightly image to it from either XP or Linux, kind of like how we do from R5 now? Due to my main machine having a GB of RAM, I’m loathe to go through the agony of making R5 work on it, otherwise I’d just do the above method.

Finally, there’s the issue of making Haiku boot from GRUB, and or making all three boot from Bootman. I prefer Bootman over GRUB, but as I only see it for a few seconds, I’m kind of indifferent as to what is used. I’m not an expert with bootmanagers at all, so some wise words from folk who do would be appreciated.

thanks in advance

expensivelesbian wrote:
Would it be possible to format the currently unpartitioned part to OBFS, and then copy the contents of a nightly image to it from either XP or Linux

You probably need the BeFS driver for Linux, mkbfs and makebootable from Haiku, and some coding skills to make them work. There are people building Haiku on Linux, but I don’t know how much else you can do from Linux. You could ask on the primary mailinglist: openbeos at freelists.org

XP is not very likely.

Try making a Haiku CD instead. It should be possible now. Haven’t tried it myself though. I’m not sure whether Haiku’s DriveSetup is complete yet, so you might have to use the shell to run mkbfs and makebootable and copy the files over to a real harddisk partition. Either in Tracker or using “copyattr --data --recursive”.

expensivelesbian wrote:
Finally, there's the issue of making Haiku boot from GRUB, and or making all three boot from Bootman. I prefer Bootman over GRUB, but as I only see it for a few seconds, I'm kind of indifferent as to what is used. I'm not an expert with bootmanagers at all, so some wise words from folk who do would be appreciated.

There are a couple of ways to do it. The PC disk partitioning scheme is very simple. Disks starts with a master boot record (MBR) followed by the partition table, with four slots, and the rest of the disk is available to these four partitions. (Which can be subdivided further, "extended", to have more partitions. A common thing in dual-boot installations that include Windows and Linux, as Linux usually needs, or needed, at least two partitions. The second one for virtual memory swap space.)

Each partition too starts with a boot record. The boot records of the disk and of the partitions are tiny. There’s not a whole lot of space for an elaborate boot manager in them, which is why many boot managers use a partition, or share it with some operating system. Grub often shares a partition with Linux, using a folder to store it’s menu settings and modules for filesystems that don’t fit inside Grub itself.

Either of Grub and Bootman can live in the MBR at the start of the disk. Grub can also live in a partition’s boot record. The one place where Grub can’t live, is at the beginning of your BFS partition. Grub doesn’t know BFS, AFAIK. It doesn’t know how to find “zbeos”, and it can’t store its extras on a BFS partition. Neither of Grub and Bootman can boot BeOS/Haiku directly. They rely on the existance of BeOS-native bootcode embedded in the boot record of the BFS partition. It’s put there by the utility called ‘makebootable’. (I suspect DriveSetup adds this bootcode to partitions it formats, but I’m not sure. In the shell you have to do it manually.)

So, you can have either Grub in the MBR, and in Grub terminology “chainload” the BFS partition, or you have Bootman in the MBR and Grub in some partition’s boot record. (Your Linux partition, most likely.) I think it’ll work fine either way.

You might want to check out the documentation on how to install Syllable. It covers chainloading BeOS. Haiku should be no different. Note however that Grub and Linux numbers the devices differently from BeOS, IIRC.
http://syllable.org/docs/0.6.0/install.txt

BTW, anyone, feel free to correct me if there’s anything I got wrong here.

jonas.kirilla wrote:
expensivelesbian wrote:
Would it be possible to format the currently unpartitioned part to OBFS, and then copy the contents of a nightly image to it from either XP or Linux

You probably need the BeFS driver for Linux, mkbfs and makebootable from Haiku, and some coding skills to make them work. There are people building Haiku on Linux, but I don’t know how much else you can do from Linux. You could ask on the primary mailinglist: openbeos at freelists.org

Somewhere I saw a note where someone had used dd on Linux to copy the raw image directly to a live partition without needing any BFS tools… maybe that was in the wiki?

In either case, XP is out too - unless you can do something similar with a tool that you find.

So, long story short, you will have a hard time formatting a partition, and copying the files to it in linux.

OK, thanks for the replies.

I tried to stick my R5 disk into the main machine, but the 1GB limit is going to be an issue obviously. I’ll have to look into those floppy images for RAM limiting. It’s not a major hassle, as I do have another machine with R5 and Haiku on it, just for testing etc. I’d like to have all three OSes on one machine but…well, I can wait.

I’ve posted elsewhere about this, but I really hope that part of the Haiku R1 experience is to make things like this, and MBRs and partitions etc, something that most folk don’t even have to worry about. I don’t consider myself a techie, but I’m not this mythical “joe sixpack” either, however fiddling with partitions and master boot records gets me nervous every time.

Thanks again however

expensivelesbian wrote:
I've posted elsewhere about this, but I really hope that part of the Haiku R1 experience is to make things like this, and MBRs and partitions etc, something that most folk don't even have to worry about.

It’s actually Grub and Linux that complicate things, slightly. BeOS only ever needs one partition and Bootman is very simple (and selfcontained) in comparison to Grub. BeOS isn’t hard to install, and neither will Haiku be.

Of course, if your harddisk already has got Windows and Linux and maybe more systems installed, it’s really up to you to understand the ramifications of squeezing another OS into the mix. (Or suffer the consequences if things blow up and you never did any backups.)

I’ve got anything worth keeping on a separate hard drive, with OS and programs installed on the main drive. it wouldn’t be fun to reinstall either OS, but not the end of the World either. Short of falling off a log, I don’t think much things are simpler than a BeOS install.

I can perfectly understand MS being awkward about multi booting, and I can perfectly understand *nix making it needlessly complex. I just hope Haiku recognise that it doesn’t need to be either, and with the advent of Apple’s Bootcamp, I hope the Haiku devs make dual and or triple booting as simple as installing the OS in the first place. I’m not particularly techie but I’ve got two and hopefully three OSes on my machine, for various reasons. I’d like only one, but none are quite what I want (yet!) :wink:

Can’t wait for Haiku to wipe both OSes off my main drive, to be honest…
Anyway, thanks for the help.

expensivelesbian wrote:
Short of falling off a log, I don't think much things are simpler than a BeOS install.

Falling off a log… :slight_smile:

expensivelesbian wrote:
Can't wait for Haiku to wipe both OSes off my main drive, to be honest...

I’ve been using BeOS as my primary OS since R3. I’m hoping for more applications so we can have a good little ecosystem again. Haiku is a good start, but we need so much more.

expensivelesbian wrote:
Anyway, thanks for the help.

Any time. :slight_smile:

Somewhere I saw a note where someone had used dd on Linux to copy the raw image directly to a live partition without needing any BFS tools… maybe that was in the wiki?

Just wanted to say that this works fine. ‘dd if=haiku.image of=<your_haiku_partition>’

This reminds me - there’s actually a “dd for windows” out there - I wonder if that can be used to install Haiku to a spare partition from a windows machine or not.

I’ll have to give that a try sometime.

Things are easy if you write the haiku image at the start of the disc but if you want to write it somewhere else you need to adjust the boot sector code of the image accordingly (it contains the partition offset).

“makebootable” should be able to do this, but for some reason it failed for me in GNU/Linux so I ended up figuring out the offset myself and changing the relevant part of the boot sector. Maybe I’ll take a look at the makebootable code and try to figure out why it’s failing later…

Can you post your changes to the boot sector? This may be why my Haiku partition on hdb1 doesn’t boot.
I had installed this with dd and it booted fine. When I installed a new image it failed to boot and when I reverted to the old one it also failed. I haven’t had any success in recovering it.

Well the needed changes depend on the partition offset and I’ve forgotten the details but I can check when I have the opportunity.

You can see the exact location in the boot sector from the makebootable source code as well though.

You might want to have a look at this thread: