Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Grub cant see windows 10 MBR ?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
technobro
Posts: 5
Joined: 2017-08-16 05:01

Grub cant see windows 10 MBR ?

#1 Post by technobro »

Hi all

I install Stretch 9.

When i install Grub at the end it warn me about MBR compatibilty something i said yes.

Now grub cant see my windows 10 drive.

I tried

os-prober
40_custom file entry in grub

i notice on the windows drive there is a 1.4 MB free space i dont know if it delete an entry or what.
i notice also for some weird reason the drive is read only

so i tried this

ntfsfix /dev/sda1
mount /dev/sda1 /media/root/SSD1

Mounting volume... Windows is hibernated, refused to mount.
FAILED

i tried boot-repair. and get ...

GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.
Alternatively, you can retry after activating the [Separate /boot/efi partition:] option.

I am lost ... it is my understanding that maybe my windows drive is in BIOS MBR and debian is in UEFI... i just dont understant why grub cant see it .
ps it boot on his own when i select the drive in the bios.

heres bootscript

Code: Select all

                  Boot Info Script 0.61      [1 April 2012]


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

 => Windows is installed in the MBR of /dev/sda.
 => Windows is installed in the MBR of /dev/sdb.
 => No boot loader is installed in the MBR of /dev/sdc.
 => No boot loader is installed in the MBR of /dev/sdd.

sda1: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

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

sdc1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/debian/grubx64.efi

sdc2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 9
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sdc3: __________________________________________________________________________

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

sdd1: __________________________________________________________________________

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

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

Drive: sda _____________________________________________________________________
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048   500,115,455   500,113,408   7 NTFS / exFAT / HPFS


GUID Partition Table detected, but does not seem to be used.

Partition    Start Sector    End Sector  # of Sectors System

Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1               2,048   500,117,503   500,115,456   7 NTFS / exFAT / HPFS


Drive: sdc _____________________________________________________________________
Disk /dev/sdc: 59.6 GiB, 64023257088 bytes, 125045424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

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


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sdc1           2,048     1,050,623     1,048,576 EFI System partition
/dev/sdc2       1,050,624    58,562,559    57,511,936 Data partition (Linux)
/dev/sdc3      58,562,560   125,044,735    66,482,176 Swap partition (Linux)

Drive: sdd _____________________________________________________________________
Disk /dev/sdd: 2.7 TiB, 2999999004672 bytes, 5859373056 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
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdd1                   1 4,294,967,295 4,294,967,295  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sdd1           2,048 2,638,145,535 2,638,143,488 Data partition (Linux)

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        D28C29FD8C29DD2B                       ntfs       
/dev/sdb1        699FA61D02C97A3A                       ntfs       SSD
/dev/sdc1        42A3-1411                              vfat       
/dev/sdc2        42346a27-a2ac-4921-8d85-8ec28e03e328   ext4       
/dev/sdc3        4316a4af-08ff-4ec0-9854-15b407eb85e7   swap       
/dev/sdd1        205f7a7b-ea7e-4a8d-b3af-a7d5f863d349   ext4       

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

Device           Mount_Point              Type       Options

/dev/sda1        /mnt/boot-sav/sda1       fuseblk    (ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/sdb1        /mnt/boot-sav/sdb1       fuseblk    (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/sdc1        /boot/efi                vfat       (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sdc2        /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sdd1        /mnt/boot-sav/sdd1       ext4       (rw,relatime,data=ordered)


=========================== sdc2/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
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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 load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2  42346a27-a2ac-4921-8d85-8ec28e03e328
else
  search --no-floppy --fs-uuid --set=root 42346a27-a2ac-4921-8d85-8ec28e03e328
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2  42346a27-a2ac-4921-8d85-8ec28e03e328
else
  search --no-floppy --fs-uuid --set=root 42346a27-a2ac-4921-8d85-8ec28e03e328
fi
insmod png
if background_image /usr/share/desktop-base/softwaves-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-42346a27-a2ac-4921-8d85-8ec28e03e328' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd2,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2  42346a27-a2ac-4921-8d85-8ec28e03e328
	else
	  search --no-floppy --fs-uuid --set=root 42346a27-a2ac-4921-8d85-8ec28e03e328
	fi
	echo	'Loading Linux 4.9.0-3-amd64 ...'
	linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=42346a27-a2ac-4921-8d85-8ec28e03e328 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-4.9.0-3-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-42346a27-a2ac-4921-8d85-8ec28e03e328' {
	menuentry 'Debian GNU/Linux, with Linux 4.9.0-3-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-3-amd64-advanced-42346a27-a2ac-4921-8d85-8ec28e03e328' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd2,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2  42346a27-a2ac-4921-8d85-8ec28e03e328
		else
		  search --no-floppy --fs-uuid --set=root 42346a27-a2ac-4921-8d85-8ec28e03e328
		fi
		echo	'Loading Linux 4.9.0-3-amd64 ...'
		linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=42346a27-a2ac-4921-8d85-8ec28e03e328 ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.9.0-3-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 4.9.0-3-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-3-amd64-recovery-42346a27-a2ac-4921-8d85-8ec28e03e328' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd2,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2  42346a27-a2ac-4921-8d85-8ec28e03e328
		else
		  search --no-floppy --fs-uuid --set=root 42346a27-a2ac-4921-8d85-8ec28e03e328
		fi
		echo	'Loading Linux 4.9.0-3-amd64 ...'
		linux	/boot/vmlinuz-4.9.0-3-amd64 root=UUID=42346a27-a2ac-4921-8d85-8ec28e03e328 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.9.0-3-amd64
	}
}

### END /etc/grub.d/10_linux ###

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

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

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

### BEGIN /etc/grub.d/31_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/31_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom_proxy ###
menuentry "Windows 10" {
	set root='(hd0,0)'
	chainloader +1
}

# 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_proxy ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sdc2/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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>
# / was on /dev/sda2 during installation
UUID=42346a27-a2ac-4921-8d85-8ec28e03e328 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=42A3-1411  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda3 during installation
UUID=4316a4af-08ff-4ec0-9854-15b407eb85e7 none            swap    sw              0       0
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)


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

