LinuxQuestions.org
Visit Jeremy's Blog.
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 08-21-2015, 04:37 PM   #1
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Easiest way to make a -current UEFI boot USB?


What's the easiest way to make a -current UEFI-boot USB stick?

I know that pkgtools offers to build one when you install Slackware. Is the preferred way to find that script and run it?

Last edited by dugan; 08-21-2015 at 04:44 PM.
 
Old 08-21-2015, 04:56 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,595
Blog Entries: 12

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
Doesn't that depend on the BIOS and what options it gives you? Break into the boot menu via F2, F10, F12 or DEL are the most command, disable fast boot, disable secure boot, and set it (if possible) to boot off of the detected USB device.
 
Old 08-21-2015, 05:05 PM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,021

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Hi Dugan,

The steps to making a UEFI USB boot stick are as follows:

1. Backup everything on the USB stick. All data on it will be deleted by following this procedure.
2. Using gdisk, delete all existing partitions.
3. Still in gdisk, create a partition 100 to 300 Mb in size.
4. Partition the rest of the space as you desire. (I'd probably make it all one partition).
5. Set the partition type of the first partition to "EFI System partition." (code EF00)
6. Set the partition types of the rest as you like. "Linux data" is code 8200.
7. Write the changes to the partition table and exit gdisk.
8. Format the first partition: mkfs.vfat /dev/sd?1
9. Format the second partition: mkfs.ext4 /dev/sd?2

The stick is now ready. All you have to do is copy the stuff onto it. Fortunately, everything you need is in the Slackware file tree.

My preference is to use Alien Bob's USB boot image & root filesystem from the "usb-and-pxe-installers" directory. To do this:

1. mount -o loop /path/to/slackware64-current/usb-and-pxe-installers/usbboot.img /mnt/loop
2. Copy everything from your mountpoint (/mnt/loop in my example) exactly as it is to the EFI system partition on our boot stick
3. Now, provided that you have a file called /path/to/media/usbstick/EFI/BOOT/BOOTX64.EFI on the stick, it'll boot.

The final step is to copy the slackware tree onto the second partition of the USB stick. The installer will look for it, and in my experience, can find it on an ext4 partition on the same USB stick.

Hope this helps mate. As you can see, it's not difficult. The trick is making sure that you have an EFI System partition with EFI/BOOT/BOOTX64.EFI in it.

The hard part will be working out how to make a boot menu appear on your machine. Once you know how to do this, the USB stick should automatically appear on it. Beware that some machines will only boot from a USB 2.0 socket, not a USB 3.0 socket. If you use rEFInd, it will automatically locate the USB stick and give you the option to boot it.

On my new laptop, I had to enter the UEFI setup and change the setting "Enable F10 boot menu," which was disabled by default. Then, pressing F10 a few times early in the boot stage would bring up a boot menu, which would give me the option to boot from the USB stick. I also had to disable "Secure Boot."

Thanks for all of your help with beautifying the appearance of fonts in Slackware on my machines over the years!

Last edited by rkelsen; 08-21-2015 at 05:25 PM.
 
10 members found this post helpful.
Old 08-21-2015, 05:26 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Original Poster
Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Quote:
Originally Posted by rtmistler View Post
Doesn't that depend on the BIOS and what options it gives you? Break into the boot menu via F2, F10, F12 or DEL are the most command, disable fast boot, disable secure boot, and set it (if possible) to boot off of the detected USB device.
I think you misunderstood the question. Somehow.

Last edited by dugan; 08-21-2015 at 05:29 PM.
 
Old 08-21-2015, 05:35 PM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Original Poster
Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Thanks rkelsen. I see that the mirrors have EFI/BOOT directories (e.g. http://ftp.oregonstate.edu/pub/slack...rent/EFI/BOOT/). I didn't realize that they'd be auto-detected if they're copied to an EFI partition, and I also didn't look at the contents of usbboot.img and thus didn't know that it was EFI-bootable.
 
Old 08-24-2015, 09:51 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Original Poster
Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Thank you, rkelsen. That was perfect in every detail. I've booted my USB stick and I'm going to install Slackware on my Macbook now.
 
Old 08-25-2015, 05:03 AM   #7
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,021

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Please tell me you'll call it the SlackMac...
 
Old 08-25-2015, 11:05 AM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Original Poster
Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Quote:
Originally Posted by rkelsen View Post
Please tell me you'll call it the SlackMac...
The hostname is just "mac", but "slackmac" is a good idea.
 
  


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
Boot live USB from Win8.1/UEFI jago25_98 Linux - Laptop and Netbook 5 03-29-2015 11:34 AM
Slint USB stick boot in UEFI mode ? xavi_slacky Slackware 3 01-13-2015 05:03 PM
Slackware64 14.1 on UEFI - no USB keyboard during boot flokofcgulls Slackware 8 03-11-2014 07:49 AM
[SOLVED] cannot boot usb installer in uefi mode BCarey Slackware 9 02-24-2014 02:20 AM
UEFI - is there a way to boot into a 'EFI Shell' using a usb stick/CD? nicolasdiogo Linux - Hardware 7 08-24-2011 06:29 AM

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

All times are GMT -5. The time now is 06:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration