uefi boot usb tutorial
uefi boot usb tutorial
thought ide post a quick tutorial for getting porteus to boot on a usb drive with uefi bios boot option
in windows open command prompt as administrator
diskpart
list disk
select disk n
convert gpt
clean
create partition efi size=2000
now try to format this to fat32 with windows partition manager or gparted in linux.
then copy porteus EFI boot and porteus folder to your usb drive.
the key is getting the drive as a gpt disk which you should be able to do with diskpart.
The rest of the usb you can format as fat32 or if you go to linux ext4. the reason I used 2000mb is so you can have a working install with modules in porteus up to 2GB. then you can have other modules loaded from somewhere else.
when you boot porteus will boot off the usb. no need to run the install scripts. very easy
in windows open command prompt as administrator
diskpart
list disk
select disk n
convert gpt
clean
create partition efi size=2000
now try to format this to fat32 with windows partition manager or gparted in linux.
then copy porteus EFI boot and porteus folder to your usb drive.
the key is getting the drive as a gpt disk which you should be able to do with diskpart.
The rest of the usb you can format as fat32 or if you go to linux ext4. the reason I used 2000mb is so you can have a working install with modules in porteus up to 2GB. then you can have other modules loaded from somewhere else.
when you boot porteus will boot off the usb. no need to run the install scripts. very easy
uefi boot usb tutorial
Nice looks like a implementation of the mbr of the drive as well as creating a gpt boot section. yours is a little more cleaner than mine.
I managed to create the efi partition. so what you can do is also make a second partition and use the install porteus on windows or linux script for the second drive. then if youre on csm you can boot off the second partition. otherwise uefi will load your porteus as well.
I did that because I game on windows and it was annoying to switch from csm to secure boot all the time. the anticheat will kick your out if youre on csm.
then if you wanted you can also install grub2 to the efi partition then change the script to point to the first or second drive as well. this is partly why I did it this way I was messing with grub2 and how it works.
I managed to create the efi partition. so what you can do is also make a second partition and use the install porteus on windows or linux script for the second drive. then if youre on csm you can boot off the second partition. otherwise uefi will load your porteus as well.
I did that because I game on windows and it was annoying to switch from csm to secure boot all the time. the anticheat will kick your out if youre on csm.
then if you wanted you can also install grub2 to the efi partition then change the script to point to the first or second drive as well. this is partly why I did it this way I was messing with grub2 and how it works.
uefi boot usb tutorial
Hi dreadbird,
I just want to say a big thanks for this tutorial! It works very robustly on my newer Windows laptop (bought 2022), which has no CSM. My previous attempt using a normal FAT32 partition did not boot at all. It seems that newer machines are getting stricter about the presence of a real EFI-marked partition.
Some notes from my journey:
I just want to say a big thanks for this tutorial! It works very robustly on my newer Windows laptop (bought 2022), which has no CSM. My previous attempt using a normal FAT32 partition did not boot at all. It seems that newer machines are getting stricter about the presence of a real EFI-marked partition.
Some notes from my journey:
- I had a 32GB stick, so I made a 4GB EFI partition. that way, I have room for a larger save.dat file (2 GB).
- You can boot into Porteus from another device (e.g. CD) and use Porteus Installer to copy the files over, but ignore its outdated plea to install a bootloader - it is not needed!
- I split the remainder of the stick between an ext4 partition (for modules etc) and a FAT32 partition (for saving files for easy transfer to Windows).
- The ext4 partition gets mounted on startup as editable only by root for some reason.
- Theoretically, I think I could put my save.dat file in the ext4 partition, but given the above permissions issue, I don't want the extra complication. It is at least good as a temporary scratch space when I want to enlarge my save.dat file, and a place for optional modules.
- Ed_P
- Contributor
- Posts: 8954
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
uefi boot usb tutorial
1 GB should be more than enough but if your using it for transferring files to Windows 4GB maybe fine.
If /porteus is on the ext4 partition you don't need a save.dat file. Changes are saved in the /porteus/changes folder. And optional modules load fine from all formats, mine are on my NTFS hardrive.
uefi boot usb tutorial
Hi Ed_P, thanks for your reply! I guess we can discuss my case a little bit, I hope it will still be relevant to other readers attracted here by dreadbird's excellent base procedure.
I am quite interested in splitting files between the partitions if possible. I'd prefer to keep the EFI partition for its intended purpose, i.e. just boot stuff and not the whole OS. Have you done this yourself and succeeded? If yes, please can you share details of which files you put where, and snippets of any config file edits or scripts needed? (Surely something in the EFI partition must point to the ext4 partition, no?) I have scoured the forums a bit, but not yet found a good report of someone splitting Porteus files in this way. Perhaps we can work together on a nice community-generated tutorial.
- Ed_P
- Contributor
- Posts: 8954
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
uefi boot usb tutorial
Have you reviewed the Porteus ISO's USB_INSTALLATION.txt file?

