You are not logged in.

#1 2016-01-14 19:25:00

YouRik
Member
Registered: 2016-01-14
Posts: 4

[SOLVED] GRUB and Syslinux can't find Windows

Hi,

I have a problem that neither GRUB nor Syslinux can reliably find my Windows drive.
Sometimes they do boot into Windows when selecting it in the boot menu, but most of the time they don't. My idea was that the error might be connected to Windows' "fast start-up" so I disabled that but it had no effect.

My disk set up as lsblk, executed from my Arch Linux install, returns it is as follows:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
|-sda1   8:1    0  99.6G  0 part 
|-sda2   8:2    0   450M  0 part 
`-sda3   8:3    0 132.9G  0 part 
sdb      8:16   0 931.5G  0 disk 
`-sdb1   8:17   0 931.5G  0 part 
sdc      8:32   0 111.8G  0 disk 
`-sdc1   8:33   0 111.8G  0 part /
sdd      8:48   0 465.8G  0 disk 
`-sdd1   8:49   0 465.8G  0 part 
sr0     11:0    1  1024M  0 rom  

sda is my Windows SSD while sda1 contains my actual Windows installation and sda2 is the SYTEM_RESERVED.
sdc is my normal Arch Linux SSD.

This is my /boot/syslinux/syslinux.cfg:

 # Config file for Syslinux -
# /boot/syslinux/syslinux.cfg
#
# Comboot modules:
#   * menu.c32 - provides a text menu
#   * vesamenu.c32 - provides a graphical menu
#   * chain.c32 - chainload MBRs, partition boot sectors, Windows bootloaders
#   * hdt.c32 - hardware detection tool
#   * reboot.c32 - reboots the system
#
# To Use: Copy the respective files from /usr/lib/syslinux to /boot/syslinux.
# If /usr and /boot are on the same file system, symlink the files instead
# of copying them.
#
# If you do not use a menu, a 'boot:' prompt will be shown and the system
# will boot automatically after 5 seconds.
#
# Please review the wiki: https://wiki.archlinux.org/index.php/Syslinux
# The wiki provides further configuration examples

DEFAULT arch
PROMPT 0        # Set to 1 if you always want to display the boot: prompt
TIMEOUT 05
# You can create syslinux keymaps with the keytab-lilo tool
#KBDMAP de.ktl

# Menu Configuration
# Either menu.c32 or vesamenu32.c32 must be copied to /boot/syslinux
UI menu.c32
#UI vesamenu.c32

# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
MENU TITLE Arch Linux
#MENU BACKGROUND splash.png
MENU COLOR border       30;44   #40ffffff #a0000000 std
MENU COLOR title        1;36;44 #9033ccff #a0000000 std
MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel        37;44   #50ffffff #a0000000 std
MENU COLOR help         37;40   #c0ffffff #a0000000 std
MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07        37;40   #90ffffff #a0000000 std
MENU COLOR tabmsg       31;40   #30ffffff #00000000 std

# boot sections follow
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sdc1 rw
    INITRD ../intel-ucode.img,../initramfs-linux.img

LABEL archfallback
    MENU LABEL Arch Linux Fallback
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sdc1 rw
    INITRD ../initramfs-linux-fallback.img

LABEL windows
        MENU LABEL Windows
        COM32 chain.c32
        APPEND hd0 1

LABEL hdt
        MENU LABEL HDT (Hardware Detection Tool)
        COM32 hdt.c32

LABEL reboot
        MENU LABEL Reboot
        COM32 reboot.c32

LABEL poweroff
        MENU LABEL Poweroff
        COM32 poweroff.c32

When trying to boot Windows from Syslinux, most of the time, it simply refuses and gets back into the boot menu, then booting into the primary option being Arch Linux.

And in GRUB I added a Windows menu entry by adding the following to /etc/grub.d/40_custom:

if [ "${grub_platform}" == "pc" ]; then
  menuentry "Microsoft Windows 10" {
    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 467CC08F7CC07B67
    ntldr /bootmgr
  }
fi

When trying to boot Windows from GRUB, most of the time, it returns: "error: no such device: 467CC08F7CC07B67." "error: file 'bootmgr' not found."


Both, Syslinux and GRUB are installed to sdc.


