LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-23-2013, 05:16 PM   #91
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 294

Rep: Reputation: 31

I just finished burning slackware64-current; and to no avail it does not boot when the pc is in UEFI boot mode. However I am installing (BIOS mode ofcoarse) to test what, if any hardware is recognized that wasn't with the previous installation.

I did burn the rEFInd program to disk and that has no problem booting in UEFI mode though! Whats up with that? What would be the best way to compare the / directories of these two discs to see the differences? I'm sure it's something very simple thats causing this issue.
 
Old 03-23-2013, 05:22 PM   #92
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 294

Rep: Reputation: 31
Another note: I opted to make a usb boot stick but that doesnt work either and this was BIOS mode.
 
Old 03-23-2013, 05:32 PM   #93
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 778

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
I don't think it really matters on the install whether the system is in bios or efi or uefi mode. The magic is in how the efi partition is prepared for the reboot after the install. If you copy Pat's EFI directory to an efi partition and then set the efivars properly with efibootmgr so that partition is the default boot. The system will boot using UEFI.
Bob's your uncle!

john

Warning! copying Pat's EFI directory to your efi partition may overwrite your current boot method

NOTE: for efibootmgr to work you must already be booted into UEFI. Sort of a chicken or egg situtation.

john

Last edited by AlleyTrotter; 03-24-2013 at 03:56 AM. Reason: added warning
 
Old 03-23-2013, 07:33 PM   #94
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
My computer is an HP Pavilion p6-2378 with an AMD CPU.

I was able to create a DVD that my UEFI system can see as a boot-able disc. However the file "bootx64.efi" (ELILO) does not run. I even tried manually running it as an application. I can see the EFI directory in the El-Torito image on my UEFI system.

What is also interesting is that if I copy "bootx64.efi" file directly to my hard disk's "EFI/BOOT" folder, then ELILO will start up.

All of the EFI boot DVDs that I've seen use an El-Torito image with FAT12 and no larger than a floppy disk. I'm wondering if there is a problem with using ELILO on a CD because the size of the file-system has to be larger to include the kernel and initrd files. GRUB 2 doesn't have that situation because it doesn't look for files in the El-Torito image, and looks at the parent CD device using its own ISO file-system driver. Only the GRUB 2 boot file has to be in the El-Torito image.

I am able to boot other EFI discs on the computer, so I know that some of them will work with it.

Here is what I did to create the boot DVD.

Code:
#!/bin/sh
#
# Script to create a UEFI bootable Slackware DVD
#
SLACKFILES="slackware64-current"	# Slackware files to go on DVD
ESP="/tmp/esp"				# Temporary mount point for EFI System Partition
ESPIMG="[BOOT]/efiboot.img"		# Relative to root of DVD (do not put in EFI directory!)

# Create the EFI System Partition filesystem file
# NOTE: Adjust count= if file-system becomes full
dd if=/dev/zero of="$SLACKFILES/$ESPIMG" bs=2k count=17920
mkfs -t vfat -n "EFIBOOT" "$SLACKFILES/$ESPIMG"

# Mount the EFI System Partition filesystem
if [ ! -d "$ESP" ] ; then
  mkdir "$ESP"
fi
modprobe nls_iso8859-1
mount -t vfat -o loop "$SLACKFILES/$ESPIMG" "$ESP"

# Copy EFI boot files to EFI System Partition
cp -RP "$SLACKFILES/EFI" "$ESP/EFI"

# Unmount EFI System Partition
umount "$ESP"
if [ -d "$ESP" ] ; then
  rmdir "$ESP"
fi

# Create the ISO image for the DVD
# NOTE: -x "$SLACKFILES/EFI" for testing.
# NOTE: -x "$SLACKFILES/kernels" for testing.
# The EFI directory should not be required on the DVD
# since EFI reads the files from the El-Torito boot image
# not the ISO-9660 file-system on the DVD.
# Although some EFI systems can read ISO file-systems
# that is not a required part of EFI and should not be
# required for booting a DVD.
# The kernels directory was excluded to test that
# we are not booting using the BIOS and ISOLINUX.
mkisofs -o "slackuefi.iso" \
  -R -J -A "Slackware 64-bit Install" \
  -hide-rr-moved \
  -v -d -N \
  -eltorito-catalog "[BOOT]/boot.catalog" \
  -eltorito-platform x86 -no-emul-boot -boot-load-size 4 -boot-info-table \
  -eltorito-boot "isolinux/isolinux.bin" \
  -eltorito-alt-boot -eltorito-platform efi -no-emul-boot  \
  -eltorito-boot "$ESPIMG" \
  -sort "$SLACKFILES/isolinux/iso.sort" \
  -x "$SLACKFILES/EFI" \
  -x "$SLACKFILES/kernels" \
  "$SLACKFILES"
For reference, the script below creates a purely ISO DVD without the El-Torito image for EFI. With this DVD I did not see the EFI directory, and the DVD was not recognized as a boot-able disc by my system.

Code:
#!/bin/sh
#
# Script to create an ISO bootable Slackware DVD
#
SLACKFILES="slackware64-current"	# Slackware files to go on DVD

# Create the ISO image for the DVD
# NOTE: -x "\[BOOT\]/efiboot.img" for testing.
# This tests a purely ISO disk with no El-torito image for EFI
# The kernels directory was excluded to test that
# we are not booting using the BIOS and ISOLINUX.
mkisofs -o "slackiso.iso" \
  -R -J -A "Slackware 64-bit Install" \
  -hide-rr-moved \
  -v -d -N \
  -eltorito-catalog "[BOOT]/boot.catalog" \
  -eltorito-platform x86 -no-emul-boot -boot-load-size 4 -boot-info-table \
  -eltorito-boot "isolinux/isolinux.bin" \
  -sort "$SLACKFILES/isolinux/iso.sort" \
  -m "$SLACKFILES/\[BOOT\]/efiboot.img" \
  -x "$SLACKFILES/kernels" \
  "$SLACKFILES"
 
Old 03-23-2013, 07:43 PM   #95
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by Dman58 View Post
Another note: I opted to make a usb boot stick but that doesnt work either and this was BIOS mode.
If you're going to boot a USB stick in BIOS mode, then you have to make sure that you install LILO (not ELILO) to the USB disk and write a boot sector to the USB disk.

Also, some BIOS software will only recognize a USB disk as boot-able if it has more than one partition. Create a second small partition at the end of the disk if you don't want to use both partitions.
 
Old 03-23-2013, 07:56 PM   #96
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by AlleyTrotter View Post
I don't think it really matters on the install whether the system is in bios or efi or uefi mode. The magic is in how the efi partition is prepared for the reboot after the install. If you copy Pat's EFI directory to an efi partition and then set the efivars properly with efibootmgr so that partition is the default boot. The system will boot using UEFI.
Bob's your uncle!

john

Warning! copying Pat's EFI directory to your efi partition may overwrite your current boot method.
You are correct. As long as the kernel supports EFI then it doesn't matter whether it was installed using a system booted via BIOS or EFI. In fact EFI supports legacy MBR partitions, so it should be possible to boot in EFI mode without using a GPT. With an MBR partition table it is still necessary to create an EFI system partition so that EFI can find the boot loader.

Windows has the limitation that it must be installed in EFI mode to boot later in EFI mode. Windows requires a 64-bit CPU and a GPT for an EFI system. You also cannot boot Windows from a GPT disk unless it is running on a 64-bit EFI system. I found that out when I was considering updating my boot disk to a larger drive that would require a GPT.
 
Old 03-24-2013, 07:03 PM   #97
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
I was able to boot my system from a DVD using GRUB 2. I got the GRUB 2 menu and attempted to use the kernel in "huge.s". GRUB complains about booting in blind mode and then displays random garbage. I can't tell if Slackware has booted or not.

My suspicion is that there might be a size limit on the El-Torito boot image supported by UEFI. The GRUB 2 image is less than the size of a floppy disk. Due to the way ELILO works, it's image has to include the kernel and initrd, and that makes the image about 36 MB.

Here is how I was able to make a UEFI boot DVD with GRUB 2.

Code:
#!/bin/sh
#
# Script to create a UEFI bootable Slackware DVD
#
SLACKFILES="slackware64-current"	# Slackware files to go on DVD
ESP="/tmp/esp"				# Temporary mount point for EFI System Partition
ESPIMG="boot/grub/efi.img"		# Relative to root of DVD (do not put in EFI directory!)

# Create the EFI System Partition filesystem file
# NOTE: Adjust count= if file-system becomes full
dd if=/dev/zero of="$SLACKFILES/$ESPIMG" bs=2k count=720
mkfs -t vfat -n "EFIBOOT" "$SLACKFILES/$ESPIMG"

# Mount the EFI System Partition filesystem
if [ ! -d "$ESP" ] ; then
  mkdir "$ESP"
fi
modprobe nls_iso8859-1
mount -t vfat -o loop "$SLACKFILES/$ESPIMG" "$ESP"

# Copy GRUB boot file to EFI System Partition
mkdir -p "$ESP/EFI/BOOT"
cp "$SLACKFILES/boot/grub/grub.efi" "$ESP/EFI/BOOT/BOOTx64.EFI"

# Unmount EFI System Partition
umount "$ESP"
if [ -d "$ESP" ] ; then
  rmdir "$ESP"
fi

# Create the ISO image for the DVD
# NOTE:  -m "$SLACKFILES/boot/grub/grub.efi" for testing.
# The "grub.efi" file should not be required on the DVD
# since EFI reads that file from the El-Torito boot image
# not the ISO-9660 file-system on the DVD.
# NOTE: -x "$SLACKFILES/EFI" for testing.
# The EFI directory should not be required on the DVD
# since EFI reads the files from the El-Torito boot image
# not the ISO-9660 file-system on the DVD.
# Although some EFI systems can read ISO file-systems
# that is not a required part of EFI and should not be
# required for booting a DVD.
mkisofs -o "slackuefi.iso" \
  -R -J -A "Slackware 64-bit Install" \
  -hide-rr-moved \
  -v -d -N \
  -eltorito-catalog "boot.catalog" \
  -eltorito-platform x86 -no-emul-boot -boot-load-size 4 -boot-info-table \
  -eltorito-boot "isolinux/isolinux.bin" \
  -eltorito-alt-boot -eltorito-platform efi -no-emul-boot  \
  -eltorito-boot "$ESPIMG" \
  -sort "$SLACKFILES/isolinux/iso.sort" \
  -m "$SLACKFILES/boot/grub/grub.efi" \
  -x "$SLACKFILES/EFI" \
  "$SLACKFILES"
I had to include the required GRUB 2 files in "boot/grub" on the DVD. Essentially those are the configuration file and modules for GRUB. The GRUB program is loaded from "boot/grub/efi.img" since that is specified as the El-Torito image.

When you start GRUB from a CD or DVD on a UEFI system it sets the "root" a little bit differently than with a hard disk. The root is set to the ISO file-system and NOT the EFI system partition on the optical disc. So, there is no point in putting other files besides the GRUB program in the El-Torito image. GRUB will load the configuration file and any modules from the ISO file-system, not the EFI system partition in the El-Torito image. GRUB finds the ISO file-system using the parent device of the EFI system partition (I.E. the parent of the El-Torito image file-system device). The name assigned to the device in GRUB 2 is (cd0). I think that the only way to read other files from the El-Torito image would be to have GRUB mount it as a loop file-system.

For UEFI file-systems on other devices such as hard disks, GRUB sets the "root" to the file-system device for the EFI system partition (I.E. the partition) not the parent disk device. For regular hard disks you DO have to put the rest of the GRUB modules and files in the EFI system partition.

Although UEFI supports partitioned optical disks (using El-Torito images for partitions), GRUB does not recognize the EFI system partitions on the optical disks. I'm not suggesting that GRUB should recognize those partitions. The actual UEFI implementations seem to be quite limited in what they can do with EFI system partitions on optical disks. The only purpose for an EFI system partition on an optical disc is to contain a "/EFI/BOOT/BOOTx64.EFI" file or other boot program for EFI to boot the disc.

If you start up an EFI system with a boot DVD in the drive, but do not boot from the DVD, you will see that the El-Torito image on the DVD is handled by EFI as a partition. Start an EFI command prompt and you will see a file-system device, such as "FS2:" that allows you to access the files in the El-Torito image.

I have not looked at the ELILO source yet, so I can't say how EILLO handles EFI system partitions on optical discs. ELILO may be able to load files from an EFI system partition on an optical disc. That would allow ELILO to be used as the boot loader on an optical disc. However, the El-Torito image will be large, since it must contain the kernel and initrd files. Having a separate copy of those files in the El-Torito image wastes space on the optical disc.
 
Old 03-26-2013, 02:15 AM   #98
aaazen
Member
 
Registered: Dec 2009
Posts: 358

Rep: Reputation: Disabled
My system is a fairly recent amd64 Acer Aspire with 4 cores and 8Gb of ram.

I created an EFI image using FAT32 and then booted into a Slackware-current install DVD using EFI.

It did not work completely but it did EFI boot ELILO and it did read the kernel image.

It failed reading the initrd.img...

But perhaps it is a configuration problem in ELILO?

First create an EFI-imgs/efiboot.img image from the EFI/ directory:

Code:
#! /bin/ksh
set -e

IDIR='EFI'
ODIR='EFI-imgs'
OIMG='efiboot.img'

echo "Read the $IDIR directory and write a Fat32 image in $ODIR/$OIMG"

if [ ! -d $IDIR ]; then
  echo "Error, directory $IDIR is not here"
  exit 1
fi

# calculate the size in Megabytes of the EFI/ directory plus 1
let "OSIZE = `du -m -s EFI | awk '{print $1}'` + 1"

set -x
# create the output directory and a zero filled image file
mkdir           -p $ODIR    
dd if=/dev/zero of=$ODIR/$OIMG bs=1M count=$OSIZE 

# create a dos file system on the image file
mkdosfs -F 32 $ODIR/$OIMG

# mount the  dos filesystem on /mnt/tmp
mount -t vfat $ODIR/$OIMG /mnt/tmp

# copy the input directory to the filesystem
cp -a $IDIR               /mnt/tmp

# unmount the dos filesystem
umount                    /mnt/tmp
Then I used a modified version of Alien Bob's mirror-slackware-current.sh to create a DVD ISO image.

Here is the output readme_dvd.mkisofs:
Code:
  #
  # Slackware installation as DVD.
  #
  # Contains: bootable INSTALL DVD (including /extra and /source)
  #
  # Command used to create the ISO's for this DVD:
  # (see also /isolinux/README.TXT on the DVD you'll burn from the ISO)

  # DVD

  mkisofs -o slackware64-ripe-install-dvd.iso \
    -R -J -V "Slackware-ripe DVD" \
    -hide-rr-moved -hide-joliet-trans-tbl \
    -v -d -N -sort isolinux/iso.sort \
    -preparer "Slackware-ripe build for x86_64 by comet.berkeley" \
    -publisher "The Slackware Linux Project - http://www.slackware.com/" \
    -A "Slackware-ripe DVD - build 25_Mar_2013" \
    -x ./source  \
    -eltorito-boot isolinux/isolinux.bin \
    -eltorito-catalog isolinux/isolinux.boot \
    -no-emul-boot -boot-load-size 32 -boot-info-table \
    -eltorito-alt-boot \
    -eltorito-platform efi \
    -eltorito-boot EFI-imgs/efiboot.img \
    -no-emul-boot \
    .
Does ELILO work in an ISO9660 environment?

Last edited by aaazen; 03-26-2013 at 02:25 AM.
 
Old 03-26-2013, 03:24 AM   #99
aaazen
Member
 
Registered: Dec 2009
Posts: 358

Rep: Reputation: Disabled
Quote:
Originally Posted by comet.berkeley View Post
...

Does ELILO work in an ISO9660 environment?
ELILO was the problem! The ELILO version in the Slackware current DVD EFI/BOOT directory is smaller than the one in the current system /boot directory.

So I copied the /boot/elilo-x86_64.efi to the EFI/BOOT/bootx64.efi

And I got much further.

I re-created the EFI-imgs/efiboot.img file and re-created the iso-image and dvd.

It booted in EFI mode, loaded the kernel, loaded the initrd.img file and the kernel started to boot.

I saw many normal kernel messages before my screen was filled with a random graphic and I had to ctrl-alt-delete to get out...

Is it a video graphics driver problem? I'm not sure but it looked like it.

Last edited by aaazen; 03-26-2013 at 03:45 AM. Reason: highlight main point
 
Old 03-26-2013, 03:43 AM   #100
aaazen
Member
 
Registered: Dec 2009
Posts: 358

Rep: Reputation: Disabled
Quote:
Originally Posted by comet.berkeley View Post
Is it a video graphics driver problem?
Yes, it is a video graphics problem with this kernel.

When I boot the dvd using the normal isolinux then I get the exact same graphics problem so it is not an ELILO problem.

There is something in kernel 3.7.10 that does not like my amd64 Radeon graphics chips...

Normally I use kernel 3.9-rc4...
 
Old 03-26-2013, 09:35 AM   #101
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Thanks, Comet. I also got to that point using grub2. The display shows random graphics garbage. It was helpful to know that ELILO in the "EFI" directory is not working. That is what I used to test ELILO.

I think you have proven that ELILO will work if it is put in an alternate El-Torito image on the DVD. Of course the image also has to contain the kernel and initrd files. Except for wasting some space on the DVD that is not a big problem. I think it ends up being around 34 MB of extra space.
 
Old 03-26-2013, 01:41 PM   #102
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 778

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Limited Success

Using the method as described by comet.berkeley I had to make one change in the script the line
Quote:
cp -a $IDIR /mnt/tmp
spit out an error about can't preserve permissions on VFAT. So I changed it to cp -rv and the script built the image.
Pressing F11 from the UEFI boot message on my system brings up the boot device screen which displays the various options.
My DVD appeared as a normal dvd and also as UEFI-dvd so the system definitly sees it as a UEFI boot option. Naturally I selected the UEFI option and got this error
Code:
ELILO v3.14 for EFI/x86_64
.................................(many .'s)
bzImage.c(line 198):Could not read boot sector from huge.s.
elilo.c(line 84):Cannot find a loader for huge.s
so we are booting into elilo but an error in the kernel?

I also tried as your second post indicated to use the
Quote:
copied the /boot/elilo-x86_64.efi to the EFI/BOOT/bootx64.efi.
This got to the same first two lines as above and went back to the boot device chooser screen in the UEFI manager.
Lets just say it seems you guys are on the right track
AS far as graphics mine is onchip for Intel i5-3750k
John
PS using March 25 current

PPS Pat V. How did you build your elilo as it seems to work differently than the one used by Eric_FL, comet.berkeley and the one I built locally??

Last edited by AlleyTrotter; 03-26-2013 at 02:21 PM. Reason: added current date / question for PV
 
Old 03-26-2013, 01:42 PM   #103
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by comet.berkeley View Post

I saw many normal kernel messages before my screen was filled with a random graphic and I had to ctrl-alt-delete to get out...

Is it a video graphics driver problem? I'm not sure but it looked like it.
I had the exact same problem when I downloaded the 23-March-2013 version of Slackware64-current. Is there any way to avoid this problem so I can get to a root prompt?

P.S. I also have the Radeon graphics chip.

Last edited by 1337_powerslacker; 03-26-2013 at 01:43 PM. Reason: Added graphics configuration.
 
Old 03-26-2013, 02:45 PM   #104
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,454

Rep: Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347
Quote:
Originally Posted by Erik_FL View Post
I think you have proven that ELILO will work if it is put in an alternate El-Torito image on the DVD. Of course the image also has to contain the kernel and initrd files. Except for wasting some space on the DVD that is not a big problem. I think it ends up being around 34 MB of extra space.
Except that the image could be the same image as usbboot.img, in which case it won't take any additional space. The mkisofs mastering process won't repeat the image -- it will just map to where it already exists in the usb-and-pxe-installers/ directory.
 
Old 03-26-2013, 02:47 PM   #105
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,454

Rep: Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347Reputation: 8347
Quote:
Originally Posted by mattallmill View Post
I had the exact same problem when I downloaded the 23-March-2013 version of Slackware64-current. Is there any way to avoid this problem so I can get to a root prompt?

P.S. I also have the Radeon graphics chip.
Well, this ain't good. It's probably KMS which is failing. That was needed here to get past the video garbage on UEFI, but evidently on other systems it causes problems.

Maybe try passing nomodeset as a kernel option at boot and see how that goes?
 
1 members found this post helpful.
  


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 and Grub2 - getting a UEFI mb running linuxbird Slackware 16 12-13-2012 08:40 AM
Slackware on a former UEFI system garpu Slackware - Installation 2 11-23-2012 10:59 PM
Slackware vs. EFI/UEFI kikinovak Slackware 4 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

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

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