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 07-29-2012, 11:31 PM   #1
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Rep: Reputation: 36
Slackware and Grub2 - getting a UEFI mb running


I need some pointers for getting a system running.

I have run gpartd on a system with a UEFI mb, and have partitions laid out the way I would like them.

A kernel was built with UEFI support, particularly EFI frame buffer support.

I have the Slackware 32 bit current downloaded, and can boot from an install DVD.

Since grub2 appears to be the choice for booting, I'd like to install that, but it appears that there are several issues:
1. grub2 is not part of the Slackware suite (there is legacy grub, but grub2 is different)
2. lilo (part of Slackware) will not work
3. I'm not working on a virtual machine, so it's tough to wave my hand and move a disc from one machine to another.

Added: Oh, I also tried using ubuntu install cd to install grub2, but apparently there is not EFI frame buffer support on the boot cd.

So my question is: Can I install grub2, from a live CD, before I install Slackware. Then after installing Slackware, I can run grub2 again, and configure it to boot the Slackware kernel?

Last edited by linuxbird; 07-30-2012 at 12:09 AM. Reason: Add 2nd last paragraph on ubuntu boot cd
 
Old 07-30-2012, 01:02 AM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You have to install Slackware first, then grab Grub2 off SlackBuilds.org and install it's and it's dependencies.

The Slackware Install DVD should be able to boot just about any system as a rescue disk. If you can at least boot to the system you can grab Grub2 build it, install it, and get it working.

I am going to go out and say that LILO is getting near it's limit on support vectors.

File systems like BtrFS can be booted using Grub2 without a separate ext2/3/4 /boot partition if you use Grub2 and because more and more motherboards are implementing UEFI bioses which LILO can not boot to.

Learning Grub isn't hard as far as it's naming schemes. It's actually more inclined to the same naming scheme used by SCSI, SAS, and SATA drives. If you have HD 0,0 in Grub, it's basically translating to disk "A" partition "1", or basically sda1.

Plus you don't have to worry about reinstalling when you update your kernel or change a setting. You just need to edit the menu.lst and save it. It's very simple.

Last edited by ReaperX7; 07-30-2012 at 01:05 AM.
 
Old 07-30-2012, 07:06 AM   #3
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by ReaperX7 View Post
You have to install Slackware first, then grab Grub2 off SlackBuilds.org and install it's and it's dependencies.

The Slackware Install DVD should be able to boot just about any system as a rescue disk. If you can at least boot to the system you can grab Grub2 build it, install it, and get it working.



Plus you don't have to worry about reinstalling when you update your kernel or change a setting. You just need to edit the menu.lst and save it. It's very simple.
I have not been successful in booting an installed Slackware. I built a kernel which has UEFI support, including UEFI frame buffer, but when using the install DVD, to boot from a SATA or a USB (flash) drive, the kernel panics loading.

Also, with grub2, there is no menu.lst. However there is /boot/grub/grub.cfg

I also tried installing Slackware, without lilo, and then trying to setup grub2, using a Ubuntu 12.04 live/install disk. No joy. It ends up loading for quite some time, and then there is periodic disc activity, but no video. My theory is that it does not have UEFI frame buffer support compiled in, but I do not know that for sure. The graphics work during the selection of the boot, and then while installing the screen goes dead. (fbcon may not be compiled in)
 
Old 07-30-2012, 07:35 AM   #4
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
help maybe

I have never used this but it may be of some help
http://freedesktop.org/wiki/Software/gummiboot

john
 
Old 07-30-2012, 08:43 AM   #5
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by AlleyTrotter View Post
I have never used this but it may be of some help
http://freedesktop.org/wiki/Software/gummiboot

john
If I understand gummiboot, it manages boot loaders. Since grub2 is a boot loader, I thought I would stick to that, since it appears to have the functionality needed.

I can't believe more people haven't run into this...many of the new mb are UEFI. Different UEFI implementations have various "backward" compatibility modes, but the days of reading in a kernel and go, as in using the MBR, are over. Even from removable media such as flash drives.
 
Old 07-30-2012, 11:53 AM   #6
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 139Reputation: 139
There is also eLilo for UEFI, grub2 isn't the only option.
 
Old 07-30-2012, 02:38 PM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Here's a wiki page off ArchLinux's website. It may help you find out what is in the kernel and other system parameters, even with Slackware, to get your system bootable. Though Arch and Slack are different distributions both follow a similar structure and settings should transfer smoothly between both distributions.

https://wiki.archlinux.org/index.php...ware_Interface
 
Old 07-31-2012, 05:06 AM   #8
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by NyteOwl View Post
There is also eLilo for UEFI, grub2 isn't the only option.
True, but it appears that going to grub2 there will be more compatibility should other OS ever be installed. Also, I can find live distributions with grub2, and haven't found any with elilo.
 
Old 07-31-2012, 05:09 AM   #9
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by ReaperX7 View Post
Here's a wiki page off ArchLinux's website. It may help you find out what is in the kernel and other system parameters, even with Slackware, to get your system bootable. Though Arch and Slack are different distributions both follow a similar structure and settings should transfer smoothly between both distributions.

https://wiki.archlinux.org/index.php...ware_Interface
also,

https://help.ubuntu.com/community/UEFIBooting
 
Old 12-10-2012, 06:18 PM   #10
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current !
Posts: 342

Rep: Reputation: 59
Unhappy I am in such a box

Hello

I am in one of those new Lenovos (Z480), with a GPT disk and UEFI. I will be installing 32-bit Slackware (I know there is an x86_64 port. I just want to install good old x86 Slackware).

I successfully installed Slackware. Compiled kernel 3.6.9 from source (with everything efi compiled in i.e. efivars, stub, framebuffer and i made it relocatable), the kernel as a kernel is good so far. The problem is that I need to boot from the Slackware install CD every time. I tried using the efi stub first: the x64 firmware shell won't boot an x86 kernel. I tried elilo next. Complained about my kernel not being relocatable. So i built a relocatable kernel and then it loads the kernel and immediately reboots without loading Linux. (I have been testing everything using refind)

So i'm testing grub2. Downloaded and built it as per sbo slackbuilds. I took a look at the package before installing it, and I can't see the grub64.efi anywhere (I suspect it wasn't even built this arch being x86).

Next I will try dissecting a precompiled grub2 package so i can test if mine was built correctly.
 
Old 12-10-2012, 06:21 PM   #11
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current !
Posts: 342

Rep: Reputation: 59
Before someone asks that, i added noefi to the boot options to make sure i won't be getting a kernel panic
 
Old 12-10-2012, 10:04 PM   #12
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current !
Posts: 342

Rep: Reputation: 59
Unhappy Some hours after

I obtained a precompiled x64 grub loader that actually works (or at least "boots" and shows a menu and correctly reads grub.cfg).

My entries are as follows:

Code:
menuentry "Slackware Linux" --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod reiserfs
	set root='hd0,gpt6'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  83edd055-3005-4707-a9f4-feacf095d4df
	else
	  search --no-floppy --fs-uuid --set=root 83edd055-3005-4707-a9f4-feacf095d4df
	fi
	linux vmlinuz.efi root=UUID=83edd055-3005-4707-a9f4-feacf095d4df ro noefi
}

menuentry "Windows 8" --class windows --class os $menuentry_id_option 'osprober-chain-DE8415DB8415B6CD' {
	insmod part_gpt
	insmod ntfs
	set root='hd0,gpt4'
	insmod search_fs_uuid
	insmod chain
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  DE8415DB8415B6CD
	else
	  search --no-floppy --fs-uuid --set=root DE8415DB8415B6CD
	fi
 	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
None of them actually loads the OS.

I suspect I might have to specify hd0,gpt1 somewhere, as that is the EFI system partition.

By the way, GRUB mentions that it can't find either vmlinuz.efi or bootmgfw.efi. As they both are inside the EFI system partition, i wonder if there is a better way to specify their paths (vmlinuz.efi is in the same folder as grubx64.efi).

Last edited by folkenfanel; 12-10-2012 at 10:06 PM. Reason: i forgot to mention the error message from grub
 
Old 12-10-2012, 11:21 PM   #13
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current !
Posts: 342

Rep: Reputation: 59
Cool I won (almost)

I managed to get grub2 working i.e. actually loading both Slackware and Windows 8.

My grub2 entries are as follows: (I couldn't resist to trim some options i felt i didn't need - the simplest option should have been the right one)
Code:
menuentry "Slackware Linux" --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod reiserfs
	set root='hd0,gpt1'
	linux /EFI/slackware/vmlinuz.efi root=/dev/sda6 ro noefi
}

menuentry "Windows 8" --class windows --class os {
	insmod part_gpt
	insmod ntfs
	set root='hd0,gpt1'
	insmod search_fs_uuid
	insmod chain
 	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Now all I have left is to announce GRUB to the EFI. I have been loading it with a refind live CD, which also says when loading the shell, that just loading the startup.nsh script on the partition itself should work, as it did when i chose to start the EFI shell and load the startup.nsh.

As I'm using an x86 kernel i can not directly access the EFI vars. So I am forced to use the shell (using Windows to access the EFI is the last option). I tried to use bcfg but the shell (Tiano? 2.31 it says) does not have bcfg. I suspect the firmware is 2.31 but somehow the shell specification is 1.0. I tried to download an EFI shell, to load from the refind live CD, but as of now the Tiano sourceforge site is offline. (and all of sourceforge).

I might just replace bootx64.efi with GRUB. But that somehow doesn't feel right.
 
Old 12-11-2012, 04:13 AM   #14
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
Isn't there some confusion between two different things:

Grub2 which works using the MBR
grub.efi which uses uefi

I would check out these pages:

http://docs.slackware.com/howtos:sla..._uefi_hardware
http://docs.slackware.com/howtos:sla...based_hardware
 
Old 12-11-2012, 08:45 AM   #15
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
You need to download and run efibootmgr. You don't have to even install it just run the binary. This will place a boot option in the NVRAM for linux.
The efibootmgr is available at-- https://linux.dell.com/efibootmgr/
The default run will place a Linux elilo boot option in EFI NVRAM for /dev/sda called Linux which will appear in the UEFI boot page. You will need to set the -l option grub if you wish to use grub as your boot loader.
This is the one thing missing from the slackdocs page that was needed to get my AsRock z77 board working.
I use elilo as my boot loader, for me its simpler than grub
Hope this help
John
PS you must be booted under UEFI to alter the NVRAM. Kind of a chicken and egg thing. But since you are already booting under EFI you should have no problem.

Last edited by AlleyTrotter; 12-11-2012 at 08:48 AM. Reason: grub explanation
 
  


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
[SOLVED] GRUB2 build errors running slackware64-current (slackware 14) squid890 Slackware 10 07-02-2013 11:23 PM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
Using GRUB2 and want to boot Slackware in different resolution cwwilson721 Slackware 4 09-10-2010 10:51 PM
Starting slackware installer via grub2 jordanwb Slackware 3 08-31-2010 03:39 PM
[SOLVED] Trying to chainboot Slackware from Grub2 trumpet_tom Slackware 3 06-07-2010 11:35 AM

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

All times are GMT -5. The time now is 02:00 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