[haiku-development] Re: makebootable/grub worries - was Re: building cross tools: unrecognized host system = "x86 =5F64-unknown-linux-gnu"3D?=

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 06 Jul 2008 15:57:54 +0200

Fredrik Ekdahl wrote:
> Marcus Jacob skrev:
> > Hi,
> > 
> > as mentioned before, I managed to get the build done, however now I'm 
> > struggling with the nitty gritty details of actually getting the system 
> > to boot.
> > 
> > I basically did a build with the following relevant options in the 
> > UserBuildConfig:
> > 
> > HAIKU_IMAGE_DIR = /dev
> > HAIKU_IMAGE_NAME = sda2
> > 
> > which basically is my partition reserved for Haiku. The build went 
> > well, as mentioned before.
> > 
> > After that I run makebootable /dev/sda2 and included the partion grub 
> > with the following optios:
> > 
> > title Haiku
> > rootnoverify (hd0,1)
> > chainloader +1
> > 
> > However all I get is "Failed to load OS. Press an key to reboot".
> > 
> > Again I guess I'm just missing something stupid. Any further hints for 
> > me?
> 
> 
> Have you tried without running makebootable yourself? The build system 
> does this for you and there is no reason for you to do this manually.

The grub entry looks correct, but may still be pointing at the wrong 
partition, for example if you have a hidden Windows rescue partition or 
something like that. Depending on the situation, an empty primary partition 
may or may not be enumerated in Linux, but will be in Grub, so the numbers 
may be off. If only the partition index is wrong, you can try to change it 
from the grub shell. Ie press "e" before you boot the entry and change the 
line, then press "b". If it still does not boot, change it in the other 
direction. Like I said, the partition numbering in grub versus Linux may be 
weird in an individual way.

In any case, you need access permissions to the disk itself and also to the 
partition when you build. The build system should take care of makebootable 
itself. This is what I do before I attempt to build:

sudo chmod o+rw /dev/sda; sudo chmod o+rw /dev/sda6

I think the permissions on the /dev/sda device are too permissive, maybe 
others can be more specific. Do not attempt to do the entire build as root.

Best regards,
-Stephan


Other related posts: