You are not logged in.

#1 2020-09-10 21:52:13

Burner
Member
Registered: 2017-03-26
Posts: 20

Dual boot to windows not working (HP ProBook 455 G7)

Hi,
I'm running Arch on a HP ProBook 455 G7 with a dual boot setup for starting Windows 10.
When starting Windows via grub I get the following message:

Error: not a valid root device.

Press any key to continue ...

The grub config has been created automatically via "sudo grub-mkconfig -o /boot/grub/grub.cfg" and having "os-prober" installed.
I found a workaround to start Windows by using the grub command line and entering "exit" which leads to an exit of the grub boot selection and a booting of Windows.
Is there any way I can achieve this via the grub selection menu directly or what am I doing wrong ending up with the error above?


fdisk -l

sudo fdisk -l
Festplatte /dev/nvme0n1: 476,94 GiB, 512110190592 Bytes, 1000215216 Sektoren
Festplattenmodell: -                     
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: -

Gerät             Anfang       Ende  Sektoren  Größe Typ
/dev/nvme0n1p1      2048    2099199   2097152     1G Microsoft Basisdaten
/dev/nvme0n1p2   2099200   84019199  81920000  39,1G Linux-Dateisystem
/dev/nvme0n1p3  84019200  983437311 899418112 428,9G Linux-Dateisystem
/dev/nvme0n1p4 983437312 1000214527  16777216     8G Linux Swap


Festplatte /dev/sda: 232,89 GiB, 250059350016 Bytes, 488397168 Sektoren
Festplattenmodell: - 
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: -

Gerät         Anfang      Ende  Sektoren  Größe Typ
/dev/sda1       2048   1085439   1083392   529M Windows-Wiederherstellungsumgebung
/dev/sda2    1085440   1290239    204800   100M EFI-System
/dev/sda3    1290240   1323007     32768    16M Microsoft reserviert
/dev/sda4    1323008 103723007 102400000  48,8G Microsoft Basisdaten
/dev/sda5  243222528 488396799 245174272 116,9G Microsoft Basisdaten
/dev/sda6  103723008 243222527 139499520  66,5G Microsoft Basisdaten

Last edited by Burner (2020-09-14 21:22:15)

Offline

#2 2020-09-16 16:36:32

Burner
Member
Registered: 2017-03-26
Posts: 20

Re: Dual boot to windows not working (HP ProBook 455 G7)

It seems to be a special problem. Does anyone know if this is hardware/BIOS related or GRUB related?

Maybe I have to ask somewhere else depending on the source of the issue.

Offline

#3 2020-09-16 17:44:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,507

Re: Dual boot to windows not working (HP ProBook 455 G7)

Post

lsblk -f

and the generated grub.cfg

Where is the actual GRUB binary installed?

Offline

#4 2020-09-22 20:33:45

Burner
Member
Registered: 2017-03-26
Posts: 20

Re: Dual boot to windows not working (HP ProBook 455 G7)

Hi,
thanks for the answer. Below the output:

lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                         
├─sda1
│    ntfs         Wiederherstellung
│                       002693062692FBBA                                    
├─sda2
│    vfat   FAT32       7094-C078                                           
├─sda3
│                                                                           
├─sda4
│    ntfs         Win10 B81A970D1A96C830                                    
├─sda5
│    ext4   1.0   home  a65df521-9553-4ca9-9a25-5367c7838bf4                
└─sda6
     ntfs         win_home
                        0B83E0A65A2DE4F1                                    
nvme0n1
│                                                                           
├─nvme0n1p1
│    vfat   FAT32       35C8-4EC8                               986M     4% /efi
├─nvme0n1p2
│    ext4   1.0         9013e9c1-d012-4812-8272-5c72939babd6   24,3G    31% /
├─nvme0n1p3
│    ext4   1.0         153cfa42-21fd-4d3f-a03b-e9bdf28c54d8     40G    85% /home
└─nvme0n1p4
     swap   1           82d2b380-9848-488a-ba44-f4a9f3efc503                [SWAP]

Since my setup is a GPT/EFI the grub main folder is located at /boot/grub

ls /boot/grub 
fonts  grub.cfg  grubenv  locale  themes  x86_64-efi

and the efi directory is /efi

ls /efi/EFI/  
GRUB  HP

grub.cfg

cat /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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  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
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  9013e9c1-d012-4812-8272-5c72939babd6
else
  search --no-floppy --fs-uuid --set=root 9013e9c1-d012-4812-8272-5c72939babd6
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=de_DE
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
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
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9013e9c1-d012-4812-8272-5c72939babd6' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  9013e9c1-d012-4812-8272-5c72939babd6
	else
	  search --no-floppy --fs-uuid --set=root 9013e9c1-d012-4812-8272-5c72939babd6
	fi
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=9013e9c1-d012-4812-8272-5c72939babd6 rw  loglevel=3 quiet acpi_backlight=vendor
	echo	'Loading initial ramdisk ...'
	initrd	/boot/amd-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9013e9c1-d012-4812-8272-5c72939babd6' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-9013e9c1-d012-4812-8272-5c72939babd6' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  9013e9c1-d012-4812-8272-5c72939babd6
		else
		  search --no-floppy --fs-uuid --set=root 9013e9c1-d012-4812-8272-5c72939babd6
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=9013e9c1-d012-4812-8272-5c72939babd6 rw  loglevel=3 quiet acpi_backlight=vendor
		echo	'Loading initial ramdisk ...'
		initrd	/boot/amd-ucode.img /boot/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-9013e9c1-d012-4812-8272-5c72939babd6' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  9013e9c1-d012-4812-8272-5c72939babd6
		else
		  search --no-floppy --fs-uuid --set=root 9013e9c1-d012-4812-8272-5c72939babd6
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=9013e9c1-d012-4812-8272-5c72939babd6 rw  loglevel=3 quiet acpi_backlight=vendor
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initramfs-linux-fallback.img
	}
}

### 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 ###
menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-7094-C078' {
	insmod part_gpt
	insmod fat
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt2' --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  7094-C078
	else
	  search --no-floppy --fs-uuid --set=root 7094-C078
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### 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  ${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 ###

Last edited by Burner (2020-09-22 21:27:44)

Offline

#5 2020-09-23 14:58:47

euromatlox
Member
Registered: 2017-02-10
Posts: 48

Re: Dual boot to windows not working (HP ProBook 455 G7)

I recently made a dual boot installation of Windows 10 and Linux following this advice. I did as most recommended, installed Windows 10 first. When installing I set the first (EFI/boot) partition size to 1 gigabytes, as told here. I'm not sure if needed, but also set MSR partition size to 128Mb same way (automatic install suggested only 16Mb for MSR partition). Forget the recovery partition part, it you use the latest (or very fresh) install package from Microsoft, created by Windows Media Creation Tool, the Windows 10 install will create it automatically after the main Windows partition. Just remember to leave enough empty space to hard drive, do not use all empty space for Windows main partition.

Instead of grub, rEFInd boot manager is used there. Here is told some benefits of using rEFInd.

If rEFInd can offer a solution, and you have already installed Windows, and perhaps Linux too, just check the "Install the bootloader" part of the advice.

For the latest Windows, this is the recommended order of partitions, here's from my laptop.

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1.8T  0 disk 
|-sda1   8:1    0     1G  0 part /boot/efi
|-sda2   8:2    0   128M  0 part 
|-sda3   8:3    0 399.5G  0 part 
|-sda4   8:4    0   505M  0 part 
|-sda5   8:5    0     4G  0 part [SWAP]
|-sda6   8:6    0   150G  0 part /
`-sda7   8:7    0   350G  0 part /home

Last edited by euromatlox (2020-09-23 17:33:04)

Offline

#6 2020-09-23 18:44:36

GeorgeJP
Member
From: Czech Republic
Registered: 2020-01-28
Posts: 35

Re: Dual boot to windows not working (HP ProBook 455 G7)

Burner wrote:
lsblk -f
sda                                                                         
├─sda2
│    vfat   FAT32       7094-C078                                           

nvme0n1
│                                                                           
├─nvme0n1p1
│    vfat   FAT32       35C8-4EC8                               986M     4% /efi

You have boot files for windows on drive sda (another EFI system partition)

Offline

#7 2020-09-26 07:39:24

Burner
Member
Registered: 2017-03-26
Posts: 20

Re: Dual boot to windows not working (HP ProBook 455 G7)

GeorgeJP wrote:

You have boot files for windows on drive sda (another EFI system partition)

Yes, and? Is that a problem?

@euromatlox

I will check your proposal later, thanks!

Offline

#8 2020-09-26 10:21:16

GeorgeJP
Member
From: Czech Republic
Registered: 2020-01-28
Posts: 35

Re: Dual boot to windows not working (HP ProBook 455 G7)

I am not using grub and don't have two efi system partitions, so I can only imagine, that this configuration needs some additional configuration steps (boot files for windows are on second system EFI partition, which is not mounted?).

Offline

#9 2020-09-26 10:43:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,507

Re: Dual boot to windows not working (HP ProBook 455 G7)

We talk about GRUB scope it should not matter where it is mounted during runtime.

Though I agree this would likely be fixable by installing GRUB to the Windows EFI, this doesn't explain why this happens with the GRUB config as present. I do suspect it is possible that your firmware does not allow GRUB to see the second drive in this scope, but that would be hard to test for. Maybe - without having tested it - what output do you get for

drivemap -l

in the GRUB console? https://www.gnu.org/software/grub/manua … l#drivemap

Offline

#10 Today 16:59:43

Burner
Member
Registered: 2017-03-26
Posts: 20

Re: Dual boot to windows not working (HP ProBook 455 G7)

I tried drivemap -l with an unexpected result (translated from german so the error message could be slightly different):

grub> drivemap -l
Error: Command "drivemap" could not be found.

Other commands are working like ls:

grub> ls
(hd0) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,gpt4) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1) 

Do I have to install additional tools for the command drivemap?

Offline

Board footer

Powered by FluxBB