# Partition help



## manblue (Apr 14, 2011)

I recently installed Ubuntu on my first hard drive, but FreeBSD is on the second Hard drive, /dev/sdb. The new install uses grub2, but I have not been successful with the solutions contributed by the forums. Running *gparted* reveals a strange order in my partition. FreeBSD sits on /dev/sdb2 and is placed in front of /dev/sdb1 which is storage (file system = ntfs).





I believe this happened when I deleted a partition to install FreeBSD again. Grub 1 worked, but grub 2 doesn't. Is there a way to fix this? This is my FreeBSD entry for /etc/grub.d/40_custom.


```
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "freebsd 8.2"{
        insmod ufs2
	set root=(hd1,1)
	kfreebsd /boot/loader
}
```

Thanks


----------



## JimW (Apr 14, 2011)

Try this....


```
menuentry "freebsd 8.2"{
        insmod ufs2
	set root=(hd1,1)
	chainloader +1
}
```

Also.... don't forget to run *sudo update-grub* after editing the grub file in Ubuntu.


----------



## manblue (Apr 15, 2011)

*not quite*

Thanks for the reply JimW, but I no longer get "error: file not found".

Now I just get a blinking cursor at the top left of the screen.


----------



## JimW (Apr 15, 2011)

manblue said:
			
		

> Thanks for the reply JimW, but I no longer get "error: file not found".
> 
> Now I just get a blinking cursor at the top left of the screen.



Trial and error my friend. 

It's odd that your sdb2 partition is showing up first in GParted. I've never seen it displayed that way.

Then.... try this...change the partition line to this...


```
set root=(hd1,2)
```

Then update your grub.


----------



## manblue (Apr 16, 2011)

*Solved*

That did the trick

```
set root=(hd1,2)
```

It worked. Replying in FreeBSD now. Thank you!


----------

