boot haiku natively

Forum thread started by rvndrk32 on Mon, 2008-06-16 02:13

is there a way to get the bootsect copied correctly? I've dd'ed the image onto my spare hd in a small partition I acidentally made.The partition is active and all and 'Q' seems to run the image okay, but I get 'missing operating system' when trying to boot.Any ideas?

Comments

Re: boot haiku natively

From Linux, there are two steps involved.

1) You 'dd' haiku image to a partition
2) You run 'makebootable' on that partition

Search for 'makebootable' in these forum posts for further details:
http://www.haiku-os.org/documents/dev/installing_haiku_to_a_partition_fr...
http://www.haiku-os.org/community/forum/tired_of_running_haiku_under_vms

Re: boot haiku natively

no luck with grub or lilo, both seem to recognize the intel 945 SATA array, even with no drives attached.cant turn this off in bios, as GCNL board has no option.will try the bios update next.

will give makebootable a try if I can find the thread which had it in there again.

Re: boot haiku natively

no luck with making bootable (minus Ubuntu build of makebootable).

OK. first had wrong partition map of GUID, not MBR.

Next set it active.
NEXT, pulled qemu-img from 'Q' app (so binary compatible) and converted disk image to raw.

after dd'ing again I get the following:

Now I'm getting 'OS failed to load...press any key', which is exactly what in the hard drive's first sector if you examine it with the disk inpector from within haiku.

does anyone have a bootable disk image to use? seems someone else dd'ed the image and got it bootable somehow.maybe a boot floppy from R5?

Re: boot haiku natively

I'm fairly sure that anyone who dd'ed the Haiku image to the whole hard drive ( not just a partition ) is not required to run makebootable. ( ie: /dev/hda )

But if you dd the image to a partition then you must build *Haiku's* makebootable ( on Linux ) and run it from what I've read. ( ie: /dev/hda3 ) Search the forums and general mailing list for dd & makebootable and you should find info about this issue.

You have to build Haiku's makebootable yourself from Haiku's sources. Or another way is to install and use BeOS in Qemu, mount the Haiku drive partition and run BeOS' makebootable; Or Haiku through Qemu may work too if it has makebootable command.

I boot Haiku with GRUB ( menu.lst / grub.conf ):
title HAIKU
rootnoverify (hd1,2)
chainloader +1

EDITED: added additional info

Re: boot haiku natively