Anyway, I have tried using different parameters in Syslinux and GRUB for the Windows hard drive, I went through hd0,1;hd0,2;hd1,1;hd1,2 and have changed the UUID to the actual Windows installation partition and the SYSTEM_RESERVED and none of them have helped.

Last but not least, I ran the HDT (Hardware Detection Tool) in Syslinux and have found that sometimes all hard drives are detected (this is when booting Windows would work) and displayed and sometimes only the Arch Linux SSD is (which results in Windows not being booted).
So, I guess this is the root of the problem but I have no idea how I could fix this.

Would appreciate any help I can get!

Last edited by YouRik (2016-01-15 06:32:49)

Offline

#2 2016-01-14 21:16:23

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] GRUB and Syslinux can't find Windows

Honestly it sounds more of a hardware issue. How is the Windows drive connected?

Last edited by tom.ty89 (2016-01-14 21:16:32)

Offline

#3 2016-01-14 21:30:48

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [SOLVED] GRUB and Syslinux can't find Windows

It would be clearer if you post

$ blkid

do it good first, it will be faster than do it twice the saint wink

Offline

#4 2016-01-14 21:36:33

YouRik
Member
Registered: 2016-01-14
Posts: 4

Re: [SOLVED] GRUB and Syslinux can't find Windows

Thanks for your replies.

Both SSDs are connected to my motherboard via the SATA ports.

Windows drive: Port 2
Arch Linux: Port 5

(There are no issues booting Windows directly, bypassing the Linux bootloaders)



And this is what blkid returns:

$ sudo blkid 
/dev/sdb1: LABEL="SOFTWARE" UUID="1C22A78F22A76C88" TYPE="ntfs" PARTUUID="2ab466ca-01"
/dev/sda1: LABEL="WINDOWS" UUID="467CC08F7CC07B67" TYPE="ntfs" PARTUUID="edc674f2-01"
/dev/sda2: UUID="0E884FD1884FB64D" TYPE="ntfs" PARTUUID="edc674f2-02"
/dev/sda3: LABEL="SOFTWARE" UUID="8064404B644045DE" TYPE="ntfs" PARTUUID="edc674f2-03"
/dev/sdc1: UUID="7ba04402-7f22-4ed8-808d-2e886fb4cf1a" TYPE="ext4" PARTUUID="c6fc793d-01"
/dev/sdd1: LABEL="DATA" UUID="AEA649F1A649BA9B" TYPE="ntfs" PARTUUID="e1b79f9c-01"

Offline

#5 2016-01-14 21:36:54

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] GRUB and Syslinux can't find Windows

TheSaint wrote:

It would be clearer if you post

$ blkid

You probably want:

# blkid

Offline

#6 2016-01-14 21:45:20

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] GRUB and Syslinux can't find Windows

The only thing I can think of is your motherboard somehow does not initialize all the drives properly at early boot stage. If your BIOS/UEFI has an some "Fast Boot" option, maybe you can try to disable it and see if the problem persists. Also see if there's any suspicious option in SATA settings.

Btw does it happen more frequently / only when you perform a cold (re)boot?

Last edited by tom.ty89 (2016-01-14 21:48:21)

Offline

#7 2016-01-14 21:58:37

YouRik
Member
Registered: 2016-01-14
Posts: 4

Re: [SOLVED] GRUB and Syslinux can't find Windows

Thanks,

I've now disabled the "fast boot" option and it does indeed look like it might have fixed the issue.

Earlier I also thought of the motherboard/bios settings being an issue but then I couldn't find anything suspicious in the hard drive/boot settings and didn't even spend a second thought on the fast boot.
Also, since it sometimes recognized the drives and sometimes didn't, and I couldn't find any pattern (cold boot, warm boot, reboot, from windows to windows, from linux to windows etc. etc.) I kind of dismissed the idea of this being the source of the problem.

Anyway, thanks alot for your help so far! I will report back if the problem persists since I can't really tell if that's been it now.

Offline

#8 2016-01-14 23:37:24

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [SOLVED] GRUB and Syslinux can't find Windows

tom.ty89 wrote:

You probably want:

# blkid

Ehm, they're closed each other on the keyboard big_smile

Last edited by TheSaint (2016-01-15 00:15:46)


do it good first, it will be faster than do it twice the saint wink

Offline

Board footer

Powered by FluxBB