3

I've been using Ubuntu for a while and recently decided to start using Arch. I have both a 120GB SSD and 1TB HDD in my system. When installing Arch on my SSD, I created partitions for /boot /home / (root) as well as a swap partition. I also have Windows 10 installed on my HDD using the default partitions. I would like to be able to dual boot between the 2 operating systems. I installed GRUB to my SSD on /dev/sda, but now when I boot into GRUB, I only see the option to boot into Arch, not Windows. I was wondering how I could boot into Windows via GRUB.

I have a default "/etc/grub.d/40_custom" file:

#!/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 care
ful not to change
# the 'exec tail' line above.

When I run "lsblk", I get:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 111.8G  0 disk 
├─sda1   8:1    0   200M  0 part /boot
├─sda2   8:2    0    12G  0 part [SWAP]
├─sda3   8:3    0    25G  0 part /
└─sda4   8:4    0  74.6G  0 part /home
sdb      8:16   0 931.5G  0 disk 
├─sdb1   8:17   0   499M  0 part 
├─sdb2   8:18   0   100M  0 part 
├─sdb3   8:19   0    16M  0 part 
└─sdb4   8:20   0 930.9G  0 part

Running "fdisk -l" gives me:

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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: 47A5839B-C531-4BEE-A083-BD0C5CF4524A

Device       Start        End    Sectors   Size Type
/dev/sdb1     2048    1023999    1021952   499M Windows rec
/dev/sdb2  1024000    1228799     204800   100M EFI System
/dev/sdb3  1228800    1261567      32768    16M Microsoft r
/dev/sdb4  1261568 1953523711 1952262144 930.9G Microsoft b


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: dos
Disk identifier: 0x1c797ba1

Device     Boot    Start       End   Sectors  Size Id Type
/dev/sda1           2048    411647    409600  200M 83 Linux
/dev/sda2         411648  25577471  25165824   12G 83 Linux
/dev/sda3       25577472  78006271  52428800   25G 83 Linux
/dev/sda4       78006272 234441647 156435376 74.6G 83 Linux

Any help would be appreciated, thanks!

4
  • have you tried sudo update-grub?
    – dmb
    Commented Jun 12, 2018 at 16:57
  • When I try to run that command on Arch, it says that the command cannot be found. According to this: unix.stackexchange.com/questions/111889/…, the "# update-grup" command is referring to "# grub-mkconfig -o /boot/grub/grub.cfg" I've tried to run this command and it didn't solve the issue.
    – Jake
    Commented Jun 12, 2018 at 17:24
  • Then you should try with grub2 sudo grub2-mkconfig
    – dmb
    Commented Jun 12, 2018 at 18:24
  • Thanks for the help, I managed to fix it by fixing my MBR
    – Jake
    Commented Jun 17, 2018 at 18:45

1 Answer 1

2

As described here, you need to do the following (The following must be done as root on your Arch OS):

As I can assume from your Output /dev/sdb2 seems to be your Windows-Bootloader so the First step will be:

$ mkdir /mnt/windows
$ mount /dev/sdb2 /mnt/windows
$ grub-probe --target=fs_uuid /mnt/windows/EFI/Microsoft/Boot/bootmgfw.efi

Copy the Output of the last Command to a File and proceed with this:

$ grub-probe --target=hints_string /mnt/windows/EFI/Microsoft/Boot/bootmgfw.efi

Also copy the output to the File. After that run the following to unmount the Partition

$ umount /mnt/windows
$ rmdir /mnt/windows

After that open the File /boot/grub/custom.cfg with your preferred editor and add the Following Lines:

if [ "${grub_platform}" == "efi" ]; then
    menuentry "Microsoft Windows Vista/7/8/8.1 UEFI/GPT" {
        insmod part_gpt
        insmod fat
        insmod search_fs_uuid
        insmod chain
        search --fs-uuid --set=root $hints_string $fs_uuid
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
fi

Where $hints_string is the second Output and $fs_uuid is the first one.

At least run this to update your Grub:

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

After reboot your Grub should contain the Entry for Windows, for more information about how to configure your Grub see this Page

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .