ubuntu 11.04 /Win7 dual boot Grub 2 cannot see Win7 (GPT)

Asked by Jez

Hi
Installed Win7 first, then Ubuntu with manual partitioning, with both OS on dev/sda (SSD) and Linux /home on dev/sdb (HDD)
now PC boots straight into Ubuntu with no Grub menu. Ran update-grub but no win7 entry showing. Partition table:

dev/sda1 - bios_grub
dev/sda2 - mftres
dev/sda3 - ntfs
dev/sda4 - /boot
dev/sda5 - linux-swap
dev/sda6 - /

dev/sdb2 - extended
dev/sdb5 - /home

Results from boot_info_script:

                  Boot Info Script 0.60 from 17 May 2011

============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 34
    of the same hard drive for core.img. core.img is at this location and
    looks for (,gpt4)/grub on this drive.
 => Windows is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system: BIOS Boot partition
    Boot sector type: Grub2's core.img
    Boot sector info:

sda2: __________________________________________________________________________

    File system:
    Boot sector type: -
    Boot sector info:
    Mounting failed: mount: unknown filesystem type ''

sda3: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Windows Vista/7
    Boot sector info: No errors found in the Boot Parameter Block.
    Operating System: Windows 7
    Boot files: /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system: ext4
    Boot sector type: Grub2 (v1.99)
    Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda4
                       and looks at sector 92315060 of the same hard drive
                       for core.img. core.img is at this location and looks
                       for (,gpt4)/grub on this drive.
    Operating System:
    Boot files: /grub/grub.cfg /grub/core.img

sda5: __________________________________________________________________________

    File system: swap
    Boot sector type: -
    Boot sector info:

sda6: __________________________________________________________________________

    File system: ext4
    Boot sector type: -
    Boot sector info:
    Operating System: Ubuntu 11.04
    Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb2: __________________________________________________________________________

    File system: Extended Partition
    Boot sector type: -
    Boot sector info:

sdb5: __________________________________________________________________________

    File system: ext4
    Boot sector type: -
    Boot sector info:
    Operating System:
    Boot files:

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 64.0 GB, 64023257088 bytes
255 heads, 63 sectors/track, 7783 cylinders, total 125045424 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 1 125,045,423 125,045,423 ee GPT

GUID Partition Table detected.

Partition Start Sector End Sector # of Sectors System
/dev/sda1 34 206,847 206,814 BIOS Boot partition
/dev/sda2 206,848 468,991 262,144 Microsoft Reserved Partition (Windows)
/dev/sda3 468,992 92,274,687 91,805,696 Data partition (Windows/Linux)
/dev/sda4 92,274,688 92,778,594 503,907 EFI System partition
/dev/sda5 92,778,595 96,684,845 3,906,251 Swap partition (Linux)
/dev/sda6 96,684,846 125,044,221 28,359,376 Data partition (Windows/Linux)

Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb2 2,048 1,953,523,711 1,953,521,664 5 Extended
/dev/sdb5 4,096 1,953,523,711 1,953,519,616 83 Linux

"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/sda3 920CBE360CBE1567 ntfs
/dev/sda4 a8311d3e-cfca-4b97-9b92-99ba5134a732 ext4
/dev/sda5 b27f9c57-7311-4122-ad73-08e473359a48 swap
/dev/sda6 4367cf73-d905-45f5-9f60-1f91b06a253f ext4
/dev/sdb5 47544c33-e38c-4596-81d5-7ec7e7a76b5d ext4

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/sda4 /boot ext4 (rw,commit=0)
/dev/sda6 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sdb5 /home ext4 (rw,commit=0)

============================= sda4/grub/grub.cfg: ==============================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
  set have_grubenv=true
  load_env
fi
set default="0"
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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt6)'
search --no-floppy --fs-uuid --set=root 4367cf73-d905-45f5-9f60-1f91b06a253f
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=800x600
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt4)'
search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
set locale_dir=($root)/grub/locale
set lang=en_GB
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
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
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-10-generic' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux /vmlinuz-2.6.38-10-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro splash vga=771 quiet splash vt.handoff=7
 initrd /initrd.img-2.6.38-10-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-10-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 echo 'Loading Linux 2.6.38-10-generic ...'
 linux /vmlinuz-2.6.38-10-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro single splash vga=771
 echo 'Loading initial ramdisk ...'
 initrd /initrd.img-2.6.38-10-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux /vmlinuz-2.6.38-8-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro splash vga=771 quiet splash vt.handoff=7
 initrd /initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 echo 'Loading Linux 2.6.38-8-generic ...'
 linux /vmlinuz-2.6.38-8-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro single splash vga=771
 echo 'Loading initial ramdisk ...'
 initrd /initrd.img-2.6.38-8-generic
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=================== sda4: Location of files loaded by Grub: ====================

           GiB - GB File Fragment(s)

  44.019274712 = 47.265336320 grub/core.img 1
  44.022967339 = 47.269301248 grub/grub.cfg 1
  44.084535599 = 47.335409664 initrd.img-2.6.38-10-generic 3
  44.068873405 = 47.318592512 initrd.img-2.6.38-8-generic 2
  44.029607773 = 47.276431360 vmlinuz-2.6.38-10-generic 1
  44.017886162 = 47.263845376 vmlinuz-2.6.38-8-generic 1

=========================== sda6/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
  set have_grubenv=true
  load_env
fi
set default="0"
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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt6)'
search --no-floppy --fs-uuid --set=root 4367cf73-d905-45f5-9f60-1f91b06a253f
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=800x600
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt4)'
search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
set locale_dir=($root)/grub/locale
set lang=en_GB
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
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
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-10-generic' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux /vmlinuz-2.6.38-10-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro splash vga=771 quiet splash vt.handoff=7
 initrd /initrd.img-2.6.38-10-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-10-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 echo 'Loading Linux 2.6.38-10-generic ...'
 linux /vmlinuz-2.6.38-10-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro single splash vga=771
 echo 'Loading initial ramdisk ...'
 initrd /initrd.img-2.6.38-10-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux /vmlinuz-2.6.38-8-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro splash vga=771 quiet splash vt.handoff=7
 initrd /initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 echo 'Loading Linux 2.6.38-8-generic ...'
 linux /vmlinuz-2.6.38-8-generic root=UUID=4367cf73-d905-45f5-9f60-1f91b06a253f ro single splash vga=771
 echo 'Loading initial ramdisk ...'
 initrd /initrd.img-2.6.38-8-generic
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
 insmod part_gpt
 insmod ext2
 set root='(/dev/sda,gpt4)'
 search --no-floppy --fs-uuid --set=root a8311d3e-cfca-4b97-9b92-99ba5134a732
 linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda6/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=4367cf73-d905-45f5-9f60-1f91b06a253f / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=a8311d3e-cfca-4b97-9b92-99ba5134a732 /boot ext4 defaults 0 2
# /home was on /dev/sdb5 during installation
UUID=47544c33-e38c-4596-81d5-7ec7e7a76b5d /home ext4 defaults 0 2
# swap was on /dev/sda4 during installation
UUID=b27f9c57-7311-4122-ad73-08e473359a48 none swap sw 0 0
--------------------------------------------------------------------------------

=================== sda6: Location of files loaded by Grub: ====================

           GiB - GB File Fragment(s)

  46.122201920 = 49.523337216 boot/grub/core.img 1
  46.125894547 = 49.527302144 boot/grub/grub.cfg 1
  46.187462807 = 49.593410560 boot/initrd.img-2.6.38-10-generic 3
  46.171800613 = 49.576593408 boot/initrd.img-2.6.38-8-generic 2
  46.132534981 = 49.534432256 boot/vmlinuz-2.6.38-10-generic 1
  46.120813370 = 49.521846272 boot/vmlinuz-2.6.38-8-generic 1
  46.187462807 = 49.593410560 initrd.img 3
  46.171800613 = 49.576593408 initrd.img.old 2
  46.132534981 = 49.534432256 vmlinuz 1
  46.120813370 = 49.521846272 vmlinuz.old 1

=============================== StdErr Messages: ===============================

unlzma: Decoder error
unlzma: Decoder error

My MB (Asus p8p67 pro) has UEFI bios and is showing HDD (dev/sdb) as "Windows Boot Manager"
I don't know how this got on HDD as both OS are installed on SSD drive, but maybe this is the problem?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Jez
Solved:
Last query:
Last reply:
Revision history for this message
Ubfan (ubfan1) said :
#1

Looks like the update-grub did not pick up the windows partition for some reason.
you can always add a "custom" part like the below, to file /etc/grub.d/40_custom, which simply puts what you want into the grub.cfg, but that does not really fix what went wrong.
menuentry "Microsoft Windows " {
 insmod ntfs
 set root='(hd0,3)'
 search --no-floppy --fs-uuid --set 920CBE360CBE1567
 drivemap -s (hd0) ${root}
 chainloader +1
}

Revision history for this message
Ross Fleming (ross-fleming164) said :
#2

Hiya, I've just installed Ubuntu on my desktop as I've loved it so much on my netbook but the option the boot into windows is not there anymore and i need my windows partition for my gaming, can anyone help please? As i don't quite understand the answer above because it states that it doesn't really fix it? I'm quite new to Ubuntu so any help will be appreciated, Thanks.

Revision history for this message
Ubfan (ubfan1) said :
#3

Editing the 40_custom file will fix your problem of not seeing windows, but not the underlying cause of update-grub not finding windows in the first place. You need to insert the lines starting with "menuentry" and ending with "}" into the file /etc/grub.d/40_custom. Since the file is owned by root, you will need to run the edit command as root, which you can do by starting a terminal (ctrl-alt-T) or the menu applications/accessories/terminal, then type in the following:
gksudo gedit /etc/grub.d/40_custom
use the arrow keys to go to the bottom of the file, and cut and paste the lines:

menuentry "Microsoft Windows " {
 insmod ntfs
 set root='(hd0,3)'
 search --no-floppy --fs-uuid --set 920CBE360CBE1567
 drivemap -s (hd0) ${root}
 chainloader +1
}

into the file. I think I got your UUID and partition right from your previous listing.
Save the file, and then run:
sudo update-grub
to use the new information and put it into the grub.cfg file.
You should then reboot, and see if you see the windows choice for booting.

Revision history for this message
delance (olivier-delance) said :
#4

How to make Windows showing in Grub2 menu https://answers.launchpad.net/grub/+faq/1677

Revision history for this message
Jez (hoppy1971) said :
#5

Hi Ubfan,
Thanks for your suggestion, I have tried it , ran update-grub, which says "adding windows" but when i reboot i still have no grub menu, it just boots to Ubuntu login screen. I think I may have messed up the partitions when installing Ubuntu. Should I have created a new logical partition for Ubuntu? I did not have the option to do so.
Also this line from boot info script is confusing:

" => Windows is installed in the MBR of /dev/sdb."??

dev/sdb is my second HDD with linux /home on.

Here is the output from fdisk -l. As you can see only one partition (dev/sda1) is recognised:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 64.0 GB, 64023257088 bytes
255 heads, 63 sectors/track, 7783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2b814eb7

   Device Boot Start End Blocks Id System
/dev/sda1 1 7784 62522711+ ee GPT

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa4424de7

   Device Boot Start End Blocks Id System
/dev/sdb2 1 121602 976760832 5 Extended
/dev/sdb5 1 121602 976759808 83 Linux

Any Ideas?

Revision history for this message
delance (olivier-delance) said :
#6

Run command
   sudo install gparted
and after System->Administration->Gparted partition editor.
I'm not used with GPT partition tables.
Could you tell me if:
   sudo parted -l
works and if
   System->Administration->Disk Utilities
is able to look inside GPT table.

And also try to run os-prober with the link I provided.

Revision history for this message
Jez (hoppy1971) said :
#7

Hi delance,
Here is output from sudo parted -l

Model: ATA M4-CT064M4SSD2 (scsi)
Disk /dev/sda: 64.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 17.4kB 106MB 106MB bios_grub
 2 106MB 240MB 134MB Microsoft reserved partition msftres
 3 240MB 47.2GB 47.0GB ntfs Basic data partition
 4 47.2GB 47.5GB 258MB ext4 MBR boot
 5 47.5GB 49.5GB 2000MB linux-swap(v1)
 6 49.5GB 64.0GB 14.5GB ext4

Model: ATA WDC WD10EALX-009 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 2 1049kB 1000GB 1000GB extended
 5 2097kB 1000GB 1000GB logical ext4

As you can see my MBR is in /boot at dev/sda4. Is this right or does it have to be in the first partition (dev/sda1)?
My partition table for dev/sdb is listed as msdos. How can this be when the drive is ext4 formated and contains /home partition?
I have just run dpkg-reconfigure grub-pc and installed grub to all non-ms partitions but still getting same probs.

Revision history for this message
Jez (hoppy1971) said :
#8

ps -
os-prober is installed but will not run even as root

Revision history for this message
Ubfan (ubfan1) said :
#9

I'm not familiar with the gpt partition type either. The msdos type is what I usually use for everything. You might see the grub boot screen if you hold down the shift key early in the boot sequence. Then you have 10 seconds to use the arrow keys to change what is booting on the grub screen. Grub is usually installed to the master boot block of a disk, not to any particular partition. It does seem odd that the sdb has a windows MBR.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

"os-prober is installed but will not run even as root"

What happens when you try to run os-prober? Can you provide the text from the Terminal from when you try to do so?

Revision history for this message
Jez (hoppy1971) said :
#11

Eliah,

Here is text from terminal when try to run os-prober:

jer@jer-PC:~$ sudo os-prober
[sudo] password for jer:
jer@jer-PC:~$

Nothing happens!

I had forgotten to mention the MB use EFI. This is what is causing me problems as I have done Windows/Ubuntu dual boot setups many times with no probs on BIOS PC's. This I a new machine I have just built with ASUS P8P67PRO MB.
I have an EFI boot partition that windows created but do I also need a /boot partition or do I put grub boot files into the EFI boot partition created by Windows?

Revision history for this message
Ubfan (ubfan1) said :
#12

You might need a special version of grub. See the link from which I took the below excerpt
http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

An operating system that can be booted from a (U)EFI is called a (U)EFI-aware OS, defined by (U)EFI specification. Here the term booted from a (U)EFI means directly booting the system using a (U)EFI OS loader stored on any storage device. The default location for the OS loader is \EFI\BOOT\boot[architecture name].efi, where the architecture name can be e.g. IA32, X64 or IA64. Some OS vendors may have their own OS loader. They may also change the default boot location.

    * Linux has been able to use EFI at boot time since early 2000, using the elilo EFI boot loader or, more recently, EFI versions of GRUB.[21]

Revision history for this message
Jez (hoppy1971) said :
#13

Ok,

ASUS P8P67PRO UEFI MB
Crucial M4 SSD boot drive (/dev/sda1)
WD 1TB Data Drive (/dev/sdb1)

I am trying to dual boot Win7/Ubuntu 11.04

In the BIOS boot menu I have 3 options :

Windows boot manager
Ubuntu
M4

The Windows boot manager and Ubuntu entries are both labeled "UEFI". The M4 option is not labelled.
Both OS are on the M4 boot drive (dev/sda1)
Why is there not 1 entry (M4) labeled "UEFI"

Grub2 cannot find Win7

To switch between OS I have to load BIOS and manually change boot order.

I have been racking my brains and googleing trying to fix this but no joy.

Do Win7 and Ubuntu UEFI boot files have to be on the same partition?
Where does Grub2 go?

Revision history for this message
Sebastiaan Breedveld (s-breedveld) said :
#14

I am also stuck: first installed Windows Server 2008, then Ubuntu. I can choose in the BIOS wether to emulate legacy BIOS or UEFI (on Dell server R810). 1 harddisk partitioned as GPT with partitions for windows and ubuntu.

If I use legacy BIOS, I can boot ubuntu only. If I use UEFI I can boot windows only.

I think most of the problems come from limited knowledge/experience. This is what I tried:
- Configure UEFI boot mode
- Download Ubuntu 11.10 desktop image, and "Try ubuntu without installing". The 11.10 version has and UEFI boot loader for the CD, so it boots (installation on the harddisk is 10.04 LTS, but that aside)
- Once booted, mount the installation in a chroot (assuming /dev/sda5 is the linux boot/root)
mkdir /mnt/ubuntu
mount /dev/sda5 /mnt/ubuntu
mount -t proc none /mnt/ubuntu/proc
mount -o bind /dev /mnt/ubuntu/dev
chroot /mnt/ubuntu

- Configure network
- update /etc/apt/sources.list to point to oneiric sources, as these contains a grub2-efi that actually runs
- apt-get update && apt-get install grub-efi-amd64
- run update-grub

Also, I think that dual-booting is now part of the EFI implementation, so booting between windows/linux is configurable in the EFI menu. Use efibootmgr (apt-get install efibootmgr) to activate a partition to boot from, and also the order. On my Dell server, there is also an EFI Boot setup option during boot, which I used to select the grub efi file.

Unfortunately, nothing worked -_-. Grub does not seem to be picked up by the EFI boot loader - it always boots windows. I have to use the legacy BIOS boot loader to boot Ubuntu.

Hope this gives some pointers...

Revision history for this message
Jez (hoppy1971) said :
#15

I have just solved this:

http://erickoo.wordpress.com/2009/06/14/how-to-add-vista-partition-to-grub-2-ubuntu-9-10-karmic-koala/

I now have a new grub menu entry:

'Windows x86_64 UEFI-GPT'

and a new shell script in /etc/grub.d:

"11_custom_proxy"

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/custom' | /etc/grub.d/bin/grubcfg_proxy "+'Windows x86_64 UEFI-GPT'~2072e07d53e4874c1dd3ee329affd793~
+*
+#text
"
Happy days!