You are not logged in.

#1 2017-02-08 19:37:11

mindless
Member
Registered: 2017-01-21
Posts: 29

[SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

Hi everyone, I installed archlinux on a unique drive, in UEFI-GPT (I guess since cfdisk shows gpt in the label, but I don't remember how I installed it..). And I also installed windows 10 on another drive in BOOT-MBR (msinfo32 returns "Legacy" for the boot mode). What I would like to know is how to add a working entry to windows into grub ? I tried many different things, and each time, when I run my entry in grub I get something like "Incorrect sector size 6421...".
Then I noticed there are uncompatible ? Bootloader UEFI vs BIOS limitations...

Here are my partitions :

❯ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME   FSTYPE   SIZE MOUNTPOINT       LABEL
sda           447,1G                  
├─sda1 ntfs     500M                  Réservé au système
└─sda2 ntfs   446,7G                  
sdb           111,8G                  
├─sdb1 vfat       1G /boot/efi        boot
├─sdb2 swap       8G [SWAP]           swap
├─sdb3 ext4      20G /                root
└─sdb4 ext4    82,8G /home            home

And here is my grub conf :

❯ sudo cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# 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.


menuentry "Windows" {
	set root='(hd0,gpt1)'
	chainloader +1
}


menuentry "System shutdown" {
	echo "System shutting down..."
	halt
}

menuentry "System restart" {
	echo "System rebooting..."
	reboot
}

Can somebody help me on this problem ?

Last edited by mindless (2017-03-20 08:46:08)

Offline

#2 2017-02-08 19:50:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,297
Website

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

I would try:

menuentry 'Windows' {
        insmod part_msdos
        insmod chain
        set root='(hd0,1)'
        chainloader +1
}

Last edited by Head_on_a_Stick (2017-02-08 19:52:09)


Para todos todo, para nosotros nada

Offline

#3 2017-02-09 11:50:53

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

I still get

error: invalid sector size 63553

.
The only thing I need to do after editing the file is run

sudo grub-update

right ?

Offline

#4 2017-02-09 11:53:50

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

There is no grub-update command in Arch, you regenerate the grub config with...

grub-mkconfig -o /boot/grub/grub.cfg

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2017-02-09 12:44:17

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

I installed an AUR package which does update-grub, which is simply a wrapper of grub-mkconfig. I try it soon and I tell you what's the result smile

Offline

#6 2017-02-09 14:04:03

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

This doesn't fix the problem. I still get the same error. sad sad

Offline

#7 2017-02-13 16:48:59

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

Someone to help me on this ?

Offline

#8 2017-02-13 23:22:45

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

Stop bumping your thread. If anyone had help, they would have helped.

https://wiki.archlinux.org/index.php/Co … ct#Bumping

Last edited by mrunion (2017-02-13 23:25:59)


Matt

"It is very difficult to educate the educated."

Offline

#9 2017-02-15 17:37:09

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

Sorry hmm

So I have followed again the GRUB tutorial which led me to this entry in the 40_custom grub file :

menuentry "Windows BIOS-MBR" {
	insmod part_msdos
	insmod ntfs
	insmod search_fs_uuid
	insmod ntldr     
	search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 24E29322E292F770
	ntldr /bootmgr
}

I removed the if statement because the entry wasn't showing up..

if [ "${grub_platform}" == "pc" ]; then... entry

My windows is in legacy mode so in BIOS-MBR mode I guess, and the bootmgr file is located on /dev/sda1.
To follow the tutorial, I had to mount the windows partition, it's not mounted by default, do I have to make it mount automatically for grub to work smoothly ?
Moreover, /dev/sdb is the first drive in the boot order, and I read somewhere that there was a command used to make windows as the first drive in grub (or something else along this idea..) ?

Now that the entry is showing up, I can run it, but I get the following error:

error : file "/boot/grub/x86_64-efi/ntldr.mod" not available
error : unable to locate the command "ntldr"

So I searched and apparently, it has something to do with the secure boot ? I didn't understood very well... But in any case, fast boot is disabled form my bios and from windows as well as Hibernation. My boot mode on my bios is UEFI+LEGACY.

After updating the grub custom file, I get this when I run grub-mkconfig :

❯ sudo grub-mkconfig -o /boot/grub/grub.cfg
Création du fichier de configuration GRUB…
Thème trouvé : /boot/grub/themes/Antergos-Default/theme.txt
Image Linux trouvée : /boot/vmlinuz-linux
Image mémoire initiale trouvée : /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
Image Linux trouvée : /boot/vmlinuz-linux-lts
Image mémoire initiale trouvée : /boot/initramfs-linux-lts.img
Found fallback initramfs image: /boot/initramfs-linux-lts-fallback.img
fait

Nothing about windows showing up... Do you any idea what I could have done wrong ?

Offline

#10 2017-02-19 10:34:36

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,297
Website

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

mindless wrote:

I read somewhere that there was a command used to make windows as the first drive in grub

That would be the drivemap command:

https://www.gnu.org/software/grub/manua … 02fWindows


Para todos todo, para nosotros nada

Offline

#11 2017-03-20 08:45:40

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: [SOLVED] Dualboot with Windows 10 (BIOS-MBR) and AL (GPT) on Grub 2

Ok so it finaly works ! I readed multiple times the wiki to understand what was the problem, as a newbie, that wasn't an easy task.

As said in the wiki, windows in BIOS-MBR is not compatible with archlinux in UEFI, so I converted my windows boot mode to UEFI, and now grub-mkconfig find correctly windows and add it to the menu smile

Thanks everyone for your help

Offline

Board footer

Powered by FluxBB