Talk:Create UEFI boot USB: Difference between revisions

From Alpine Linux
Line 23: Line 23:
     [[local root_size=]]
     [[local root_size=]]
to:
to:
     [[local root_size=${ROOT_SIZE}]]
     local root_size=${ROOT_SIZE}
Then
Then
   [[export SWAP_SIZE=0]]
   [[export SWAP_SIZE=0]]

Revision as of 14:59, 14 February 2018

Ideally, gummiboot [systemd-boot] should be replaced by grub2 now that it has been consumed by systemd. --OxR463 19:52, 2 June 2017 (UTC)

Hopefully I'm putting this in the correct spot, but I for one would also like to see instructions on configuring a UEFI bootable USB assuming there's already a boot manager such as rEFInd on the target system.Regards, Siernan (talk) 23:13, 14 August 2017 (UTC)

UEFI boot the easy way

I recently had a requirement for a small secure and complete Linux on a USB stick. In order to make it "future proof" the usb should be UEFI bootable. And as regular backups are needed the system should be a small as possible.

So after weeks of trial and error I discovered this:

In order to make the USB UEFI bootable issue the command:

export USE_EFI=YES

before running setup-alpine.

Shrinking the root partition was slightly more complex. Edit the "/sbin/setup-disk" script and change line 970 ( or thereabouts ) from:

   local root_size=

to:

   local root_size=${ROOT_SIZE}

Then

 export SWAP_SIZE=0
 export ROOT_SIZE=750

Before running setup-alpine as normal.

Then you have a less than 1GB fully fuctioning command line Linux which is boots UEFI only.

The setup script creates an annoying dummy swap file in /dev/sdX2 which can be safely removed.