cat: /tmp/BootInfo-N03QXocI/Tmp_Log: No such file or directory

Palmstroem
Posts: 19
Joined: 2017-08-12 12:36

Re: Grub cant see windows 10 MBR ?

#2 Post by Palmstroem »

Several problems here.

From your output it is clear that sda and sdb are NTFS-formatted drives for Windows 7, both with a MBR. On the other hand, sdc and sdd, both for Linux, use the new GPT scheme which means that there is a dedicated EFI Boot partition (sdc1) with the GRUB loader grubx64.efi. To the best of my knowledge Windows 7 cannot be booted from an UEFI partition. Therefore I would recommend to wipe sdc and sdd and re-install Linux with MBR Boot, not with UEFI Boot. The other option would be to upgrade Windows to 8 or 10 and run everything in GPT/UEFI.

Quite another thing is that Windows is hibernated. You should - at least temporarily - turn off Fast Boot and Hibernate e.g.,

Code: Select all

powercfg /h off
in a Windows admin terminal. If you don't, Windows normally does not really shut down if you tell it to do so but goes into hibernation mode only.

Do you get both OSes as selectable options from the BIOS boot (for instance, if you hit F12 or something during power-on)?

technobro
Posts: 5
Joined: 2017-08-16 05:01

Re: Grub cant see windows 10 MBR ?

#3 Post by technobro »

HI Palmstroem

SDC is the new Debian os. yes
SDA is windows 10 not 7

ill try powercfg /h off and report.

in my bios "Asrock Z77 PRO3 "
i get an EFI entry called debian and i have no where to modify it .... i think its the bios that "" sees it on the drive ""
but if i select boot the ""windows drive"" it boot no problem.

technobro
Posts: 5
Joined: 2017-08-16 05:01

Re: Grub cant see windows 10 MBR ?

#4 Post by technobro »

powercfg /h off .. did the trick to get the disk out of read only status

but still no go grub ... os-prober at least.

Palmstroem
Posts: 19
Joined: 2017-08-12 12:36

Re: Grub cant see windows 10 MBR ?

#5 Post by Palmstroem »

Hi technobro,

UEFI specs say (https://msdn.microsoft.com/en-us/librar ... th_mbr_gpt):
Systems that support UEFI require that boot partition must reside on a GPT disk.
If you boot Linux from GPT it cannot chainload Windows because Windows is MBR. :(

Therefore, in your case I would convert everything from MBR to GPT, for instance with the tool
http://www.thewindowsclub.com/mbr2gpt-tool-windows-10. After the conversion there will be an EFI partition, probably under /dev/sda1, where all operating systems should store their respective loaders in different folders:
  • \EFI\Microsoft\Boot\bootmgfw.efi
    \EFI\debian\grubx64.efi
You could just move your Linux grubx64.efi file from sdc1 to sda1. Finally the UEFI (firmware) needs to find the .efi files. The whole configuration may be controlled either from Windows (for example, with the help of bcdedit or EasyUEFI) or from Linux (with the help of efibootmgr and GRUB with its config files).

If you don't like this approach you could alternatively try rEFInd (http://www.rodsbooks.com/refind/). It is a very robust and flexible boot manager which finds almost everything that is bootable on your computer (Note: ONLY UEFI!). I can highly recommend it!

technobro
Posts: 5
Joined: 2017-08-16 05:01

Re: Grub cant see windows 10 MBR ?

#6 Post by technobro »

HI

I was under the impression that it was possible, i even tough ive done it in the past when playing whit hackintosh custom boot loader (clover).

I am gonna reformat win10 in EFI. this was more to learn and the challenge to understand and fix it.
Ill report how it went.

Thanks for you help.

technobro
Posts: 5
Joined: 2017-08-16 05:01

Re: Grub cant see windows 10 MBR ?

#7 Post by technobro »

HI

So i reformat the win10 drive to EFI
Open grub-customizer and os prober has already detected it.

Its all working now.

Post Reply