Thread: Grub and NetBSD
View Single Post
  #2   (View Single Post)  
Old 11th June 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Hello XeBuZer0, and welcome to the forum!

From your Linux' fdisk output, it appears that there is an ordering issue in your primary partition table. First, note the informative message:

Quote:
The entries in the partition table are not in disk order
In addition, if you look at the start and end locations of the four partitions you have, it appears that the fourth one (which is identified as /dev/sda4 by the OS) is located in the third region of the address space on the disk (for lack of better words). I.e., not in disk order.

I suspect that when you configure grub to boot off (sda0,3) it is probably trying to boot off your Linux partition /dev/sda3, via chain loading. This would fail because to boot Linux you need to load the kernel, not the first sector in the partition. (I must add a disclaimer that I've never used grub, so it's possible I'm off the rails here.)

To fix this problem you could swap the contents of the third and fourth MBR partition table entries (the ones for Linux and NetBSD). This would put them in a natural order. However, this is also a tricky/dangerous job since you could, with one mistake, mess up the partitioning of your disk and lose access to everything.
Therefore I strongly suggest you do not follow this option at this time, and instead consider the following.

As an alternative I would simply try to get grub to boot off the fourth partition, which contains NetBSD. I'm assuming this would be done by using:

set root=(hd0,4)

in the configuration. That should be a safe thing to try.

As a little tip about formatting with the forum software, it would be good to format things like your fdisk output inside of [code] ... [/code] blocks, since it will make it easier to read.

Does this help?

Last edited by IdOp; 11th June 2014 at 03:29 AM.
Reply With Quote