You are not logged in.
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
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
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
There is no grub-update command in Arch, you regenerate the grub config with...
grub-mkconfig -o /boot/grub/grub.cfg
Offline
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
Offline
This doesn't fix the problem. I still get the same error.
Offline
Someone to help me on this ?
Offline
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
Sorry
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
I read somewhere that there was a command used to make windows as the first drive in grub
That would be the drivemap command:
Para todos todo, para nosotros nada
Offline
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
Thanks everyone for your help
Offline