LinuxQuestions.org
Help answer threads with 0 replies.
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 10-21-2014, 07:13 AM   #46
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu 16.04LTS
Posts: 47

Rep: Reputation: 2

Quote:
Originally Posted by Didier Spaier View Post
There's no reason to change anything in /boot/efi after an update of the elilo pacakage. Similarly you wouldn't need to change anything in /boot after an update of the lilo package.
Elilo is quite different from lilo. To update lilo code installed in MBR (or linux partition) you just run
Code:
/sbin/lilo
command when you update your kernel config or lilo itself. With elilo the actual executable code is in elilo.efi file on your EFI FAT32 partition and AFAIK there's no command equivalent to lilo to update it(we have just /sbin/eliloconfig and /sbin/eliloalt). The new code installed by the upgraded elilo package is unpacked to /boot and is not runnable by EFI until you copy it to your EFI partition(eliloconfig does this among other things). I would prefer to not use elilo at all, and just boot the EFI stub which is present even in generic kernel, but there are some problems with initrd and kernel config - so this cannot be done without rebuilding the kernel manually?
 
Old 11-01-2014, 08:11 PM   #47
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
You could also install rEFInd, which provides EFI filesystem drivers for ext2, so it can execute ELILO from your /boot or root partition. (UEFI = Unified Extensible Firmware Interface) With its help ELILO can then read its configuration file, kernel and initrd from a linux partition, too. So this setup allows you to keep everything outside the ESP without having to switch to uber-complicated GRUB2.
 
Old 11-02-2014, 04:25 AM   #48
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Very interesting thread with lots of useful information and excellent references!

I am slowly approaching this UEFI mountain, too, and haven't read all the useful references provided here. But as far as I did, I haven't seen advice, how to go about disk encryption including /root the partition. My (preliminary) conclusion is, that still everything is valid as described in README_CRYPT.TXT.
EDIT: Except partitioning using with gdisk rather than fdisk etc., and apart from using copying a few files to the EFI partition instead of installing lilo to the MBR, of course.

So I should avoid to encrypt /boot, right? And although it's not mentioned, I'd also avoid to encrypt the EFI System partition.

Is there anything else to be taken into account, not mentioned in the official documentation?

Thanks in advance

gargamel

Last edited by gargamel; 11-02-2014 at 05:50 AM. Reason: Correction
 
Old 11-02-2014, 05:54 AM   #49
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Another question I have: Is my understanding correct, that the order of installing systems for multiboot becomes less relevant with UEFI?

In the past it was always recommended to install MS Windows first, then Linux, because the Windows installer would wipe the boot record. With UEFI it should easily be possible to install Linux first, then Windows. Is this correct?

gargamel
 
Old 11-03-2014, 03:42 AM   #50
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Maybe check this out, EFI_Gentoo_End_to_End_Install, for some pointers about efi and encryption..

rob

BTW. I have windows in a virtual machine, saves to decide which OS to start ;-) And I ran in sleep/resume problems after I had activated some Windows-specific settings in the setup for my processor (Intel Smart Techn. and Rapid Start). These problems (direct resume from suspend) were described here XPS 13 wakes up from suspend spontaneously, and http://xps13-9333.appspot.com/#intel_rapid. There are modules in the kernel to take care for these settings but turning them off in the set-up seemed easier. But these could be relevant in the case you multiboot with windows (though not specific for uefi).

Last edited by brobr; 11-03-2014 at 11:19 AM.
 
Old 11-03-2014, 11:09 AM   #51
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,236

Original Poster
Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by gargamel View Post
Another question I have: Is my understanding correct, that the order of installing systems for multiboot becomes less relevant with UEFI?

In the past it was always recommended to install MS Windows first, then Linux, because the Windows installer would wipe the boot record. With UEFI it should easily be possible to install Linux first, then Windows. Is this correct?
That will be fine. You'll lose the advantage of having the Linux installer set up the boot menu, but you can always run efibootmanager from a boot disk to set it up later.
 
Old 11-06-2014, 10:46 PM   #52
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Thanks!
Unfortunately I am currently stuck, however: According to README_UEFI.TXT the installer is supposed to automatically pick up a previously created EFI partition with a FAT-32 file system, and -- after package installation and the LILO part finish -- to install an EFI bootloader, which it does not.

BTW, it's a brand-new machine with no pre-installed system. So there was no EFI partition, when I started my experiment to install Slackware64-14.1 on this machine.

When the installer finishes, I click on exit, and then:

Code:
# chroot /mnt
# cd /boot
# eliloconfig
System is not running under UEFI!
I guess this means that my install system hasn't been booted in UEFI mode. But why?
Also, according to some web resource a "bootable" flag should be set for the EFI partition. But how? I don't see a menu option for this in cgdisk.
I am asking, because the UEFI firmware detects UEFI enabled devices. When I insert my USB stick with the Windows 8 installation system, it is marked as "UEFI Boot", whereas the DVD in the DVD drive, the built-in hard disk and my Slackware64 USB stick are not. Whatever that means...

Thanks once more, your help is really appreciated.

gargamel

Last edited by gargamel; 11-07-2014 at 08:17 AM. Reason: Corrected message text, that System is not runnin under UEFI.
 
Old 11-07-2014, 01:01 AM   #53
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by gargamel View Post
Also, according to some web resource a "bootable" flag should be set for the EFI partition. But how? I don't see a menu option for this in cgdisk.
There is no "bootable" flag in GPT, so web resource you've read is incorrect.

Quote:
I guess this means that my install system hasn't been booted in UEFI mode. But why?
Only your system vendor knows

Quote:
When I insert my USB stick with the Windows 8 installation system, it is marked as "UEFI Boot", whereas the DVD in the DVD drive, the built-in hard disk and my Slackware64 USB stick are not.
Maybe your system only supports booting Windows 8 in UEFI mode.
 
Old 11-07-2014, 03:24 AM   #54
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by gargamel View Post
It's a brand-new machine with no pre-installed system. So there was no EFI partition, when I started my experiment to install Slackware64-14.1 on this machine.

When the installer finishes, I click on exit, and then:

Code:
# chroot /mnt
# cd /boot
# eliloconfig
System is not running in UEFI mode!
I guess this means that my install system hasn't been booted in UEFI mode. But why?
Hi, if I read this correctly, it looks that you have NOT created your EFI partition. In its absence elilo cannot place the files from /boot into that partition.

If that is the case, follow, after start-up from the installer-dvd, the instructions with respect to formatting/partioning your hard drive BEFORE setup. You need to know what device it is on (/dev/sda or /dev/sdb or so) and then
1) use gdisk (GPT fdisk) to create your EFI partition of about 100-200 Mib. If you already have other partitions AND the disc is in GPT format (prerequisite 1) then you could use parted to shrink an existing one to make space. Make sure to move the right border of a partition, making space behind it, that is much quicker than the other way round.
2) format this partition to fat32 and
3) set it to type ef00 (this you do with gdisk); which is the
Quote:
"bootable" flag ... for the EFI partition
.

After that you have to see what partition number this EFI partition got (/dev/sda2 or so) and use this to get it mounted under /boot/efi, either during setup when you are asked where to mount partitions or manually by editing /etc/fstab.

After that, I hope, you should be able to get elilo to install its stuff....

Cheers,

rob

Last edited by brobr; 11-07-2014 at 03:34 AM.
 
Old 11-07-2014, 04:19 AM   #55
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by jtsn View Post
There is no "bootable" flag in GPT, so web resource you've read is incorrect.
Thanks, I came to this conclusion, but wasn't quite sure about it.
Quote:
Originally Posted by jtsn View Post
Only your system vendor knows
I guess the error message I get from the command eliloconfig is correct, then. As far as I could find out there's no (other) reliable way to find out after booting.

Quote:
Originally Posted by jtsn View Post
Maybe your system only supports booting Windows 8 in UEFI mode.
Well, it somehow looks that way, although I'd be surprised. The mainboard is the highly popular ASUS B85M-G, with firmware of September, 2014. ASUS is usually not known for locking out Linux. But in case you are right: How would I go about it, then? Would this mean that effectively I cannot install Slackware with my intended LVM+LUKS setup on that machine?

gargamel
 
Old 11-07-2014, 05:27 AM   #56
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Hi Rob,

thanks for taking the time!

Quote:
Originally Posted by brobr View Post
Hi, if I read this correctly, it looks that you have NOT created your EFI partition. In its absence elilo cannot place the files from /boot into that partition.

