Is there a boot manager that can handle this?

Michel Talon talon at lpthe.jussieu.fr
Fri Aug 27 09:17:16 UTC 2010


Doug Barton wrote:
> On 8/26/2010 5:13 PM, Alex Goncharov wrote:
> > ,--- You/Doug (Thu, 26 Aug 2010 16:47:39 -0700) ----*
> > | Windows and the *1st* FreeBSD partition just fine, but if I try to
> > boot
> > | the 2nd FreeBSD partition grub just boots the first one again.
> >
> > Are you using a chainloader?
> 
> What you posted below seems like grub 1 syntax. The latest Ubuntu comes 
> with grub 2. Here is what I have in /etc/grub.d/40_custom (after the 
> required bits):
> menuentry "FreeBSD 9-Current amd64" {
> set root=(hd0,3)
> chainloader +1
> }
> menuentry "FreeBSD 7-Stable i386" {
> set root=(hd0,3)
> chainloader +1
> }

I don't have your exact problem, but i am sharing my laptop disk
between Windows, FreeBSD and Ubuntu and i have noted that grub2
which comes with Ubuntu Lucid can directly boot /boot/loader
un in UFS2 partition, son i suspect this could also solve your problem,
rather than chainloading. Here is the syntax:


### BEGIN /etc/grub.d/40_custom ###
# 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 (on /dev/sda4)" {
	insmod ufs2
	set root='(hd0,4,a)'
	kfreebsd /boot/loader
}
### END /etc/grub.d/40_custom ###

Since i have played with grub a little, here are some other adaptations:
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
to get more attractive colors (for my taste) 
and in /etc/grub.d/00_header to get native screen resolution for the
laptop screen:
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=1280x800      <---------
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that
    # don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
Of course run update-grub afterwards. I have also seen in plymouth
Ubuntu documentation that one can 
set gfxpayload=keep
just after set gfxmode
but it doesn't work for me.


-- 
Michel Talon


More information about the freebsd-hackers mailing list