Yep, dd to the entire disk *should* work (although, I've seen it fail on a couple occasions as well).

The raw images are basically just full disk image with no partition map on them - so the offset in the boot block to the physical location where the partition starts is known and always correct when used this way, and the boot block of the partition lands in the MBR.

If you dd the raw image to a single partition anywhere on a disk, you'll need to change this offset and also add your own chainloading bootloader into the MBR (the GRUB info tonestone57 provided is basically what I use here as well).

Generally, the easiest way I've found to install Haiku to a partition is to simply setup a build environment on Linux (32bit preferably) and just build your images directly to the partition.

Instructions to do that are available:

I recommend the following articles - once you've completed and succeeded with the first one, then you can move onto the second one. Both should have a healthy number of related comments you can peruse as well:

http://www.haiku-os.org/documents/dev/building_haiku_on_ubuntu_linux_ste...

http://www.haiku-os.org/documents/dev/installing_haiku_to_a_partition_fr...

Re: boot haiku natively

HMMM.some progress.

I pulled qemu apart and dropped it into home folder so I can run it like you do on ubuntu/*NIX.Needed the sourses for qemu, so dumped the bios files from there.

Interesting thing happened.....

./qemu-mac /dev/disk4s1
2008-06-21 15:55:03.845 qemu-mac[214:10b] KO

---> Note the screen text before the CPU crashes and leaves qemu without a keyboard or mouse grab after booting.

IT reads:

"Welcome to the Haiku boot loader"
"copywright HAIKU,INC."
"select boot volume (current:none)" <-- highlighted

There are five menu options, but I can't select anything.Still getting "OS failed to boot" in dos.
Yet booting the image (.vmdk) completely loads the OS under qemu.
(edited)

I GOT IT!! Finally!!!

use -hda -hdb option on qemu.HDB is your native Hard drive.I had to go into the Q.APP manually to get qemu to accept keyboard/mouse input since 'q control' app wont allow you to boot native hard drives. You can run 'makebootable' from QEMU within Haiku.I've done this on a spare QEMU volume and booted from it successfully.

Re: boot haiku natively

Ok richard - good one. I thought you could do it in Qemu but wasn't sure how. Now I know but I'll give a little better explanation because yours has little details ( hard to follow ).

This is an easy way to run makebootable inside Qemu on Linux with Haiku image.

Download haiku.image.bz2, unzip it.
Run: qemu -hda haiku.image.r26269 -hdb /dev/hda

haiku.image.r26269 should refer to the actual Haiku version you're using
/dev/hda should be the drive with the Haiku partition

Qemu will run haiku.image.r26269. You'll be able to mount your physical Haiku partition inside of Qemu.

Use Haiku's menu & mount physical Haiku partition in Qemu.

In terminal, run makebootable on your physical Haiku partition.

makebootable -full /haiku

/haiku should refer to your mounted physical Haiku partition ( yours may be named differently )

Now you should be able to boot the Haiku partition with Grub ( or NT loader ) and run the OS natively.

Re: boot haiku natively

-full /haiku?

haven't tried that.used /dev/disk/0/master/ given by the installer and disk utilities.didn't work.

I needed to use senryu to format and install the disk for some reason.Its derived from haiku.
are all those apps from R5?
wow.

try dd'ing the image to a whole disk --
dd if=haiku.img of=/dev/disk3

I hear it works.

/dev/disk3sX wont work.tried and failed.

now i have to dump a 60gb hard drive again....

Re: boot haiku natively

I use "makebootable -full" in BeOS but I believe -full switch is ignored in Haiku.

In terminal, "cd /", then "ls"
mount your physical haiku partition with the menu

in terminal, type "ls" again in /; you'll see a new directory that wasn't there before - your mounted partition.

BeOS & Haiku mount disk partitions in /

So when I run Qemu & mount Haiku & BeOS partitions I have /Haiku (haiku image), /haiku (disk partition 3), /BeOS (disk partition 1).

To make partition 3 bootable, I'd type:
makebootable /haiku
For partition 1, I'd type:
makebootable /BeOS

Yes, those applications in Senryu were made for BeOS. Senryu lets you see many of the programs available for Haiku without having to download them off of Bebits or look around at other sites to find them.

Re: boot haiku natively

i get non bootable disk (partition1)
and
faild to load(some garbage) beos.sys (more garbage) (partition2)

neither are set active, keep having to reset the active bit everytime I use anything on the drive.
will try the -full option.

and most of those apps on senryu aren't on bebits anymore.the links dont work.

Re: boot haiku natively

i did that. (makebootable -full /)

i get the haiku boot menu saying no bootable drive(under qemu)
when I write to the partition that reads as 'BEOS', i get drive timeouts.

Re: boot haiku natively

/BeOS (disk partition 1)

--->you have BEOS on your drive? maybe thats what boots.

Re: boot haiku natively

Richard, syntax is: makebootable /"haiku_partition_you_mounted"

You said, that you ran " makebootable -full / "
That won't work - different from what I said. You must mount the drive partition where you dd'ed the image to; the partition will mount in / but will have a *name*; my Haiku mounts as /haiku but yours might have another name.

1) dd haiku image to a partition.
2) In Linux, do what I said above with Qemu
3) mount the haiku partition ( you dd'ed to )
4) run makebootable /"mounted_partition_name"

You'll see the mounted_partition_name in / if you do a "ls" before and after mounting the partition. You'll have a new folder added for the mounted partition.

Yes, I have BeOS & Haiku on drive partitions. It isn't booting BeOS or Haiku from drive because I have Grub installed so I'd know & newer Haiku is booting up which I only have as image file. So, I'm certain haiku image file is booting. I haven't tested out Haiku's makebootable to see if that works ( it should ).

The method I described above allows you to boot from haiku image file. hda = haiku image ( boot drive ), hdb = physical disk drive. This will let you mount your physical haiku partition and run makebootable.

Re: boot haiku natively

only issue with that is that image file and pys disk have same volume names.tried that a little while ago.it refused to mount.dd'ed the RAW image.will take another look.it didn't make it bootable last time.

no,
i used makebootable -full /dev/disk/0/ata/slave/raw
and it said okay.

change raw to 0 and it gave me ...device timeout.

let me post the images online,makes HUGE difference.
Update:

Hmmmm.
working now.maybe a issue with drive enclosure on usb.FW seems work ok.

used makebootable -full /haiku1.(after partition within haiku.it formats.)

any way to copy the FS now that its formatted and partitioned?

senryu has the feature,but I want HAiku here.will try to dd the image again.

Update:

the dd dump wont work, so i zapped the drive.Haiku seems to like it so far and crashed qemu once made bootable.tried this on master hardware and booted. NADA.

I'm in blinking one-lined cursor land, and bios dont like something because it faught with me to bring both drives online.took me half an hour to get it to find my main drive again.(for no reason) almost about to shit can this board and go nvidia again.

Re: boot haiku natively

makebootable -full /dev/disk/0/ata/slave/raw
is not right because you're not selecting a specific partition - I'll explain in a bit. I have 7 partitions on /dev/hda.

So, I decided to try it out myself and see what happens. What I did:
1) dd if=haiku.image.r26269 of=/dev/hda2
2) qemu /dev/hda; tried to boot /hda2 with Grub & got message Failed to load OS ( good b/c I wanted to be sure it wouldn't boot )
3) qemu -hda haiku.image.r26269 -hdb /dev/hda
4) Mounted haiku partition from menu - it mounted as /Haiku1
5) makebootable /Haiku1 ; resulted in:
Error: Failed to open my executable file ("makebootable": No such file or directory
6) cd /dev/disk/ata/0/slave
7) ls ; see there are 7 partitions
8) makebootable /dev/disk/ata/0/slave/1 ; gives same error as in 5 - also tried with a different partition ...../2 but again with the error.
9) Mount my BeOS partition. cd to beos/bin & try with BeOS makebootable ( /Haiku1 ) - I get error:
Cannot find the BIOS drive id for:
/dev/disk/ata/0/slave/1

makebootable: error writing boot block information to /dev/disk/ata/0/slave/1 ; I also tried with ..../2 but had same error

Conclusion: makebootable is not able to work in Qemu

Sorry about that. I thought it would work but after testing this method out myself it looks like it doesn't. So it seems that makebootable will only work from BeOS LiveCD or partition ( or Zeta LiveCD may work too depending if they left mount & makebootable intact ).

Re: boot haiku natively

im pretty sure you would have to map your drives the same in qemu as your phicsical configuration for it to work properly otherwise how wouldn't it write the wrong boot code?

i might try it out myself since i have an extra HD now...

Re: boot haiku natively

posted images are on www.rjasmin.net/haiku/image[1-7].tiff.
1-5 are the first try at dd'ing the image to the drive and attempting to boot.

actual hardware reveals (OS failed to boot from partition 2 and insert bootable media from partition 1) when swapped for main drive.boot from USB bracket fails and boots same as below.

USB dd with windows files also fails to boot.i keep getting thrown back to open darwin boot loader on main volume.[used for Leopard]

images 6-7 are done from a zapped hard drive in haiku. From here QEMU hangs and real PC stops at blinky cursor.seems to do this on raid volumes as well, can't figure out why.(my array is on the SATA bus,boots only if IDE fails)i disconnected raid to see how far it would boot, but still gives me a blinky cursor.

even tried booting BE from a boot floppy it hangs at stage4,assuming because of NTFS file system on main drive.this was from the BE MAX installer.

Re: boot haiku natively

EIN SPEKEN ZE DUTCHE.

Mebbe we can UUSE the bootloader (DASBOOT) from ZETA, JA?

:-)

maybe from within haiku.the image is in BEOS format, so i can't mount it.(YET)
it sees my windows volume ok.takes awhile to load; JA what live cd doesn't?

MEBBE, JES MEBBE it works....

Re: boot haiku natively

@cb88
I have to choose -hda haiku.image because Qemu boots from -hda. Might be a way to change it to boot from -hdb.

I believe makebootable doesn't work because it can't figure out the drive's geometry in Qemu.

@richard

I couldn't see your pictures. Are the links correct? Do they work for you?

dd'ing to a partition or drive is no good b/c you're limited to size of Haiku image ( 250 MB ) even if partition is 10, 20, 50 GB, etc.

I always use BeOS to mount the Haiku image file, copy over the files/folders to the BFS partition. This is easier and gives me full access to the entire partition size.

Zeta LiveCD should work. All you really need is mkdir, mount, makebootable & DriveSetup.

Re: boot haiku natively

drive setup,YEAH....

ZIE SPEEKEN ZIE DUTCHE?

--->I'm working as fast as the germans will let me.

translation takes a minute.....

appears drive if done that way(used blank and formatted within HAIKU) installed with makebootable (and/or) dump of ZETA bootloader (dd onto /dev/disk/0/ata/slave/raw) gives the following message.

NOTE: this attempts to allow installation of bootloader on main system drive.

"the partition hooked up ON non removable disk lies too near at the beginning the non removable disk that boot managers cannot be installed"

(partition too close to beginning of drive)

here's the rest of the messages you missed:

bootman:

SCBI BIOS not read.Please examine your drive to ensure they are setup correctly.
this error can also occur if ZETA between two non removable disks with identical partition tables to differentiate.this drive cannot be taken to the boot manager,as long as this is not solved,shall we continue?

login:
all of these existing programs are in copyright matters protected. that copy of data and programs on other carrier media, is not permitted also in part.

OH, YES, it boots okay.SLOOOOOOWLY, as does ubuntu from CD.Its the only one so far to boot natively. I get 300 fps+ on the coffee pot.

-tonestone57

the links are numbered 1,2,3,4,5,6,7 (.tiff) 1-5 and 6-7 are EXAMPLE numbers.server is up.doesn't allow direct browsing.(THANK GOD)

Update:
found out 4.tiff was a duplicate file.

Re: boot haiku natively

Ok, figured it out. In your previous post you stated they were named image1-7.tiff when they're actually 1-7.tiff ( no image in the name ).
WRONG:
http://www.rjasmin.net/haiku/image1.tiff
http://www.rjasmin.net/haiku/image2.tiff

RIGHT
http://www.rjasmin.net/haiku/1.tiff

I'm going to look through the tiffs b/c I'm curious what you were getting.

For boot manager type "bootman" at command prompt. That'll allow you to install it.

You can change the language to English in the LiveCD if you go to Preferences. Can't remember what it's called.

Re: boot haiku natively

1.tiff - looks like it was writing the boot code to part1 but froze
2.tiff - tells the rest of the story; Error, failed to write b/c of device timeout
5.tiff - Haiku bootloader but nothing to boot from
6.tiff - copying Haiku image files/folders to Haiku1 partition ( actually good idea b/c then you may be able to get around the 250MB limit - better than dd'ing image )
7.tiff - makebootable -full Haiku1 but I see it references raw. I believe raw is the entire drive? Was there only a single partition b/c it usually refers to a specific partition /slave/0,1,2,etc. & not /slave/raw.

1.tiff was the closest to working b/c it calculated the partition offset.

Anyways, I'm sure you'll get Haiku up & running on your drive using Zeta LiveCD. Too bad, I was hoping there was an easy way to do this through Linux but that doesn't seem to be the case.

Re: boot haiku natively

maybe if I reformat the system drive(to ubuntu).gonna be awhile before that happens again.

there is ONE partition(two if you look thru dos fdisk). raw is just the whole drive.
its not frozen, I captured the image too soon. when I write to the partition, it gives me errors.

THINK I have it now.made a new raw image with QEMU.
did the cp * .....
did makebootable,(but I'll upload this...) hangs QEMU on boot.(Like computer did yesterday)

re-tried makebootable referencing RAW drive and GUESS WHAT?

the new image boots HAIKU!!!!! :-)

it formats as correct size (512mb), makebootable seems to like it.BTW, makebootable IS SUPPOSED to write to the RAW drive.(I think)

will try to dd this to the ACTUAL thing in a few.....

ZETA,maybe thru emulation.(and a little german) kicker keeps crashing and preferences panel, the one you mentioned, keeps crashing before I can make the changes.will try running it thru QEMU.maybe its my hardware.the boot kicker keeps giving me that 'too close to beginning of drive error' in german.

seems this is only way for now. ZETA Cd for those interested in on another page.I updated the links.

update:

AH_HA..

bootman is included with HAIKU.(in english no less).
to get that 2k freee...... hmm...(work on that in a bit)

Re: boot haiku natively

hmmm.....things that make you go hmmmm.....

ZETA:
got safe mode to work.loads okay in english now.AHHHH.nothing like a foreign language OS to wake u up.

Haiku and SENRYU:
stuck because floppy usb refuses to mount. pulled a make floppy script for both from ZETA.maybe i should mod it? its looking for hard wired floppy, i have none.
seems disk inside drive is at SCSI 0,2.

got BEOSMAX to work,without keyboard or mouse.(USELESS--who uses ps2 anymore?safe mode AGAIN...)

hmmmm....

Re: boot haiku natively

Here is an Idea if you want to boot it native on a standalone system and not a duel boot with any other loaders then the one haiku has.

Add it to a BartPE setup with Roadkils disk image http://www.roadkil.net/program.php?ProgramID=12 as plugin there is one out there and then have the raw disk image used by that disk to add it to current disk and then reboot and it works.

Re: boot haiku natively

Why isn't there a bootable CD image for Haiku yet? That's the biggest reason I don't try it very often anymore. Until there's a little more effort put into running it more easily on real hardware it's just the little toy OS they run in emulators. The argument that it isn't ready for bootable media doesn't help bring new people to this project or keep old BeOS users like me excited about it. I just won't jump through Linux and Emulator hoops. Sorry for being critical but the last time I got excited about Haiku was when I had a bootable Haiku CD that actually worked and I didn't have to build it myself.

Re: boot haiku natively

There will surely be a bootable CD once the alpha stage is reached.
The developers want that the people have a first good impression with the first release.
Even if we're close to the alpha, it would be a bad idea to have an official release which leave a bad impression to normal users.