Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487086 - sys-boot/grub-2.00_p5107-r1 - grub2-mkconfig does not generate menu entries for windows partition
Summary: sys-boot/grub-2.00_p5107-r1 - grub2-mkconfig does not generate menu entries f...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-06 11:13 UTC by Juergen Rose
Modified: 2013-10-06 20:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/grub.d/30_os-prober (30_os-prober,9.90 KB, application/x-shellscript)
2013-10-06 11:19 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2013-10-06 11:13:42 UTC
root@lynx:/etc/grub.d(41)# fdisk -l /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0xa00041d8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    14155249     7076601   27  Hidden NTFS WinRE
/dev/sda2        14155776   114849791    50347008    7  HPFS/NTFS/exFAT
/dev/sda3       114849792   115910081      530145   83  Linux
/dev/sda4       115910656  1953525167   918807256    5  Extended
/dev/sda5       115912704   141078527    12582912   82  Linux swap / Solaris
/dev/sda6       141080576   409516031   134217728   83  Linux
/dev/sda7       409518080  1953525167   772003544   83  Linux

/dev/sda2 is the windows vista partition:

root@lynx:/boot(51)# df | grep sda2
/dev/sda2                                   50347004  21350336  28996668  43% /dos_c
root@lynx:/boot(52)# ll /dos_c
total 6594630
-rw------- 1 root root         24 Sep 18  2006 autoexec.bat
drwx------ 1 root root       4096 Nov 19  2009 Boot/
-rw------- 1 root root     333203 Jan 21  2008 bootmgr
-rw------- 1 root root       8192 Feb  5  2008 BOOTSECT.BAK
-rw------- 2 root root         10 Sep 18  2006 config.sys
lrwxrwxrwx 2 root root         60 Nov  2  2006 Documents and Settings -> /dos_c/Users/
lrwxrwxrwx 2 root root         60 Nov 20  2009 Dokumente und Einstellungen -> /dos_c/Users/
drwx------ 1 root root          0 Nov 19  2009 DRIVERS/
-rw------- 1 root root 3219439616 Jan 22  2013 hiberfil.sys
drwx------ 1 root root          0 Nov 19  2009 Icons/
drwx------ 1 root root          0 Sep 27  2010 MSOCache/
drwx------ 1 root root          0 Sep 27  2010 Novell/
-rw------- 1 root root 3533012992 Jan 22  2013 pagefile.sys
drwx------ 1 root root          0 Jan 21  2008 PerfLogs/
drwx------ 1 root root       4096 Jan  9  2007 preboot/
drwx------ 1 root root       4096 Sep 27  2010 ProgramData/
drwx------ 1 root root      20480 Sep 27  2010 Program Files/
lrwxrwxrwx 2 root root         92 Nov 20  2009 Programme -> /dos_c/Program Files/
drwx------ 1 root root       4096 Sep 28  2010 $Recycle.Bin/
drwx------ 1 root root          0 Nov 20  2009 RRbackups/
-rw------- 1 root root         86 Nov 19  2009 setup.log
drwx------ 1 root root       4096 Dec  7  2012 SWSHARE/
drwx------ 1 root root       8192 Nov 20  2009 SWTOOLS/
-rw------- 1 root root         57 Nov 20  2009 syslevel.lgl
drwx------ 1 root root      16384 Jan  8  2013 System Volume Information/
drwx------ 1 root root          0 Dec  8  2006 tvtos/
-rw------- 2 root root       1732 Dec  7  2012 tvtpktfilter.dat
drwx------ 1 root root       4096 Sep 28  2010 Users/
drwx------ 1 root root      28672 Sep 27  2010 Windows/


root@lynx:/boot(53)# LANG=C grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub.cfg ...
Found linux image: /boot/kernel-genkernel-x86_64-3.11.4
Found initrd image: /boot/initramfs-genkernel-x86_64-3.11.4
Found linux image: /boot/kernel-genkernel-x86_64-3.11.3-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.11.3-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.11.3
Found initrd image: /boot/initramfs-genkernel-x86_64-3.11.3
Found linux image: /boot/kernel-genkernel-x86_64-3.10.10
Found initrd image: /boot/initramfs-genkernel-x86_64-3.10.10
Found linux image: /boot/kernel-genkernel-x86_64-3.10.6-rt-rt3
Found initrd image: /boot/initramfs-genkernel-x86_64-3.10.6-rt-rt3
Found linux image: /boot/kernel-genkernel-x86_64-3.9.8-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.9.8-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.9.8
Found initrd image: /boot/initramfs-genkernel-x86_64-3.9.8
Found linux image: /boot/kernel-genkernel-x86_64-3.8.11-rt-rt8
Found initrd image: /boot/initramfs-genkernel-x86_64-3.8.11-rt-rt8
Found linux image: /boot/kernel-genkernel-x86_64-3.8.10-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.8.10-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.7.5
Found initrd image: /boot/initramfs-genkernel-x86_64-3.7.5
Found linux image: /boot/kernel-genkernel-x86_64-3.7.4-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.7.4-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.6.10-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.6.10-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.6.10
Found initrd image: /boot/initramfs-genkernel-x86_64-3.6.10
done

root@lynx:/boot(54)# grep -i wind /boot/grub2/grub.cfg 
root@lynx:/boot(55)# cat /etc/default/grub
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.3 2013/05/13 16:54:13 floppym Exp $
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub2-mkconfig -o /boot/grub2/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values. 

GRUB_DISTRIBUTOR="Gentoo"

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10

# Append parameters to the linux kernel command line
# GRUB_CMDLINE_LINUX=""

# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX_DEFAULT="dolvm real_init=/usr/lib/systemd/systemd rootfstype=ext4"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub2/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub2/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true


root@lynx:/boot(58)# grep -i wind /etc/grub.d/30_os-prober 
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
        Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' {


Reproducible: Always
Comment 1 Juergen Rose 2013-10-06 11:19:01 UTC
Created attachment 360216 [details]
/etc/grub.d/30_os-prober
Comment 2 Jory A. Pratt gentoo-dev 2013-10-06 14:22:17 UTC
Even tho the file is provided by grub, you still need to emerge os-prober for the menu entry to be generated.
Comment 3 Mike Gilbert gentoo-dev 2013-10-06 15:02:48 UTC
Read your post-inst messages please.
Comment 4 Juergen Rose 2013-10-06 20:46:13 UTC
Thanks, after installing os-prober it seems to work:

root@lynx:/usr/src/linux(11)# LANG=C grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub.cfg ...
Found linux image: /boot/kernel-genkernel-x86_64-3.11.4-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.11.4-gentoo
...
Found Windows Recovery Environment (loader) on /dev/sda1
Found Windows Vista (loader) on /dev/sda2
done