LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-03-2012, 04:00 PM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
How to boot Slackware using Grub EFI


I have now got Slackware 14.0 booting using grub.efi. The advantage of this for me over elilo or my previous setup ( which was grub installed to the MBR of a second hard disk ) is that by default it brings up a menu and it will boot Windows. So far I have the boot disk on USB but the next stage when I am brave enough is to put this on by hard drive

What I did was as follows:
Follow the instructions here to create the usb stick. That is partition the USB drive with a GPT scheme having a FAT32 partition type code EF00

Add an ./EFI/BOOT/ structure to the drive.

Install grub2 using the slackbuild but modifying it by adding
Quote:
--with-platform=efi \
to ./configure



I then followed some of the instructions here

Mount the usb at /boot/efi

Quote:
# mount /dev/sdc1 -t vfat /boot/efi
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
Configure grub.cfg with
Quote:
grub-mkconfig -o /boot/grub/grub.cfg
This process created a file on the USB stick
/EFI/arch_grub/grubx64.efi. I found that my UEFI system was not seeing that so I copied it to /EFI/BOOT/bootx64.efi

I now was able to boot using UEFI from the USB via a grub menu. Grub.cfg needed manual editing to get the generic kernel as default and to add Windows.

This needs a little polishing up but I hope that people find it useful.

Alan
 
Old 11-03-2012, 04:15 PM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
Quote:
Originally Posted by arubin View Post
/EFI/arch_grub/grubx64.efi. I found that my UEFI system was not seeing that so I copied it to /EFI/BOOT/bootx64.efi
There are only certain directories that are checked for. Not sure on a full list but it can be found somewhere.

Using "BOOT" is a good default choice as it is pretty generic.
 
Old 11-03-2012, 07:00 PM   #3
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Original Poster
Rep: Reputation: 55
I am looking into booting of the hard drive. I have added my grubx86.efi as /efi/Slackware/bootx64.efi but that is not seen by my UEFI setup. I have managed to get into an efi shell and it seems that all it sees on the hard drive is /efi/microsoft/boot/bootmgr.efi

My alternatives are either to:
overwrite this with grubx86.efi
to figure out how to add the option to the efi boot manager using the efi shell
install efibootmgr and figure out how to do it with that.
 
Old 11-04-2012, 06:30 AM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Original Poster
Rep: Reputation: 55
So to get my UEFI system to see my new option for booting with grubx86.efi

Download efibootmger from here

untar it, change into the folder and run make
Copy src/efibootmgr/efibootmgr into /usr/sbin (I chowned it to root as well)

To do the rest one must have booted using UEFI

Mount the efi partition to /boot/efi

Quote:
mount /dev/sdXy -t vfat /boot/efi
where X = drive and y = partition

Quote:
modprobe efivars

efibootmgr -c -g -d /dev/sdX -p Y -w -L "Linux" -l '\EFI\Slackware\bootx64.efi'
where X = drive and y = partition

On next reboot Linux with grubx64.efi come up as an option on the boot menu.
 
  


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
Slackware vs. EFI/UEFI kikinovak Slackware 4 10-21-2012 11:31 AM
EFI boot issue. gr0undzer0 Linux - Software 9 09-09-2012 10:03 PM
EFI main GPT overwritten everytime (when windows 7 runs) - structure of EFI masuch Linux - Newbie 2 07-20-2012 02:49 PM
Ubuntu 11.04 EFI boot install issues juggy2 Ubuntu 0 08-17-2011 10:43 AM
EFI Compliant Grub raj010 Linux - Newbie 1 12-29-2010 04:05 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration