# entry for FreeBSD for grub2



## Anonymous (Aug 17, 2010)

I installed FreeBSD on the third partition of the second internal hard-disk (in linux-speak /dev/sdb3 from fdisk -l, i seem to remember it was ad6 during FreeBSD installation).
My entry for grub2 looks like this:


```
menuentry "FreeBSD" {
insmod ufs2
set root=(hd1,3)
chainloader +1
}
```
But when i choose FreeBSD from grubs menu it just hangs, no error message.
Version is FreeBSD-8.1.
Thanks

In case it helps:  The installation CD says its ad6s3


----------



## oed (Aug 22, 2010)

This is what I added to /etc/grub.d/40_custom in order to boot FreeBSD on what is known to linux as /dev/sda4.


```
menuentry "FreeBSD" {
	set root=(hd0,4,a)
	chainloader +1
}
```

Then I ran "update-grub" and rebooted into FreeBSD.


----------



## Anonymous (Aug 22, 2010)

Thanks for your answer.
My entries seem to be correct, i tried different ones. The problem seems to be more serious.
I am not able to boot from my second internal hard-disk nor from my external hard-disk anymore
(the OS doesn't matter, so its not a problem with FreeBSD)

I am at the problem, but don't seem to get it solved. 
If i  will find the solution i will sure post it here.

I will try to put FreeBSD on a USB-stick and boot it that way from my main PC.
a) will the speed be ok? (if not i might as well go on to use it from my second PC)
b) is there a good how-to put it on a stick?

Another option would be to resize the 20GB-linux- / partition on my first hard-disk...
I really would like to run FreeBSD with a bit more of horse-power.

Thanks again.


----------



## mechanic (Aug 23, 2010)

Don't forget to put FreeBSD on a primary partition, it doesn't like logical ones.


----------



## Anonymous (Aug 23, 2010)

It is on a primary one. 

btw, did you read that?:


> I am not able to boot from my second internal hard-disk nor from my external hard-disk anymore
> (the OS doesn't matter, so its not a problem with FreeBSD)


----------



## mechanic (Aug 23, 2010)

But that just seems to be a Grub2 problem, it may need reinstalling to the right place (which I'd have to lookup but a safe bet would be the first HD MBR).


----------



## Anonymous (Aug 23, 2010)

mechanic said:
			
		

> But that just seems to be a Grub2 problem, it may need reinstalling to the right place (which I'd have to lookup but a safe bet would be the first HD MBR).


Grub2 is on the first hard-disks-MBR.
I also put grub-legacy (grub1, so to speak) on a stick and tried that.

Seems like the BIOS and the boot-loader see the hard-disks just the other way around.
(at least that is the result of my tests with grub-legacy from USB-stick)
What i don't get is why i am able to boot all OSes on hard-disk1 (/dev/sda). And with the usual syntax.
I also tried "super grub" and it can't boot an OS from hard-disk2 neither.

I also tried my external hard-disk: same problem.
I yet have to try the USB-stick, but assume i will run into the same problem.

In general i got enough space on /dev/sda1 for as much OSes i want. The only reason i used hard-disk2 (/dev/sdb2) at all is that BSD needs a primary partition.



> But that just seems to be a Grub2 problem


Seems so to me too.


----------

