Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've installed Gentoo in one of my hard disks. The whole hard disk is for that distro.
I want a dual-boot in grub to start Ubuntu or Gentoo.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        7298    58614752+  83  Linux

/dev/sdf1               1         125     1000000   82  Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sdf2             125       30402   243196503+  83  Linux
Partition 2 does not end on cylinder boundary.

/dev/sdb is Ubuntu root and /dev/sdf is Gentoo.
I execute sudo os-prober and it shows:

/dev/sdf2:Gentoo Base System release 2.0.2:Gentoo:linux

Then I execute sudo update-grub:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-6-core2
Found initrd image: /boot/initrd.img-3.0.0-6-core2
Found linux image: /boot/vmlinuz-3.0-3-core2
Found initrd image: /boot/initrd.img-3.0-3-core2
Found memtest86+ image: /boot/memtest86+.bin
Found Gentoo Base System release 2.0.2 on /dev/sdf2
done

But when I restart, grub menu doesn't show the Gentoo entry.

I didn't set the boot flag in Gentoo disk, is this the problem? The disk boot is the Ubuntu disk, not Gentoo.

My actual /boot/grub/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set ae2f99e4-5e5d-480d-abce-e66478f0c72f
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=1280x1024
  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
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set ae2f99e4-5e5d-480d-abce-e66478f0c72f
set locale_dir=($root)/boot/grub/locale
set lang=es
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=4
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, con Linux 3.0.0-6-core2' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set ae2f99e4-5e5d-480d-abce-e66478f0c72f
    linux   /boot/vmlinuz-3.0.0-6-core2 root=UUID=ae2f99e4-5e5d-480d-abce-e66478f0c72f ro   crashkernel=384M-2G:64M,2G-:128M quiet splash nomodeset video=uvesafb:mode_option=1280x1024-16,mtrr=3,scroll=ywrap acpi_osi=Linux
    initrd  /boot/initrd.img-3.0.0-6-core2
}
menuentry 'Ubuntu, con Linux 3.0.0-6-core2 (modo recuperación)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set ae2f99e4-5e5d-480d-abce-e66478f0c72f
    echo    'Cargando Linux 3.0.0-6-core2 ...'
    linux   /boot/vmlinuz-3.0.0-6-core2 root=UUID=ae2f99e4-5e5d-480d-abce-e66478f0c72f ro single 
    echo    'Cargando el disco RAM inicial...'
    initrd  /boot/initrd.img-3.0.0-6-core2
}
menuentry 'Ubuntu, con Linux 3.0-3-core2' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set ae2f99e4-5e5d-480d-abce-e66478f0c72f
    linux   /boot/vmlinuz-3.0-3-core2 root=UUID=ae2f99e4-5e5d-480d-abce-e66478f0c72f ro   crashkernel=384M-2G:64M,2G-:128M quiet splash nomodeset video=uvesafb:mode_option=1280x1024-16,mtrr=3,scroll=ywrap acpi_osi=Linux
    initrd  /boot/initrd.img-3.0-3-core2
}
menuentry 'Ubuntu, con Linux 3.0-3-core2 (modo recuperación)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set ae2f99e4-5e5d-480d-abce-e66478f0c72f
    echo    'Cargando Linux 3.0-3-core2 ...'
    linux   /boot/vmlinuz-3.0-3-core2 root=UUID=ae2f99e4-5e5d-480d-abce-e66478f0c72f ro single 
    echo    'Cargando el disco RAM inicial...'
    initrd  /boot/initrd.img-3.0-3-core2
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### 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.
### END /etc/grub.d/40_custom ###
share|improve this question
    
Are you sure Gentoo as not overwritten grub with its own, so what you are viewing is the gentoo grub menu? –  enzotib Jul 25 '11 at 12:04
    
No, Gentoo is in another hard-disk and I haven't install grub there. Moreover, if Gentoo grub overwrites the Ubuntu grub: why it shows the Ubuntu entries but no the Gentoo entry? –  Simón Jul 25 '11 at 12:10
    
Add your /boot/grub/grub.cfg file to the question –  enzotib Jul 25 '11 at 12:20

1 Answer 1

Solved:
I've updated os-prober package and I have activated boot flag in Gentoo hard disk and now it works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.