LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > rkelsen
User Name
Password

Notices


Rate this Entry

Slackware64 UEFI USB boot stick for installation

Posted 02-16-2022 at 10:32 PM by rkelsen
Updated 09-29-2023 at 02:28 AM by rkelsen

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 8300.
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 the 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 can find it on an ext4 partition on the same USB stick.

The trick with EFI booting 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.

On an older machine, 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."
Posted in Uncategorized
Views 1081 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    Hello 🤗
    I think you have a typo, 8200 is for swap, 8300 is for Linux.
    Posted 09-25-2023 at 09:36 AM by rizitis rizitis is offline
  2. Old Comment
    Yes, you're right! Many thanks.
    Posted 09-29-2023 at 02:28 AM by rkelsen rkelsen is offline
 

  



All times are GMT -5. The time now is 11:41 AM.

Main Menu
Advertisement
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