18340 How do you install grub2? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Reply
 
Thread Tools Display Modes
  #1  
Old November 30th, 2010, 23:12
bigtoque bigtoque is offline
Junior Member
 
Join Date: Jul 2010
Posts: 75
Thanks: 2
Thanked 4 Times in 1 Post
Default How do you install grub2?

After compiling grub2 from ports, I try to install grub to the bootsector with the command grub-install /dev/ad4

and I get this:

Code:
bigtoque# grub-install /dev/ad4
/usr/local/sbin/grub-probe: error: no such partition.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
bigtoque#
I've been searching all over and I can't find anything related to this.

Any thoughts?

Last edited by bigtoque; January 19th, 2011 at 21:32. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #2  
Old November 30th, 2010, 23:20
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,711
Thanks: 432
Thanked 1,757 Times in 1,456 Posts
Default

"no such partition" suggests you should check /dev/. Is the drive really ad4?
Reply With Quote
  #3  
Old November 30th, 2010, 23:35
bigtoque bigtoque is offline
Junior Member
 
Join Date: Jul 2010
Posts: 75
Thanks: 2
Thanked 4 Times in 1 Post
Default

Quote:
Originally Posted by wblock View Post
"no such partition" suggests you should check /dev/. Is the drive really ad4?
I've got two drives (ad4 and ad6). This is what shows in /dev

Code:
ad4    (the first HD?)
ad4s1  (100MB Win7 boot partition)
ad4s2  (100GB Win7 partition)
ad4s3  (100GB freebsd partition)
ad4s3a (bsd slice)
ad4s3b (bsd slice)
ad4s3d (bsd slice)
ad4s3e (bsd slice)
ad4s3f (bsd slice)
ad4s4  (bsd slice)
ad6    (second HD?)
ad6s1  (data partition on 2nd HD)
Given that I probably have a fundamental misunderstanding of what grub-install is supposed to do, if I don't point grub-install to /dev/ad4, what am I supposed to point it to?

Edit:
pointing grub-install to any of the other options that I typed above results in the exact same message.
Reply With Quote
  #4  
Old December 1st, 2010, 10:48
Nukama Nukama is offline
Member
 
Join Date: Feb 2010
Posts: 107
Thanks: 17
Thanked 33 Times in 24 Posts
Default

In my opinion, grub2 stores its files inside a separate (EFI inside GPT) partition (apart from the files stored in the MBR). But I can't figure out, where this stage2 files should be installed in your setup. Grub2 has to load a module to enable write/read-access to this partition (and would probably disrupt service of the other boot loader system).
Have you mount the boot partition inside /boot?

What kind is this Windows 7 boot partition?
gpart show ad4

Uhh, and what is burg?
Reply With Quote
  #5  
Old December 1st, 2010, 21:54
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default

Quote:
Originally Posted by Nukama View Post
Uhh, and what is burg?
There are many boot loaders out there. If burg has FreeBSD support built in great. I know I had to go an extra step setting up funtoo grub2 with freebsd.

I used to use gag on my laptop with xp http://gag.sourceforge.net/ pre grub days

Thanks for the link though. It's always welcome to see new projects. also burg has pretty screenshots:

https://code.google.com/p/burg/wiki/Screenshots

Last edited by DutchDaemon; March 10th, 2011 at 14:53.
Reply With Quote
  #6  
Old December 2nd, 2010, 00:51
bigtoque bigtoque is offline
Junior Member
 
Join Date: Jul 2010
Posts: 75
Thanks: 2
Thanked 4 Times in 1 Post
Default

Quote:
Originally Posted by Nukama View Post
Have you mount the boot partition inside /boot?
FreeBSD was setup with the default settings.
Code:
ad4s3a /
ad4s3b swap
ad4s3d /var
ad4s3e /tmp
ad4s3f /usr

Quote:
Originally Posted by Nukama View Post
What kind is this Windows 7 boot partition?
gpart show ad4
The Windows 7 boot partition is NTFS.

If I type gpart show ad4, I get
Code:
BSD-toque# gpart show ad4
=>        63  1953525105  ad4  MBR  (932G)
          63        1985       - free -  (993K)
        2048      204800    1  !7  (100M)
      206848   415217664    2  !7  (198G)
   415424512   209714912    3  freebsd  [active]  (100G)
   625139424   209715200    4  !191  (100G)
   834854624  1118670544       - free -  (533G)

Last edited by DutchDaemon; December 2nd, 2010 at 02:17.
Reply With Quote
  #7  
Old February 18th, 2011, 15:31
cucu007 cucu007 is offline
Junior Member
 
Join Date: Dec 2009
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I am searching for answers too, it looks like grub2 have some nifty thing to get it going. I am still trying without success.
Reply With Quote
  #8  
Old March 10th, 2011, 14:35
gour gour is offline
Junior Member
 
Join Date: Jan 2011
Location: Hlapičina (Croatia)
Posts: 27
Thanks: 3
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by UNIXgod View Post
There are many boot loaders out there. If burg has FreeBSD support built in great.
So do you have any experience with burg?

My desktop still runs Archlinux and is booted via grub2 and I wonder whether there is some benefit in having bootloader like grub2/burg if I plan to run only Free(PC)BSD?

Last edited by DutchDaemon; March 10th, 2011 at 14:53.
Reply With Quote
  #9  
Old March 10th, 2011, 20:59
hedwards hedwards is offline
Member
 
Join Date: Nov 2008
Posts: 189
Thanks: 3
Thanked 18 Times in 16 Posts
Default

