2

I'm currently trying to boot haiku as part of a triple boot with windows XP and lubuntu. I'm using grub2 from lubuntu as my bootloader since ntldr only does XP, and haiku's bootloader only ever seems to work when you format an entire disk for it.

For some inconceivable reason I've got one primary partition (windows) and 4 logical partitions (lubuntu 16.04, swap, haiku, spare) in there. I also run a version of haiku with package management so grub needs to be set up manually.

I can do this on primary partitions - what would be the correct designation for it? A clue might be that the disks tool in lubuntu starts the logical partitions from 5, and haiku is sda7/filesystem partition 7 but hd(0,7) does not work .

enter image description here

I've currently set etc/grub.d/40_custom with

menuentry "Haiku" {
set root=(hd0,7)
chainloader +1
}

added on to the default.

1 Answer 1

3

The naming conventions for GRUB2 are described in the manual: https://www.gnu.org/software/grub/manual/html_node/Naming-convention.html

The relevant example from the manual is:

(hd0,msdos5)

This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from ‘5’, regardless of the actual number of primary partitions on your hard disk.

So, in this case, what you probably want is (hd0,msdos7).

What you seem to be using at the moment is the old (grub-legacy) format, as described in their manual: https://www.gnu.org/software/grub/manual/legacy/grub.html#Naming-convention -- as far as I know, this does not work on grub2. If you are actually using grub-legacy, please note that partitions there start from 0, so the partition index should be one lower than the grub2 version, e.g. (hd0,6) in your case.

2
  • I do wonder where you got the (hd0,7) attempt from -- if you pulled it from a different GRUB install, then it was probably grub-legacy.
    – Bob
    Commented Jan 19, 2017 at 6:14
  • rough guess based off the SDxN + haiku docs. (hd0,2) worked in a previous incarnation of this build with 2 primary partitions so I vaguely know that the syntax is correct - the msdos bit was the secret sauce I was missing
    – Journeyman Geek
    Commented Jan 19, 2017 at 6:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .