You are not logged in.

#1 2018-05-02 00:58:39

vinnom
Member
Registered: 2013-11-24
Posts: 59

[SOLVED]GRUB doesn't boot Windows

Hi guys!

I installed windows and then arch.

I followed the isntallation guide, the GRUB page, Dual boot with Windows page and this Gentoo page in order to make my windows boot alongside my arch.

During the installation process, everything went normal. I installed os-prober and mounted windows boot partition so my configuration file would be generated without any problems. Well, it did find Windows and Windows entry in GRUB is displayed just fine.

The real problem is that it is acting as dummy entry. I select it and then the computer reboots.

Below is some outputs and pieces of file that may help us.

/boot/grub/grub.cfg:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (em /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-6C06184606181424' {
	insmod part_gpt
	insmod ntfs
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  6C06184606181424
	else
	  search --no-floppy --fs-uuid --set=root 6C06184606181424
	fi
	drivemap -s (hd1) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###
$ sudo grub-probe --target=hints_string /run/media/vinnom/Reservado\ pelo\ Sistema/bootmgr 
--hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 
$ sudo grub-probe --target=fs_uuid /run/media/vinnom/Reservado\ pelo\ Sistema/bootmgr 
6C06184606181424

Things get odd here. My mobo isn't UEFI, so it should have being set to part_msdos and not part_gpt. I really don't know why it is like that (I already changed it, but it didn't solve anything)

My fdisk -l output can be checked below.

$ LC_ALL=C sudo fdisk -l
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 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
Disk identifier: 7AAB1109-6833-4D82-92A8-4468DACC692B

Device         Start       End   Sectors  Size Type
/dev/sda1       2048 145833178 145831131 69.6G Microsoft basic data
/dev/sda2  145833984 146800639    966656  472M Windows recovery environment
/dev/sda3         34      2047      2014 1007K BIOS boot
/dev/sda4  146800640 147849215   1048576  512M Linux filesystem
/dev/sda5  147849216 234441614  86592399 41.3G Linux root (x86-64)

Partition table entries are not in disk order.


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disk identifier: AF1997E5-ACDB-4E45-B9B8-722EF166604D

Device          Start        End    Sectors    Size Type
/dev/sdb1        2048    1126399    1124352    549M Microsoft basic data
/dev/sdb2     1126400 2147485695 2146359296 1023.5G Microsoft basic data
/dev/sdb3  2147485696 2178942975   31457280     15G Linux filesystem
/dev/sdb4  2178942976 2388658175  209715200    100G Linux filesystem
/dev/sdb5  2388658176 3017803775  629145600    300G Linux filesystem
/dev/sdb6  3017803776 3907029134  889225359    424G Linux home

The Windows boot partition is on /dev/sdb1 and Arch boot partition is on /dev/sda4. It shouldn't be a problem though. Quoting dual boot with windows page:

However if Arch is installed in BIOS/GPT in one disk and Windows is installed in BIOS/MBR mode in another disk, then the BIOS bootloader used by Arch CAN boot the Windows in the other disk, if the bootloader itself has the ability to chainload from another disk.

Right now, I'm thinking in two options:
1 - boot using windows live usb, fix bootmgr (will overwrite grub) and then boot using arch live usb and try to solve things from here
2 - backup again (this is a restore set up. I deleted the backup, because I'm stupid. I didn't learn yet that backups shouldn't be erased - only you are sure you doesn't need it anymore)

Both options doesn't please me. If possible, help me find a better solution for this.

Let me know it more information is needed.
Thanks in advance

Last edited by vinnom (2018-05-15 20:33:03)

Offline

#2 2018-05-02 08:43:48

robg
Member
Registered: 2015-03-05
Posts: 225

Re: [SOLVED]GRUB doesn't boot Windows

I don't use GRUB myself, but here are some thoughts:

1. From what you write it is unclear whether the boot fails with GRUB or Windows. Hopefully it is the former.
2. fdisk doesn't list /dev/sdb. What does lsblk tell you? Please post that output too.
3. What does the `--hint-bios=hd1` part in your grub config refer to? Have you checked that this matches the location of your windows boot partition?
4. Why, after reading this, have you decided on GPT/BIOS? If you are not too committed to this setup, I would suggest going either MBR or preferably GPT/UEFI.

Last edited by robg (2018-05-02 09:12:04)

Offline

#3 2018-05-03 02:37:52

vinnom
Member
Registered: 2013-11-24
Posts: 59

Re: [SOLVED]GRUB doesn't boot Windows

robg wrote:

I don't use GRUB myself, but here are some thoughts:

1. From what you write it is unclear whether the boot fails with GRUB or Windows. Hopefully it is the former.
2. fdisk doesn't list /dev/sdb. What does lsblk tell you? Please post that output too.
3. What does the `--hint-bios=hd1` part in your grub config refer to? Have you checked that this matches the location of your windows boot partition?
4. Why, after reading this, have you decided on GPT/BIOS? If you are not too committed to this setup, I would suggest going either MBR or preferably GPT/UEFI.

1 - It fails to boot Windows. Linux partitions boot just fine
2 - fdisk does show /dev/sdb (notice that there is a scroll bar ^^)
3 - for what I know, hd1 refers to /dev/sdb and hd0 refers to /dev/sda in my case
4 - After partitioning, MBR got converted to GPT. I would use GPT/UEFI but my mobo is BIOS not UEFI. My previous installation was done the same and worked. Maybe I'll just have to go pristine and format and reinstall things (although I don't want to do that =/)

Offline

#4 2018-05-03 08:04:46

robg
Member
Registered: 2015-03-05
Posts: 225

Re: [SOLVED]GRUB doesn't boot Windows

1. What I meant is that regarding

The real problem is that it is acting as dummy entry. I select it and then the computer reboots.

this, it is unclear whether GRUB actually hands control over to Windows which in turn decides to reboot or whether that reboot is triggered at some earlier point in GRUB. Depending on which situation applies, the solution to your problem will of course differ.

2. Argh, you are right. Thanks for pointing it out! Your sdb disk is also set up as GPT. Does Windows 10 support booting from BIOS/GPT at all? The wiki mentions, regarding Windows 8, that

Windows 8/8.1 x86_64 versions support booting in x86_64 UEFI mode from GPT disk only, OR in BIOS mode from MBR/msdos disk only. They do not support IA32 UEFI boot, x86_64 UEFI boot from MBR/msdos disk, or BIOS boot from GPT disk.

Similarly the quote in your first post also explicitly mentions Windows installed in BIOS/MBR mode.

3. Then that should be fine.

4. The previous installation was done _exactly_ the same way? Same partitioning, same Window version, same GRUB installation?

Offline

#5 2018-05-03 13:17:09

vinnom
Member
Registered: 2013-11-24
Posts: 59

Re: [SOLVED]GRUB doesn't boot Windows

robg wrote:

1. What I meant is that regarding

The real problem is that it is acting as dummy entry. I select it and then the computer reboots.

this, it is unclear whether GRUB actually hands control over to Windows which in turn decides to reboot or whether that reboot is triggered at some earlier point in GRUB. Depending on which situation applies, the solution to your problem will of course differ.

Oh, sorry I misunderstood what you were saying. That is in fact a good question. I'm not sure. I guess GRUB tries to boot Windows but because some wrong config it can't then it reboots. I'll have to lookout for how I can check this info.

2. Argh, you are right. Thanks for pointing it out! Your sdb disk is also set up as GPT. Does Windows 10 support booting from BIOS/GPT at all? The wiki mentions, regarding Windows 8, that

Windows 8/8.1 x86_64 versions support booting in x86_64 UEFI mode from GPT disk only, OR in BIOS mode from MBR/msdos disk only. They do not support IA32 UEFI boot, x86_64 UEFI boot from MBR/msdos disk, or BIOS boot from GPT disk.

Similarly the quote in your first post also explicitly mentions Windows installed in BIOS/MBR mode.

Maybe the problem is in that. But after reading this.

Such a limitation is not enforced by the Linux kernel, but can depend on which bootloader is used and/or how the bootloader is configured. The Windows limitation should be considered if the user wishes to boot Windows and Linux from the same disk, since installation procedure of bootloader depends on the firmware type and disk partitioning configuration. In case where Windows and Linux dual boot from the same disk, it is advisable to follow the method used by Windows, ie. either go for UEFI/GPT boot or BIOS/MBR boot

I assumed that if Windows boot partition and Linux boot partition are located in different disks, then it should be possible to use GPT/BIOS for Linux and MBR/BIOS for Windows. But I don't know why my /dev/sdb is using GPT and I tried to fix that using windows live usb and fixing MBR. It didn't help and /dev/sdb was still marked as GPT.  I assume that Windows 10 and 8/8.1 didn't differ (or at least not much) in this topic.


4. The previous installation was done _exactly_ the same way? Same partitioning, same Window version, same GRUB installation?

Almost, in fact. When I was formatting disks so I could install Windows, for some reason, Windows tool didn't allow me to create the Windows boot partition (system reserved) inside my ssd (/dev/sda) and created it in /dev/sdb which is my sshd. I thought it wouldn't be a problem and let it be. Arch linux and GRUB installation process was pretty much the same, but in the end I have Windows "root" in /dev/sda, Windows boot in /dev/sdb and linux boot in /dev/sda. I think this is what created the problem and by now I'm almost trying it from the beginning (I even backed everything up again).

And I forgot to say that I used cgdisk create partitions when I was installing arch. I find it easier and better than cfdisk (or their dialog counterparts) for example, but maybe this messed things up (the sad thing is that in the past I used it and eveything went fine). Now I've downloaded gparted live and I installed it on my flash drive using multitoolusb alongside with arch iso. I'll try a few things before install things from scratch, but what you pointed out in your second point made me think that maybe I just messed things up from the start, so I'll have to re-do it.

Offline

#6 2018-05-05 10:33:29

robg
Member
Registered: 2015-03-05
Posts: 225

Re: [SOLVED]GRUB doesn't boot Windows

vinnom wrote:

I assumed that if Windows boot partition and Linux boot partition are located in different disks, then it should be possible to use GPT/BIOS for Linux and MBR/BIOS for Windows. But I don't know why my /dev/sdb is using GPT and I tried to fix that using windows live usb and fixing MBR. It didn't help and /dev/sdb was still marked as GPT.  I assume that Windows 10 and 8/8.1 didn't differ (or at least not much) in this topic.

I am fairly certain that this is where the issue lies; while there is no limitation imposed from Linux, Windows will (if the information from version 8 carries over) have problems on GPT/BIOS, which is the setup on both of your disks. Regarding converting from GPT to MBR: At least the MBR limitation to at most four primary partitions will prevent that on /dev/sdb.

My suggestion would be to reinstall both Linux and Windows after formatting both disks as MBR.

Offline

#7 2018-05-15 20:32:37

vinnom
Member
Registered: 2013-11-24
Posts: 59

Re: [SOLVED]GRUB doesn't boot Windows

robg wrote:
vinnom wrote:

I assumed that if Windows boot partition and Linux boot partition are located in different disks, then it should be possible to use GPT/BIOS for Linux and MBR/BIOS for Windows. But I don't know why my /dev/sdb is using GPT and I tried to fix that using windows live usb and fixing MBR. It didn't help and /dev/sdb was still marked as GPT.  I assume that Windows 10 and 8/8.1 didn't differ (or at least not much) in this topic.

I am fairly certain that this is where the issue lies; while there is no limitation imposed from Linux, Windows will (if the information from version 8 carries over) have problems on GPT/BIOS, which is the setup on both of your disks. Regarding converting from GPT to MBR: At least the MBR limitation to at most four primary partitions will prevent that on /dev/sdb.

My suggestion would be to reinstall both Linux and Windows after formatting both disks as MBR.


Yeah, it was the last thing I wanted to do, but I had to. I'll edit the OP and mark it as solved. Thank you for your time smile

Offline

Board footer

Powered by FluxBB