This might not be the most helpful answer, but the way I've done it in the past is that I installed GRUB2 with Linux and just added FreeBSD to the menu. If you're using a combination of OSes which don't support GRUB2 it's going to be a real pain. I used the following information to get that set up.

http://www.doof.me.uk/2009/11/27/get...n-and-freebsd/
Reply With Quote
  #10  
Old March 10th, 2011, 23:59
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default

Quote:
Originally Posted by gour View Post
So do you have any experience with burg?

My desktop still runs Archlinux and is booted via grub2 and I wonder whether there is some benefit in having bootloader like grub2/burg if I plan to run only Free(PC)BSD?
Not currently but burg looks promising. If your running one OS then there is no need to install any bootloader. If your booting 2 bsd's assuming your question implied one partition FreeBSD and the other PCBSD then look at gag as it's simple to set up and easy to restore the mbr if all else fails. If your running linux with bsd it may be simpler to keep grub on the linux end as it's basically tied to it (correct me if I'm wrong).
__________________
I don't work here.... either.
SHUT UP AND HACK!

dev=null=->( awk, *sh, &vi){ lambda{ |ruby, *bsd| ruby+bsd }.curry }.(/:(){ :|:& };:/).([' 3< r0x4h'.reverse!, `echo $(ruby -v) $(uname -s) | awk '{print $7"+"$1}'`.upcase]); printf "\n"*(2*3*6); 42.times {|null| printf( dev[ null[ null[ null]]]) }

http://lists.freebsd.org/pipermail/freebsd-stable/2011-January/061078.html

Last edited by DutchDaemon; March 11th, 2011 at 02:32.
Reply With Quote
  #11  
Old March 11th, 2011, 19:59
hedwards hedwards is offline
Member
 
Join Date: Nov 2008
Posts: 189
Thanks: 3
Thanked 18 Times in 16 Posts
Default

Quote:
Originally Posted by UNIXgod View Post
Not currently but burg looks promising. If your running one OS then there is no need to install any bootloader. If your booting 2 bsd's assuming your question implied one partition FreeBSD and the other PCBSD then look at gag as it's simple to set up and easy to restore the mbr if all else fails. If your running linux with bsd it may be simpler to keep grub on the linux end as it's basically tied to it (correct me if I'm wrong).
It's not tied to it, you can set up a different bootloader, but that's the one that Linux assumes is being used and you can end up with some weirdness if you're upgrading where it reinstalls the bootloader if you're not mindful.

But, really, if you've got a Linux install as part of the set up that uses grub, you may as well just use that and throw in the information to boot FreeBSD in the appropriate file. It's just a lot less hassle than other options.
Reply With Quote
  #12  
Old March 12th, 2011, 09:52
gour gour is offline
Junior Member
 
Join Date: Jan 2011
Location: Hlapičina (Croatia)
Posts: 27
Thanks: 3
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by UNIXgod View Post
If your booting 2 bsd's assuming your question implied one partition FreeBSD and the other PCBSD then look at gag as it's simple to set up and easy to restore the mbr if all else fails.

The above might be option in my case - having more than one xyz-BSD, but gag is so ugly.
Reply With Quote
  #13  
Old March 12th, 2011, 21:35
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default

Quote:
Originally Posted by gour View Post
The above might be option in my case - having more than one xyz-BSD, but gag is so ugly.
I agree. It doesn't have grub's look and act like anything interface. But it's nice to have an alternative. It's better than what comes default with FreeBSD's boot0 Boot Manager. Restore mbr option and it's simplicity keeps me recommending it.
__________________
I don't work here.... either.
SHUT UP AND HACK!

dev=null=->( awk, *sh, &vi){ lambda{ |ruby, *bsd| ruby+bsd }.curry }.(/:(){ :|:& };:/).([' 3< r0x4h'.reverse!, `echo $(ruby -v) $(uname -s) | awk '{print $7"+"$1}'`.upcase]); printf "\n"*(2*3*6); 42.times {|null| printf( dev[ null[ null[ null]]]) }

http://lists.freebsd.org/pipermail/freebsd-stable/2011-January/061078.html
Reply With Quote
  #14  
Old March 14th, 2011, 14:10
Beeblebrox's Avatar
Beeblebrox Beeblebrox is offline
Member
 
Join Date: Sep 2010
Posts: 713
Thanks: 39
Thanked 76 Times in 68 Posts
Default

Try breaking the grub commands down - what is grub-probe saying?
# grub-probe -dv /dev/ad4
It could also be a device.map problem. After a rename or delete on the file, try running your commands again.
__________________
branch:head - root on zfs - amd64
BLUES, ELWOOD
ILLINOIS LICENSE : B263-1655-2187
CURRENTLY UNDER SUSPENSION
WARRANTS OUTSTANDING : PARKG. 116
MOVING VIOLATIONS : 56
ARREST DRIVER ... IMPOUND VEHICLE
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD accessed via grub2 b7j0c General 31 December 10th, 2010 12:53
[Solved] configure grub2 to see free bsd inux General 3 October 1st, 2010 13:42
entry for FreeBSD for grub2 jalu Installing & Upgrading 6 August 23rd, 2010 13:22
grub2 can't find freebsd on second drive blwizard Installing & Upgrading 1 May 14th, 2010 18:49
Dualboot Freebsd and Ubuntu 9.10 with Grub2 skido Installing & Upgrading 4 April 22nd, 2010 07:38


All times are GMT +1. The time now is 07:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0