Thread: Grub and NetBSD
View Single Post
  #4   (View Single Post)  
Old 11th June 2014
XeBuZer0 XeBuZer0 is offline
New User
 
Join Date: Jun 2014
Posts: 2
Lightbulb

Quote:
Originally Posted by IdOp View Post
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:

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?
I already uninstalled NetBSD deleting the partition and I'll put it again, as a last try before put the partitions on their correct place (fortunately, I didn't have anything yet on NetBSD), and then I'll let you know if changing the partitions works.

And thanks for the tip too, in fact, I tried to format the text of my terminal output but I dunno why it didn't work :/

Quote:
Originally Posted by bsd-keith View Post
Another way to try is to edit the grub boot line when starting. Press 'e' when you see the grub boot screen, highlight the entry to change, press 'e' to actually edit the line, then 'b' to continue booting.

N.B. This is only a tempory change to the grub boot menu, if it works, change the line in /boot/grub/grub.cfg. (/boot/grub/menu.lst if it were legacy grub.)
I've already deleted NetBSD from the partition, but after my second try of install, I'll try that too, just to see if I found a way to boot it from grub command line, and I don't know if was good or wrong, but I downgraded the grub version to 0.97, what do you think? I did it because by some info that found on some places, some commands I used were for that version. Anyway, I'll tell you if I had luck with it

Thanks for the help IdOp and bsd-keith
Reply With Quote