Basically: EFI drive (FAT32): EFI/ & boot/, other drive (ext4): porteus/.
And to boot/syslinux/porteus.cfg's APPEND changes=/porteus: add from=/mnt/sd--/ where -- is your drive/partition letter/number.

uefi boot usb tutorial
Ahhh, thank you, I see! I will try that this week...
The only issue I have is that I do have one machine where the boot stick shows up as sdb, and another where it shows up as sda. So, using the from= cheatcode would reduce the portability of the stick somewhat. But if it's mostly used on one computer, it should be fine.
uefi boot usb tutorial
Ahhh, thank you, I see! I will try that this week...
The only issue I have is that I do have one machine where the boot stick shows up as sdb, and another where it shows up as sda. So, using the from= cheatcode would reduce the portability of the stick somewhat. But if it's mostly used on one computer, it should be fine. (And I have deliberately restricted the portability by creating a UEFI-only bootable.)
One question whose answer is not clear from USB_INSTALLATION.txt, nor from cheatcodes.txt:
If I'm referring to the device (from=/dev/sdb2) or the partition root (from=/mnt/sdb2), then should the partition root contain the porteus folder, or contain its contents? e.g. should porteus-v5.0-x86_64.cfg be found at /mnt/sdb2/porteus-v5.0-x86_64.cfg or at /mnt/sdb2/porteus/porteus-v5.0-x86_64.cfg ?
- ncmprhnsbl
- DEV Team
- Posts: 4289
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
uefi boot usb tutorial
this is where using UUID: (or to a lesser extent LABEL:) is useful.
eg. from=UUID:STrING-0F-ChARACtERS/path/folder or in your case just from=UUID:STrING-0F-ChARACtERS
to get your unique STrING-0F-ChARACtERS for your drive/partition you can use blkid : (as root)
Code: Select all
blkid /dev/sdb2 (or whatever it's mounted as)
the partition root should contain the porteus folder. ... porteus-v5.0-x86_64.cfg should be found at /mnt/sdb2/porteus/porteus-v5.0-x86_64.cfgpterid wrote: ↑24 Feb 2025, 00:43If I'm referring to the device (from=/dev/sdb2) or the partition root (from=/mnt/sdb2), then should the partition root contain the porteus folder, or contain its contents? e.g. should porteus-v5.0-x86_64.cfg be found at /mnt/sdb2/porteus-v5.0-x86_64.cfg or at /mnt/sdb2/porteus/porteus-v5.0-x86_64.cfg ?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- Ed_P
- Contributor
- Posts: 8954
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
uefi boot usb tutorial
What if your .cfg file is on /mnt/sda1?ncmprhnsbl wrote: ↑24 Feb 2025, 04:53the partition root should contain the porteus folder. ... porteus-v5.0-x86_64.cfg should be found at /mnt/sdb2/porteus/porteus-v5.0-x86_64.cfg
Code: Select all
guest@porteus:/mnt/sda1/porteus$ ls -on
total 112
drwxrwxrwx 2 1000 16384 Aug 8 2024 base/
-rwxrwxrwx 1 1000 1015 Nov 16 2019 make_iso.sh*
drwxrwxrwx 2 1000 16384 Jan 15 2024 modules/
drwxrwxrwx 2 1000 16384 Nov 16 2019 optional/
-rwxrwxrwx 1 1000 681 Nov 16 2019 porteus-v5.0-x86_64.cfg*
-rwxrwxrwx 1 1000 681 Nov 16 2019 porteus-v5.1-x86_64.cfg*
drwxrwxrwx 2 1000 16384 Nov 16 2019 rootcopy/
guest@porteus:/mnt/sda1/porteus$
guest@porteus:/mnt/sda1/porteus$ cat porteus-v5.0-x86_64.cfg
### This is the porteus config file.
### You may put cheatcodes here one per line.
### Cheatcodes must start at the beginning of the line (no space before).
### Any line with the "#" character at the start is ignored.
###
### For a list of cheatcodes check /usr/doc/porteus/cheatcodes.txt
### EXAMPLES
## This tells porteus whence to boot
# from=/mnt/sda2/porteus
:
:
guest@porteus:/mnt/sda1/porteus$

Yup, that happens. And when it does, before you click on the menu's Graphic Mode or Always Fresh Mode option click on the Tab key and edit the menu's APPEND line.

uefi boot usb tutorial
Thank you so much ncmprhnsbl! I now have Porteus on the ext4 partition (and so am rid of the need for save.dat), which I refer to by UUID, so it should work on any UEFI machine. Plus I have my big FAT32 partition for easy file transfer to Windows machines. I think this is just about the optimum Porteus setup for newer hardware. Excellent! I will be giving this one to my mother, who is as sick of Windows' poor performance and spyware as I am. 
