LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Slackware 14.2 Dual boot with Windows 8.1 in GPT Partitions by using GRUB 2.0 (https://www.linuxquestions.org/questions/linux-newbie-8/slackware-14-2-dual-boot-with-windows-8-1-in-gpt-partitions-by-using-grub-2-0-a-4175618418/)

dsanmartins 11-26-2017 02:00 PM

Slackware 14.2 Dual boot with Windows 8.1 in GPT Partitions by using GRUB 2.0
 
Hi,

I want to share with you the way how I resolve an issue of GRUB 2.0, when somebody uses Slackware 14.2 in dual boot with windows in GPT partitons.

I have two SSD in my laptop, the first one with Windows 8.1 (/dev/sda) and the second one with Slackware 14.2.

Grub detects both SDD but it can not add automatically an entry for windows in its configuration files. I tried several ways to do that manually but none of them worked. Even by following the instructions of the slackwiki, it did not work.

So the first step was to know the uuid and hints_string (EFI partition in Windows). I mounted the windows efi partition in /mnt on linux:

Code:

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

With these informations, edit the file /etc/grub.d/40-custom and add the following lines:

Code:


menuentry "Microsoft Windows 8.1" {
        insmod part_gpt
        insmod fat
        insmod search_fs_uuid
        insmod chain
        search --fs-uuid --no-floppy --set=root YOUR_STRINGS  YOUR_UUID
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Then run (always as root)

Code:

grub-mkconfig -o /boot/grub/grub.cfg
And that's it, it works like a charm.

AwesomeMachine 11-26-2017 06:55 PM

Excellent job! That's exactly how to do it.


All times are GMT -5. The time now is 07:49 PM.