LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-04-2016, 06:29 PM   #1
swider
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Rep: Reputation: Disabled
Slackware 14.2 , UEFI, Dual Booting


After few years of not using linux, I decided to come back to Slackware. I successfully installed new version, but I discovered that LILO is no longer option for me, as I have UEFI. I installed and configured grub using this video: https://www.youtube.com/watch?v=kBIWSEoWIkw ( important part starts at 10:00). The problem is when I try to load windows 10, I get two errors: no assignment and the other one that the file /EFI/Microsoft/Boot/bootmgfw.efi doesn't exist.
I tried to google the solution, but unfortunatelly I couldn't find anything useful, also I have never used grub, so I cannot figure out what is a problem ( btw. I tried to change number of a partition from 1-3 and that didn't help).
 
Old 07-06-2016, 03:13 AM   #2
sodamnmad
LQ Newbie
 
Registered: Sep 2003
Distribution: slackware
Posts: 19

Rep: Reputation: 2
i'm by no means an expert when it comes to efi but i discovered that after a typical slackware install you'll have /boot/efi/EFI/* and from the bios config screen you can add boot options. most likely it won't create a menu that you select from on each boot like lilo/grub add but during boot you can hit f12 and get a list of boot options. if you still have your windows efi stuff you might be able to get around that way. i haven't used windows in years so that's about as much as i can help you with.
 
Old 07-06-2016, 05:04 AM   #3
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 733Reputation: 733Reputation: 733Reputation: 733Reputation: 733Reputation: 733Reputation: 733
I don't boot into other OS's, so I'm speaking somewhat theoretically here (although I have done this with other distros), but essentially you should be using elilo (not lilo). I mean you can use GRUB, but I know nothing about that, so I'll keep going with elilo.

Information is here:
http://docs.slackware.com/howtos:sla...uefi_and_elilo

Once you have installed elilo, you can add an entry to point to your Windows partition or drive as an 'other' entry:

Code:
other = /dev/sda3
    label = windows
which basically just tells elilo to shove the boot responsibilities over to that drive/partition. Windows's boot loader or equivalent can take it from there.

Last edited by notKlaatu; 07-06-2016 at 06:24 AM.
 
1 members found this post helpful.
Old 07-06-2016, 09:38 AM   #4
JamesGT
Member
 
Registered: Oct 2009
Location: St. Louis, MO, USA
Distribution: Slackware64 Live
Posts: 300

Rep: Reputation: 51
My system is UEFI as well, but I changed the BIOS to allow legacy booting as well as disabling security boot...and everything installed and works as it should.
 
Old 07-06-2016, 03:27 PM   #5
swider
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
There was a long-ish delay between me asking question and this topic appearing on boards, in the meantime I solved my problem. All enries in my grub file had: hd0 as a disk and everything was working properly for slackware , but not windows. I entered grub console after another unsuccessful booting, I used ls -l command and it turned out that grub saw my disks as hd1, I changed the entry for windows and it works (I left it as hd0 for slackware and it also works, although both systems are on the same disk). Thanks for replays guys.
 
Old 07-06-2016, 04:43 PM   #6
sombragris
Senior Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 1,000

Rep: Reputation: 482Reputation: 482Reputation: 482Reputation: 482Reputation: 482
My machine is dual boot, win10 and slack-current. I use grub.

To recognize the windows partition, I edited /etc/grub.d/40_custom in this way:

Code:
[eduardo:/etc/grub.d]$ cat 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 10" {
    set root='(hd0,gpt2)'
    chainloader /EFI/microsoft/Boot/bootmgfw.efi
}

[eduardo:/etc/grub.d]$
Then, after each kernel upgrade, I run the following command (as root):

Code:
# grub-mkconfig -o /boot/grub/grub.cfg
The problem with this setup is that it is relative. That is, if you happen to boot your system with a USB drive connected, for example, and you're screwed. Windows won't boot. Make sure any USB external storage drive is unplugged before booting. I may make it absolute yet, but that would mean using these outrageous UUID numbers which are loathsome in extreme.

Hope this helps. I have been planning to write about how to set up a win10/slack dual boot box for some time by using UEFI. The fact is that documentation on ELILO and GRUB2 are sorely lacking in clarity. The best you can get is the Arch Linux docs, but even they are seriously obtuse to say the least.

Last edited by sombragris; 07-06-2016 at 04:45 PM.
 
1 members found this post helpful.
Old 07-06-2016, 07:48 PM   #7
slackb0t
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware64-current on Thinkpad Carbon X1
Posts: 264

Rep: Reputation: 63
I did not add the microsoft info to elilo because I do not use it often. This is not a solution to your problem but it might get you into windows at least until you figure it out.

when I want to get into windows I do the following:
Power on
Hit enter right away to interrupt the boot process
Hit f12 to select boot options
Choose Microsoft boot loader (or something like that)

This method works for my thinkpad... might be slightly different for others.
 
1 members found this post helpful.
Old 07-06-2016, 08:03 PM   #8
swider
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks guys for you replays, I already solved my problem and described what I had to do in the other thread, as I am new user apparently my threads and posts are checked by moderators before being visible for everybody( I thought I pressed wrong button and created a thread again) I will link the solution here as soon as the other one re-appears. (Short version, grub seems to be bugged, it auto-detects all partitions as partitions of disk hd0, but during booting it sees a disk as hda1, what is weird is the fact that all entries in the grub for linux have hd0 and it loads Slackware properly, but for Widnows I had to change disk to hd1 and I have only one hard disk in my laptop, very weird).

Last edited by swider; 07-06-2016 at 08:07 PM.
 
Old 08-03-2016, 10:32 AM   #9
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Rep: Reputation: 40
With this custom file and instruction from SlackDocs i did a fresh install of Slack 14.2 dual boot with a existing install of W10.
All working fine.



Quote:
Originally Posted by sombragris View Post
My machine is dual boot, win10 and slack-current. I use grub.

To recognize the windows partition, I edited /etc/grub.d/40_custom in this way:

Code:
[eduardo:/etc/grub.d]$ cat 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 10" {
    set root='(hd0,gpt2)'
    chainloader /EFI/microsoft/Boot/bootmgfw.efi
}

[eduardo:/etc/grub.d]$
Then, after each kernel upgrade, I run the following command (as root):

Code:
# grub-mkconfig -o /boot/grub/grub.cfg
The problem with this setup is that it is relative. That is, if you happen to boot your system with a USB drive connected, for example, and you're screwed. Windows won't boot. Make sure any USB external storage drive is unplugged before booting. I may make it absolute yet, but that would mean using these outrageous UUID numbers which are loathsome in extreme.

Hope this helps. I have been planning to write about how to set up a win10/slack dual boot box for some time by using UEFI. The fact is that documentation on ELILO and GRUB2 are sorely lacking in clarity. The best you can get is the Arch Linux docs, but even they are seriously obtuse to say the least.
 
1 members found this post helpful.
Old 08-03-2016, 06:32 PM   #10
sombragris
Senior Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 1,000

Rep: Reputation: 482Reputation: 482Reputation: 482Reputation: 482Reputation: 482
Quote:
Originally Posted by frushiyama View Post
With this custom file and instruction from SlackDocs i did a fresh install of Slack 14.2 dual boot with a existing install of W10.
All working fine.
Glad to be of help!
 
1 members found this post helpful.
Old 11-25-2017, 06:26 PM   #11
dsanmartins
LQ Newbie
 
Registered: Sep 2017
Location: São Carlos, Brazil
Distribution: Slackware 14.2, VoidLinux
Posts: 9

Rep: Reputation: Disabled
This work for me.

Windows 8.1 and Slackware 14.2 (GPT partitions in different HD) and GRUB 2.0

-Windows is in /dev/sda and Linux in /dev/sdb

(1) Check uuid: where is Windows EFI (grub-probe --target=fs_uuid /mnt/EFI/Microsoft/Boot/bootmgfw.efi) remember to mount the partition, in this case in mnt (mount /dev/sda2 /mnt).

(2) Check hint_strings: grub-probe --target=hints_string /mnt/EFI/Microsoft/Boot/bootmgfw.efi


Then, edit the following file /etc/grub.d/40-custom and add these 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 THE RESULT FROM (2) UUID_NUMBER FROM (1)
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
In my case the result from (2) was
Code:
--hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2
Save the changes and run this command:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
That's all!, restart and go into windows.
 
Old 11-27-2017, 09:11 AM   #12
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Quote:
Originally Posted by swider View Post
After few years of not using linux, I decided to come back to Slackware...

I have never used grub
Same here, I have never used grub, because Slackware always used lilo and I've never needed to boot Windows as well, until this new computer that came with it preinstalled and I've decided to keep Windows as secondary toy OS. I installed Slackware64-14.2 in addition to Windows 10 (both in UEFI mode, Slackware installed elilo) and from Slackware I have installed rEFInd (you can find it on slackbuilds.org). rEFInd boots both systems fine, I did not have to make any manual settings.

Last edited by FlinchX; 11-27-2017 at 09:11 AM. Reason: added more details
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Booting Problem with UEFI disabled, Legacy enabled LasVegasUser Linux - Newbie 11 05-28-2017 10:32 PM
[SOLVED] Problems booting Slackware 14.1 fresh install with UEFI spudgunner Slackware 9 11-20-2013 08:13 AM
Booting Slackware 14 with UEFI and GPT rkelsen Slackware 4 02-10-2013 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration