103df [Solved] FreeBSD does not start on a triple boot with Grub2 - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Installing & Upgrading

Installing & Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2011, 14:09
Halberdier Halberdier is offline
Junior Member
 
Join Date: May 2011
Location: Italy
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default FreeBSD does not start on a triple boot with Grub2

Hello everybody,

I would like to experiment with FreeBSD. As I already have a dual booted machine (Ubuntu 10.10 and Windows XP) with plenty of disk space, I attempted a triple boot. First, I prepared the .img on a USB flash. As I messed up with dd from Linux, I used Image Writer from Windows XP. Then, I booted from the flash and Synopsis worked properly. When creating the partition, I refused the default geometry, and Synopsis detected the CHS combination matching with that showed by GParted in Linux. Having 300G for Linux and 100G for Windows, I allocated 100G to FreeBSD, then I clicked on A for automatic partition usage. I didn't install the FreeBSD boot manager, as I wanted to continue using Grub2.

At this point, I had warnings on all the four partitions (Linux, Windows, FreeBSD and Swap), stating that they don't start on a disk sector. The installation went on to completion, though. Now I went back on Linux. On GParted the FreeBSD partition shows as unknown. I edited the /etc/grub.d/40_custom file by adding the following lines:

Code:
menuentry "FreeBSD 8.2 - RELEASE amd64" {
set root=(hd0,msdos4)
chainloader +1
}
I used msdos4 mimicking the syntax that GRUB already used for the other systems, considering the partitions as numbered 1 to 4. Finally I updated grub.cfg with update-grub. When selecting FreeBSD from GRUB, it does not start, with a generic error message.

I think this post is long enough for now. I will add details later, as I don't know at the moment what could be useful for the experts. Thank you all in advance for your attention.

Last edited by DutchDaemon; May 4th, 2011 at 01:05. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 / less empty lines
Reply With Quote
  #2  
Old May 3rd, 2011, 14:23
ahavatar ahavatar is offline
Member
 
Join Date: Sep 2010
Posts: 195
Thanks: 13
Thanked 21 Times in 19 Posts
Default

Check if the FreeBSD partition is indeed the 4th partition, in other words, on GParted running on Linux, it should be "/dev/sda4"

And in my case, I use (hd0,4) instead of (hd0,msdos4). I don't know if (hd0,4) is same as (hd0,msdos4).

Last edited by DutchDaemon; May 4th, 2011 at 01:03.
Reply With Quote
  #3  
Old May 3rd, 2011, 14:48
Halberdier Halberdier is offline
Junior Member
 
Join Date: May 2011
Location: Italy
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your prompt reply. FreeBSD is actually "/dev/sda4" on GParted. I used msdos4, as the automatically detected boots in GRUB were compiled as (hd0,msdos1) for /dev/sda1 (Ububntu) and (hd0,msdos2) for /dev/sda2 (Windows). However, I'll try later with (hd0,4), to be sure.

(I am now at work, the system we are talking about is at home).

Last edited by DutchDaemon; May 4th, 2011 at 01:04. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 / less empty lines
Reply With Quote
  #4  
Old May 3rd, 2011, 19:19
Halberdier Halberdier is offline
Junior Member
 
Join Date: May 2011
Location: Italy
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, I'll try it. For the record, (hd0,4) did not work, just the same as (hd0,msdos4). The error message, immediately after the GRUB selection, is:

Code:
error: not an assignment.
error: invalid signature.

Press any key to continue...

Last edited by DutchDaemon; May 4th, 2011 at 01:05.
Reply With Quote
  #5  
Old September 24th, 2011, 08:32
mlinuxgada mlinuxgada is offline
Junior Member
 
Join Date: Sep 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Still the same problem with Grub2.
Code:
error: invalid signature.

Press any key to continue...
PS:In Grub2 there's no option 'rootnoverify' ...
Reply With Quote
  #6  
Old September 25th, 2011, 09:24
mlinuxgada mlinuxgada is offline
Junior Member
 
Join Date: Sep 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Fixed it. There is a bug into grub2/spec options/, with grub everything is ok.
Reply With Quote
  #7  
Old October 16th, 2011, 12:01
Halberdier Halberdier is offline
Junior Member
 
Join Date: May 2011
Location: Italy
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you all. I realized that grub2 has compatibility issues with a number of applications. I downgraded to grub for the Linux partition, then used GAG as a first stage boot loader: everything worked properly at the first attempt.
Reply With Quote
  #8  
Old May 30th, 2012, 23:06
velikij velikij is offline
Junior Member
 
Join Date: May 2012
Location: Santa Cruz, California
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ubuntu (or the grub2 creators upstream) have improved OS scanning by Ubuntu 12.04. I have a system running XP, FreeBSD 8.1, and Ubuntu, and did not install a FreeBSD boot manager. Before Ubuntu 12.04, I had to create a custom /etc/grub.d/40_custom file before running update-grub on the Linux partition.

But now running update-grub will detect my FreeBSD properly, so I was able to remove the custom file.

However I was able to use the custom file - mine looks like

Code:
#!/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.1 manual by Peter" {
      set root=(hd0,3)
      chainloader +1
}
Under Ubuntu 12.04, the generated stanza for FreeBSD in /boot/grub/grub.cfg is

Code:
menuentry "FreeBSD 8.1-RELEASE (GENERIC) (on /dev/sda3)" --class windows --class os {
  insmod part_msdos
  insmod ufs2
  set root='(hd0,msdos3)'
  search --no-floppy --fs-uuid --set=root 4b2e8da4ae6a55e3
  drivemap -s (hd0) ${root}
  chainloader +1
}

Last edited by DutchDaemon; May 31st, 2012 at 01:07. Reason: Did you miss your sign-up email AND your sign-up PM? Read now.
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
[Solved] Boot FreeBSD ISO from Grub2 USB stick Beeblebrox General 29 January 14th, 2013 08:28
Grub2 Configuration (Dual boot linux + FreeBSD is it possible?) marcinnn Installing & Upgrading 4 October 10th, 2011 01:35
[Solved] Triple boot - Windows XP, Windows 7 and FreeBSD 8.1 with GRUB2. cucu007 Installing & Upgrading 7 February 23rd, 2011 15:59
Triple boot on seperate HDD: Windows 7, Ubuntu 10.10, PC-BSD 8.1 jorn-191 Installing & Upgrading 4 November 18th, 2010 11:05
[Solved] dual boot FreeBSD with linux using grub2 favor Installing & Upgrading 22 January 20th, 2010 14:26


All times are GMT +1. The time now is 18:38.


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