I have a spare primary partition on my Asus EeePC 901 20 GB where I installed a Haiku raw image (downloaded to Ubuntu and dd’ed it over to the “haiku” partition).
Then I made it bootable by running “makebootable” from within Ubuntu.
As has been well documented recently, this works perfectly.
However, I then decided to go a step further and take out that primary partition, create an extended partition in its place and put two logical partitions within the extended.
Now I copied the haiku-alpha.image over to one of the logicals and made it bootable as usual. Everything fine up to now so I made the appropriate changes to the Grub boot menu for the new location of Haiku. So now the Grub entry for Haiku looked like this:
##Haiku
title Haiku-alpha 25-11-2008
rootnoverify (hd1,4)
makeactive
chainloader +1
Then I tried to boot Haiku and got
After much totally fruitless messing around, I re-created the primary partition I had deleted and re-installed Haiku as before.
Once again, it booted fine.
So, it seems I can’t get Haiku to boot from a logical partition.
Anybody know why or how to get around this?
Acutally, this is entirely a grub configuration issue
First of all, let’s clarify what you’re doing to make sure: (hd1,4) represents the 5th partition on the 2nd hard drive right? I’m not sure if grub counts every partition or not (is the extended partition counted as (hd1,3))?
You can get rid of the makeactive line - that isn’t actually needed to boot Haiku at all actually, and IIRC, you can’t use it on a logical partition anyway (may be the cause of the error). I believe this only sets the “bootable” flag on the partition which is basically unnecessary when chainloading from grub this way.
Thanks for all the replies. Here are my responses.
[quote=umccullough]Acutally, this is entirely a grub configuration issue
First of all, let’s clarify what you’re doing to make sure: (hd1,4) represents the 5th partition on the 2nd hard drive right? I’m not sure if grub counts every partition or not (is the extended partition counted as (hd1,3))?[/quote]
Yes to both questions. I was using /dev/sdb5 which is (hd1,4)
Yeah, not sure why I put that in there as it’s totally unnecessary.
I took it out for the arrangement mentioned above but this time I got this error:
OK, this is promising as Grub seems to have now recognized that this is a “valid device”.
Seems, however, that on the EeePC, only stuff in the first 1024 cylinders is bootable. What I had was at cylinder 1800 or something like that.
So, I’m re-partitioning my drive to bring my extended partition totally within the first 1024 cylinders and then I’ll try to boot Haiku again.
I have three computers where I boot a number of Linux OSes from extended partitions without any problems.
I was unable however to get Grub to boot FreeBSD from anything other than a primary partition.
Need? Absolutely not. Christ, I don’t even need the Asus EeePC 901.
[quote]You can chainload Haiku from an extended partition
Grub can do so, and Haiku’s bootloader can handle it.[/quote]
Great! Let’s see if I can figure out how.
[quote=umccullough]
You can get rid of the makeactive line - that isn’t actually needed to boot Haiku at all actually, and IIRC, you can’t use it on a logical partition anyway (may be the cause of the error).[/quote]
Yes, indeed, the “makeactive” line was the problem.
However, I still got a problem when trying to boot to Haiku without it as I already mentioned.
To get over this on the EeePC 901, I first tried with the Haiku partition (logical) at 770-869 cylinders but this also gave the Grub error 18.
So I moved the Haiku logical partition to cylinders 1-100 and this time it booted without problems.
Interestingly, I have booted to Haiku on a primary partition while located at the outer cylinders (something like 1863-1962) so seems that this restriction applies only to logical partitions. My guess is that, on this machine, extended partitions will only boot below something like 512 cylinders although I haven’t fully tested this.
I was, however, able to get both Haiku and Senryu bootable at the same time while installed in logical partitions below 160 cylinders.
Just for completeness, the c/h/s for this disk is 1962/255/63
Nice, problem solved. Thanks for sharing your inspiration.
Paul, could you please explain how you were able to run “makebootable” from linux?
How did you obtain a linux compatible binary? Do I need to build it myself from source?
I want to install Haiku on an old laptop which is running linux. I used dd to copy a raw image to a BeFS partition, but I got stuck on the makebootable part.
To run the makebootable command from Ubuntu on my Asusu EeePC 901, I just went through the first five steps of this guide http://www.haiku-os.org/documents/dev/building_haiku_on_ubuntu_linux_step_by_step. For me this took nearly three hours and added 2.2 GB to my HDD (when your HDD is only 16 GB, this is a lot).
Then I could run the makebootable command by changing to the ~/develop/haiku/trunk directory and running sudo jam run ‘:<build>makebootable’ /dev/sdb4
Make sure you change the device name from /dev/sdb4 to whatever yours is.
Alternatively, you could just build the haiku image directly within your partition using this guide http://www.haiku-os.org/community/forum/installing_haiku_to_a_partition_from_linux when the image will come out the other end already bootable. You’ll need to run the first five steps from the previous guide before proceeding with this guide.
I should just mention that even going through these steps there’s no gaurantee that Haiku is going to boot for you. I have installed Haiku (and Senryu) on three different computers (EeePC 901, MacBook C2D, Dell 4550) and although I had no problem with the installation or making the images bootable, I could only get it to boot from the EeePC 901. Seeing that Haiku is still in a pre-alpha stages, it still seems to be very picky as to which hardware it will tolerate.
If I can help any more, just post.
Good luck
I was hoping I could avoid checking out all sources and make a build myself. But, since there doesn’t seem to be another way I will follow the steps from the guide you mentioned. It won’t hurt me though, trying to build it myself.
Let’s hope my hardware will be supported without any big difficulties.
Yeah, you should know that the actual work involved in the steps I mentioned is almost negligible. The time is just in waiting for the downloads and compile to complete.
You can use this time to take the dog for a walk or whatever else you like to do.
See the comment here about makebootable - someone has written a tiny c program for linux to do the same thing that means you don’t need to checkout the entire Haiku build tree:
makebootabletiny is very, very nice. Downloads, compiles and runs literally in microseconds.
Works fine from Ubuntu.
Just for the record I had to use this command to get it to run without errors from its directory:
sudo ./makebootabletiny /dev/sda12
Nice one, thanks. It pays to go through the comments in some of these articles.
[quote=tangobravo]See the comment here about makebootable - someone has written a tiny c program for linux to do the same thing that means you don’t need to checkout the entire Haiku build tree:
Thanks for the makebootable info guys.
It was a breeze compiling and running it.
After getting very excited when I saw Haiku booting, I was disappointed when it halted on the disk icon
Now i’m stuck in KDL and I can’t use my keyboard either.
[quote=Mauro]Thanks for the makebootable info guys.
It was a breeze compiling and running it.
After getting very excited when I saw Haiku booting, I was disappointed when it halted on the disk icon
Now i’m stuck in KDL and I can’t use my keyboard either.[/quote]
USB keyboard? Those don’t work in KDL still (it has to do with not having code that gives control of the USB keyboard back to the BIOS, and since the kernel is halted, the USB stack cannot function at that point)
It definitely can be. Many have problems with the default bus_manager (often referred to as the “ide” bus_manager) - and there is a “replacement” in the repository called “ata” but it is somewhat incomplete, slower, and you must build your own image to get it.
When I say incomplete, the “ata” bus_manager doesn’t yet support DMA or ATAPI devices (I could be wrong about the latter).
There are several bugs logged on http://dev.haiku-os.org regarding the swapping of bus_managers - you could search for your specific KDL and see if one of them matches.
I found that by setting the Bios to “Legacy” rather than “Native” for SATA disks I could boot Haiku with the old “ide” bus manager, which supports DMA and stuff. My other partitions booted like that too. I’m not sure quite what the cost is in doing that - I think Native mode can support some access reordering and stuff but I think with most consumer-level drives there isn’t much of a speed advantage. If anyone else knows more, feel free to share
Even if my USB keyboard would function in KDL, the next problem would be me not knowing what to type
I’ll try setting my BIOS to legacy settings tonight and post my findings here.
PS. Although I’m not able to run Haiku natively yet, I’m very very pleased with the progress this project has made. Now I’m running Kubuntu and XP on my main PC and neither of them give me the satisfaction R5 gave me. I’m very eager to replace them with Haiku!
[quote=Mauro][quote]
USB keyboard? Those don’t work in KDL still (it has to do with not having code that gives control of the USB keyboard back to the BIOS, and since the kernel is halted, the USB stack cannot function at that point)
[/quote]
Even if my USB keyboard would function in KDL, the next problem would be me not knowing what to type :-)[/quote]
If you can get a keyboard to work, in “safe mode options”, select “enable on screen debug output” and whatever else you want. Then continue booting, Then once it is at the KDL, enter “bt”. This should give some idea as to what is going wrong.
I’ve switched my BIOS settings to IDE compatible mode and Haiku boots!!
Ok, I can’t run my native resolution (1680x1050), but besides this it works like a charm! I’m really impressed with the speed of the OS. I sometimes used to run Haiku under vmware on my laptop, but this is something entirely different. It absolutely flies on my C2D, and considering the OS is not even alpha there is room for improvement which I probably won’t even notice.
I’m typing this in Haiku
Kudos to the devs!! Really a.m.a.z.i.n.g.