If that is the case, follow, after start-up from the installer-dvd, the instructions with respect to formatting/partioning your hard drive BEFORE setup. You need to know what device it is on (/dev/sda or /dev/sdb or so) and then
1) use gdisk (GPT fdisk) to create your EFI partition of about 100-200 Mib. If you already have other partitions AND the disc is in GPT format (prerequisite 1) then you could use parted to shrink an existing one to make space. Make sure to move the right border of a partition, making space behind it, that is much quicker than the other way round.
2) format this partition to fat32 and
3) set it to type ef00 (this you do with gdisk); which is the .
I've done all of this, just that I used cgdisk instead of gdisk. But that shouldn't make a difference, does it? As a result, I have a GPT partitioning scheme, and the first partition is 512 MB of type EFI (ef00) and named EFI. The second partition is 160 MB of type Linux (8200). Finally I have a third partition of size ~400 GB and of type Linux LVM (8e00) that I want to be LUKS encrypted and put under LVM control.


Quote:
Originally Posted by brobr View Post
After that you have to see what partition number this EFI partition got (/dev/sda2 or so) and use this to get it mounted under /boot/efi, either during setup when you are asked where to mount partitions or manually by editing /etc/fstab.

After that, I hope, you should be able to get elilo to install its stuff....

Cheers,

rob
I think here is problem. After opening the LUKS container with my key phrase and activating the logical volumes (LVs) I run setup. The Slackware installer asks me to allocate LVs to mount points. Then it detects the EFI partition, writes an entry for it to /etc/fstab and mounts it. So running setup, right before the medium with the installation packages is to be chosen, I have (seen from the perspective of the installation system):
Code:
# mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/mapper/cryptvg-root on /mnt type ext4 (rw)
/dev/mapper/cryptvg-home on /mnt type ext4 (rw)
/dev/sda2 on /mnt/boot type ext2 (rw)
/dev/sda1 on /mnt/boot/efi type vfat (rw)
This looks correct to me. So maybe jtsn is right and my system can only boot some flavour of MS Windows in UEFI mode from a USB stick or DVD. This is where I am stuck. @jtsn: I am afraid you mean that the system can only boot MS Windows 7/8 in UEFI mode, regardless of the media --- that would be really bad!

Ideas, suggestions and comments welcome --- thanks again!

gargamel
 
Old 11-07-2014, 06:36 AM   #57
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Hi Gargamel,

Thanks for the info. Of course it seems much more complicated than what I assumed ;-)

In my wobbly efi-experience I noticed two things (and can also be deduced from the config scripts for elilo), during set-up uefi is not installed properly when any of the prerequisites is not satisfied. You have 1) GPT-formatted disk (check); 2) Efi partition (check), that gets mounted under /boot/efi (check).

So far so good in my experience. What I ran into was a formatting problem with the EFI partition. This was done in my case by gparted but after that I got errors about the vat32 format (see one of my previous posts, no 41 in this thread). Did you check with fsck whether your EFI is ok?

After skipping lilo-installation, were you able to run the script to setup elilo? or via (eliloconfig) from the command-line before rebooting?

This is from the /usr/sbin/eliloconfig script:
Code:
# If the system is not running under EFI, skip running this script:
...
# If there's no vfat mounted on /boot/efi or /mnt/boot/efi, forget it:
..
# Figure out the device and partition number of the ESP:
..
# There better be a kernel:
..

Did you reach this point:
Quote:
"INSTALL ELILO"
"ELILO is a Linux boot loader for EFI based systems. Installing ELILO will allow you to boot your Linux system from the hard drive after selecting it from the UEFI boot menu. Since an EFI System Partition was detected on this machine, it is recommended that you install ELILO now. Please select an option:"

"install" "Install ELILO on the EFI System Partition"
"skip" "Do not install ELILO"
After choosing "install" the required /EFI/Slackware directories are made, kernel stuff gets copied to the EFI partition and then you get asked whether a boot menu has to be made (which you want).

It would end with a message
Quote:
A Slackware boot entry has been installed to your EFI boot
menu
If not, the install has failed. Before rebooting you could check whether you run the system in Eufi mode by trying:
modprobe efivars and check whether /sys/firmware/efi/vars exists. Also worth checking whether there is anything copied to /boot/efi/EFI/Slackware.

Note: I do not remember wheter all these commands are available from the command-line during set-up or that you have to chroot to /mnt first (best in another TTY terminal with ALT+F2). I remember I had to run some of these commands in either environment to get it going, but that was with a system that was already installed (and mounted under /mnt) and outwith the setup program.

Hope this helps,

Cheers,

rob

[EDIT] Oh, and make sure that in your bios/uefi setup of the computer (reachable by F-something during boot) that the board is set to Uefi WITHOUT secure boot enabled. In my case I needed the OS to set to "Windows 8" as with the setting "Others" I ended up in the bios/lilo-mode and your system will not present itself as 'uefi' via the firmware. Actually this is prerequisite no 3 or 0...

Last edited by brobr; 11-07-2014 at 06:55 AM.
 
1 members found this post helpful.
Old 11-07-2014, 07:45 AM   #58
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Let's quote eliloconfig:
Code:
# If the system is not running under EFI, skip running this script:
if [ ! -d /sys/firmware/efi ]; then
  if [ "$T_PX" = "/" ]; then
    gettext "ERROR:  System is not running under UEFI."
    echo
  fi
  exit
fi
But you did that:
Code:
# chroot /mnt
# cd /boot
# eliloconfig
System is not running in UEFI mode!
My assumption is: as you didn't bind mount /sys before chrooting, after chrooting /sys is empty. So try this instead:
Code:
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc # may be unnecessary in this case, but doesn't hurt
mount --bind /dev /mnt/dev # idem
chroot /mnt
cd /boot
eliloconfig
You can check yourself that you have a /sys/firmware/efi directory before issuing eliloconfig.

PS I think that "cd /boot" is unnecessary.

Last edited by Didier Spaier; 11-07-2014 at 08:03 AM.
 
1 members found this post helpful.
Old 11-07-2014, 09:22 AM   #59
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
May or may not help

Adjust all of the below to match your system layout probably fs0:EFI/Slackware/

boot into Shellx64.efi ( this shell is either built into the bios or installed in an efi partition )

at the efishell prompt
fs0: [enter] puts you in dev sda efi partition ( adjust to your layout if necessary)
"<kernel_name> root=/dev/sda2 ro console=ttys0 [enter]"
boots /dev/sda2 in UEFI mode
afterlogging in as root do
"modprobe efivars"

from here you can use
efibootmgr to create an elilo boot option
cp /boot/elilo-x86_64.efi /boot/efi/EFI/Slackware/elilo.efi
create /boot/efi/EFI/Slackware/elilo.conf containing
Code:
prompt
timeout=50
default=huge

image=bzImage-huge
  label=huge
  read-only
  root=/dev/sda2
"efibootmgr -c -d /dev/sda -l "\EFI\Slackware\elilo.efi" -L Slackware -p 1"

Last edited by AlleyTrotter; 11-07-2014 at 09:50 AM.
 
Old 11-07-2014, 10:38 AM   #60
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by gargamel View Post
Well, it somehow looks that way, although I'd be surprised. The mainboard is the highly popular ASUS B85M-G, with firmware of September, 2014. ASUS is usually not known for locking out Linux.
UEFI and Secure Boot are requirements of the Windows Logo program and vendors are only implementing UEFI for this sole reason.

Quote:
But in case you are right: How would I go about it, then? Would this mean that effectively I cannot install Slackware with my intended LVM+LUKS setup on that machine?
You could install Slackware on a MBR disk and boot it with LILO.
 
1 members found this post helpful.
  


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] Dual boot Windows 8 and ubuntu on UEFI system enrico_dvchp Ubuntu 3 02-18-2013 12:10 AM
Slackware on a former UEFI system garpu Slackware - Installation 2 11-23-2012 10:59 PM
[SOLVED] Need advice installing slackware to a GPT/UEFI system arubin Slackware 38 10-21-2012 11:31 AM
Help Creating UEFI A MENU For My Bootable (BIOS/UEFI) CDROM ssenuta Linux - Hardware 0 08-27-2012 09:11 PM
/ file system 81% from 50% over the weekend. AZDAVE Mandriva 6 05-12-2004 08:58 AM

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

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