LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 11-16-2013, 03:49 PM   #1
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Rep: Reputation: 20
Problems booting Slackware 14.1 fresh install with UEFI


So I managed to get an installed Slackware64 14.1 system installed today, but I have some problems wiht regards to UEFI that I'd like help resolving.

First off, I had to make a USB stick with the Slackware tree, using the included usbimg2disk.sh script available within the Slackware tree. However, I wasn't able to boot this install media using UEFI for some reason, but I booted it using the BIOS emulation on my motherboard (I think... the two options I had were "UEFI: Kingston..." and "USB: Kingston..."; the UEFI didn't work but the USB one did). So I got everything set up, the installer correctly detected and mounted my EFI system partition, and packages were installed. I made the USB boot disk as recommended. LILO comes up for installation, but there's nothing on it about "not being recommended" as is suggested in README_UEFI.TXT and I never got a menu prompt for ELILO or GRUB2 or anything after skiping the normal LILO install.

So, my install is completed and the USB boot disk does work using UEFI boot, so I can get into my Slackware install and as far as I can tell, everything works fine. So how go about installing GRUB2 or ELILO to the EFI system partition so I can dual boot Slackware and Windows? And is the usbimg2disk.sh actually intended to make a UEFI bootable USB disk?

Thanks.
 
Old 11-16-2013, 04:27 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
The installer proposes to run ELILO only if it finds an EFI firmware. As that was not the case it proposed you to run LILO instead, even though you had an EFI partition. This is not caused by using usbimg2disk.sh as the installer it puts on the USB stick is exactly the same as if you make an USB stick with 'dd' or use an installer on CD/DVD . Only difference between CD/DVD and USB installation in case of EFI firmware is that GRUB is used to boot the installer if CD/DVD media is used, elilo if USB (unless you make an hybrid installer with the DVD ISO image, then grub will be used even if you burn the ISO image on an USB stick :-)

Last edited by Didier Spaier; 11-16-2013 at 04:33 PM.
 
Old 11-16-2013, 10:03 PM   #3
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
So I did a quick reinstall and it seems that the EFI firmware isn't there when I boot from USB, which I assumed is because I'm not booting the USB using UEFI (because the UEFI boot on it doesn't work for some reason). So I have to figure out what's wrong with my USB media, because the USB boot disk made during the install works fine in UEFI mode, and I have UEFI firmware when I boot my Slackware install from it.

Anyways, I did manage to get grub installed using the directions from Arch Linux. And I'm keeping all of my grub files within /boot/grub/ rather than on the EFI partition. I looked at this section to create a Windows entry, but I get an error saying that -hint-bios=hd1,gpt2 is not correct and /EFI/Microsoft/Boot/efibootmgfw.egi can't be found, which confuses me a little. hd1 = sdb, which is the disk I'm using for my install of both OS's, and gpt2 = sdb2 (second partition on disk) which is the EFI partition (though as I typing this, I'm wondering if the gpt numbering starts at 0 like the hd numbering... because if it does then I have to fix it).

As it's late where I am, I'm going to continue working on it tomorrow. I am going to attempt to install all of the grub files to the EFI partition instead of just /boot/grub/ and see if it makes a difference, along with that numbering change I mentioned earlier.
 
Old 11-17-2013, 11:16 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Well, I tried usbimg2disk.sh, no luck either to boot in a VM with an efi firmware.

I mounted the image and saw that the layout is as follow (only relevant part):
Code:
.
|-- slackware64-14.1/
|-- syslinux/
    |-- initrd
    |-- huge.s
    |-- EFI/
        |-- BOOT/
            |-- elilo.conf
We could have two problems here:
  1. IIRC, /EFI is expected to be at the root of the tree, not inside /syslinux
  2. In /syslinux/EFI/BOOT/elilo.conf paths of initrd and huge.s are indicated as /<filename>, instead of /syslinux/<filename>
I think that there is an easy fix: just write the EFI directory at the root of the tree, not in /syslinux.

IOW this layout should work:
Code:
.
|-- slackware64-14.1/
|-- syslinux/
|    |-- initrd
|    |-- huge.s
|-- EFI/
    |-- BOOT/
        |-- elilo.conf
At least that's what I did in slint when we shipped USB-only installers, and that works.

PS and change the paths in elilo.conf, or use hard links, e.g.
ln /syslinux/initrd /initrd

Last edited by Didier Spaier; 11-17-2013 at 11:36 AM.
 
1 members found this post helpful.
Old 11-17-2013, 01:20 PM   #5
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Ah, I will definitely keep this in mind in the future. I was a little curious that usbimg2disk.sh didn't write the EFI directory to the root of the drive because I thought it was nessecary... turns out I was right.

In the meantime, I deleted all the grub stuff I had in /boot and /boot/efi/EFI and did a grub-install to the EFI partition directly instead of /boot, and it worked! Slackware boots, Windows boots (it still complains that one of my hint lines are wrong, but at least it still boots Windows). Now I'm running into other problems though. When I boot Windows and restart, it automatically boots Windows again and it won't boot GRUB2 from the UEFI boot menu. The only way I can get back to GRUB is to entry to UEFI setup and change the boot order for GRUB to be first. Unless there's a known issue with Windows severely screwing with the UEFI setup when it does it's thing, I beleive it's my motherboard not implementing UEFI correctly (as I had this exact problem when using Arch Linux and EFISTUB).

Anyways, I'm going to try what you said to make a UEFI bootable USB stick and probably do a reinstall, encrpyting the partition this time. Thanks for the help!
 
Old 11-17-2013, 05:29 PM   #6
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by spudgunner View Post
When I boot Windows and restart, it automatically boots Windows again and it won't boot GRUB2 from the UEFI boot menu.
You have to set the default {bootmgr} using BCDEDIT:

For examples see here (point 10): http://www.rodsbooks.com/refind/installing.html#windows
 
1 members found this post helpful.
Old 11-18-2013, 07:12 AM   #7
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by jtsn View Post
You have to set the default {bootmgr} using BCDEDIT:

For examples see here (point 10): http://www.rodsbooks.com/refind/installing.html#windows
I'll be quite impressed if this works out for me. I killed a good chunk of a weekend a couple months back working on the exact same problem with Arch Linux and figured it was my motherboard being screwy.
 
Old 11-18-2013, 07:03 PM   #8
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Well guys, here's what I got:

@jtsn: It worked, and I couldn't be happier! I'll definitely be saving this in my box of tricks.

@Didier Spaier: Apparently you can't create symlinks on vfat filesystems. Editing lilo.conf also didn't work out for me. However, I figured if the directory struture was the same, except for it all being in /syslinux (since UEFI can't find the EFI folder in there), it would work. So I copied the entire contents of /syslinux to the root of the flash drive and the EFI boot now works properly! So thanks for pointing me in the right direction, I wouldn't have been able to figure it out otherwise.

Now that I'm confident that I have this whole EFI dual-boot-with-Windows thing figured out, time to reinstall to and encrpyted LVM. But I've done that before, so how bad can it be...
 
Old 11-19-2013, 02:48 PM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by spudgunner View Post
@Didier Spaier: Apparently you can't create symlinks on vfat filesystems.
That's right, sorry I forgot that. Meanwhile I could have pointed you on hybrid images available here.

Last edited by Didier Spaier; 11-21-2013 at 05:47 PM. Reason: Typo corrected
 
Old 11-20-2013, 07:13 AM   #10
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
No worries man. It all worked out for me and I learned something so it's all good.
 
  


Reply



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
Booting Slackware 14 with UEFI and GPT rkelsen Slackware 4 02-10-2013 05:43 AM
Slackware 14 fresh install problems *unknown* SlackFanForever Slackware 6 10-09-2012 03:56 PM
fresh install Slackware 12 with BCM4318 problems elvenson Slackware 5 09-29-2007 12:19 AM
Problems with launching programs in Fresh Slackware 10.0 Install Cecil Linux - Software 5 11-22-2004 10:24 PM
Problems booting a fresh gentoo install on onboard sata stoned Linux - Distributions 3 08-29-2004 05:43 AM

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

All times are GMT -5. The time now is 11:18 PM.

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