Porteus on UEFI-ONLY: rock solid boot!

Here you can post about your various experiences with PC hardware. You can also post about hardware that is not compatible with the linux kernel or not recommended for use with Porteus.
nanZor
Shogun
Shogun
Posts: 226
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.0 RC2 LXDE
Location: Los Angeles

Porteus on UEFI-ONLY: rock solid boot!

Post#1 by nanZor » 01 Jul 2019, 08:52

Just wanted to say thanks to the devs for making the X86_64 iso work right out of the box for UEFI-ONLY machines, and their built-in windows and linux install .bat or shells.

In addition, the built-in tools like "live-usb" installer and such never fail to produce a bootable image that can run without issue on my UEFI-Only boxes.

By UEFI-ONLY, I mean hardware that has absolutely NO CSM or legacy options - not even a greyed out option - they just aren't there. The only thing I do is disable secure-boot.

I've been testing a few other distro iso's, like the latest Slax (and others), and some of their own built-in windows batch files produce images that are just not detected on my Computesticks and Acer laptops that are uefi-only. That usually leaves me to resort to using 3rd-party bootloaders that chainload like YUMI-UEFI to get them to work.

For instance, following the same procedure with Slax that one would do with Porteus on windows to ensure that drive E: is properly prepared, goes through the motions, lights up the blinkenlights on the drive, but is invisible to my uefi-only gear.

Not so with Porteus - it is properly recognized and works out of the box, whether created by Windows, Linux, or later with it's own utilities. Of course, I'm only testing two of my own boxes, and there may be some other uefi-only issues on other hardware.

I don't know what sort of special-sauce Porteus uses in it's bootloader, but maybe the devs could pass what they are doing around a little bit. :)

Whoever is doing the syslinux boot configs in Porteus - my hat's off to you!
That's a UNIX book - cool. -Garth

nanZor
Shogun
Shogun
Posts: 226
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.0 RC2 LXDE
Location: Los Angeles

Porteus on UEFI-ONLY: rock solid boot!

Post#2 by nanZor » 11 Jul 2019, 10:40

Honorable Mention:

Although I rely solely on the included usb burning utilties in the Porteus iso, or other utilities inside once running, I think this deserves honorable mention.

RUFUS will also burn perfectly well for a UEFI-ONLY machine like many of mine are. All you have to do is tell it the partition type is "GPT" in the dropdown, and not the default MBR. When asked after initiating the process, iso-mode, the default, is fine. When finished, nicely eject it, don't just yank it out. I prefer to download my Porteus iso's manually however.

What this means is that Rufus will not build a dual bios / uefi drive. You can only choose one partition type at a time.

And, you may also wish to choose for it NOT to create windows specific autorun.inf and icon files. BUT, the reason you may want to, and why it is not a security issue can be found in the faq:

https://github.com/pbatard/rufus/wiki/F ... _dangerous

Like I say, *I* don't need Rufus to do this job since Porteus' devs have made the process easy within itself.

HOWEVER, there may come a day when you have a Linux emergency (grin) and have to guide someone else over the phone on how to build it pronto so you can work together.

Advanced Drive Detection:
Along with the emergency type scenario, is the fact that out of all other similar utilities out there, Rufus has by far the best detection of corrupted drives I have ever seen - that is, some beater usb stick that has been formatted a thousand times, yanked out of drives - that other utils won't even acknowledge. Rufus will detect it 99% of the time regardless, and know what the correct capacity truly is.

You know what I mean - your 64gb drive that has been abused shows up as say only 17mb in Windows when you plug it in and when you reformat it in Windows it is still showing up as only 17mb? Yeah, that type of stuff. Rufus knows better than window does what the real story is.

One of the features is not just iso-burning, but one may also use the drop down for "non bootable" use for a normal partitioning process. I recommend doing this if you are forced to use trash usb sticks for some unknown reason. Then procede to do a burn with it.

A lot of words for something I don't need right? Well, something done well, just like Porteus, I think deserves a word or two.
That's a UNIX book - cool. -Garth

nanZor
Shogun
Shogun
Posts: 226
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.0 RC2 LXDE
Location: Los Angeles

Porteus on UEFI-ONLY: rock solid boot!

Post#3 by nanZor » 17 Mar 2021, 08:24

Two years later, and an even *easier* method for uefi machines is found:

Heh, READ the USB_INSTALLATION.txt file !

I had been so ingrained with using either DD from the commandline, in-distro tools, or even 3rd party tools that I couldn't believe how easy it was when you read the directions. :)

I'm running the 5.0 RC2 LXDE version for the time being. I haven't tested earlier versions.

1) Got a stick formatted Fat32? Fine.
2) Mount the porteus iso, and merely copy the EFI, boot, and porteus directories onto it.
3) Reboot, and choose your new stick.

What sort of boot-sorcery is this?!?

I was flabbergasted, but somewhat embarassed to admit that I had actually seen the docs, but glossed over them thinking I was an expert. Not so apparently.

Anyway, I'm freaked out that this works so simply and easily on 7 different machines that either have uefi enabled, or are uefi-only. Not a hiccup. Awesome - thanks devs!!
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 6334
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 4.0 & 5.0rc3 ISOs
Location: Western NY, USA

Porteus on UEFI-ONLY: rock solid boot!

Post#4 by Ed_P » 17 Mar 2021, 15:29

:lol: Good follow up nanZor. :D
Ed

nanZor
Shogun
Shogun
Posts: 226
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.0 RC2 LXDE
Location: Los Angeles

Porteus on UEFI-ONLY: rock solid boot!

Post#5 by nanZor » 18 Mar 2021, 10:59

Thanks - didn't want to leave the impression that installation is hard, even though I tend to ramble.

The example above is by far the simplest way, and either means using a save.dat file on the stick itself, or of course pointing changes to another filesystem - but it may not be the best, but it can get one started kicking the tires.

The beauty is that the flexibility of Porteus means you have many options - like having two partitions on the stick, one fat32 and another of your choice like ext*, reiserfs - whatever. Easily handled by Gparted or any other favorite tool for shrinking / creating filesystems.

So while I like using DD, or the convenience of custom dev tools, or even 3rd party stuff, the fact that one can do this merely by copying the distro to the stick (for EFI systems) - means a LOT to me personally.
That's a UNIX book - cool. -Garth

rych
Shogun
Shogun
Posts: 227
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0rc3 x64 OpenBox
Location: NZ

Porteus on UEFI-ONLY: rock solid boot!

Post#6 by rych » 30 Jun 2021, 12:52

nanZor,
1) Got a stick formatted Fat32? Fine.
2) Mount the porteus iso, and merely copy the EFI, boot, and porteus directories onto it.
3) Reboot, and choose your new stick.
Don't we have to conclude that with the 4*):

Code: Select all

./Porteus-installer-for-Linux.com OR Porteus-installer-for-Windows.exe?

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3122
Joined: 20 Mar 2012, 03:42
Distribution: 5.0-current-64bit
Location: australia
Contact:

Porteus on UEFI-ONLY: rock solid boot!

Post#7 by ncmprhnsbl » 30 Jun 2021, 13:22

rych wrote:
30 Jun 2021, 12:52
Don't we have to conclude that with the 4*):
it's my impression, that that's only for legacy bios systems..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 6334
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 4.0 & 5.0rc3 ISOs
Location: Western NY, USA

Porteus on UEFI-ONLY: rock solid boot!

Post#8 by Ed_P » 30 Jun 2021, 17:36

But if one of them is run the USB drive will boot pretty much anywhere. BIOS or EFI. My new Porteus flash drive boots on both my systems, both 64-bit, one EFI, one non-EFI. :good:
Ed

raja
Shogun
Shogun
Posts: 344
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and Porteus-Artix-64
Location: Chennai,India

Porteus on UEFI-ONLY: rock solid boot!

Post#9 by raja » 01 Jul 2021, 08:34

BIOS in any modern PC can handle, both legacy bios and uefi.

So, I think, porteus syslinux bootloader uses only "legacy BIOS" mode.

For Syslinux to boot EFI only bios, a separate procedure is given in wiki.

Code: Select all

UEFI
For UEFI systems, the bootloader files included in the official Syslinux distribution archives are originally named syslinux.efi:

efi32/efi/syslinux.efi
UEFI bootloader for EFI IA32 (x86) firmware.
efi64/efi/syslinux.efi
UEFI bootloader for EFI X64 (x86_64) firmware.
The UEFI bootloader files can be renamed, usually maintaining the ".efi" filename extension.

In UEFI systems, a GPT scheme usually replaces the traditional MBR Partition Table for storage media. The GPT standard is part of the UEFI specification, and it can also be used with BIOS firmware (Syslinux includes "gptmbr*.bin" files for the latter).

For storage media, UEFI bootloaders are expected to be found in a so-called EFI SYSTEM PARTITION.

The EFI SYSTEM PARTITION (see UEFI and EFI System partition) is frequently known as "$ESP". The most commonly supported filesystem format for $ESP is FAT32, although the UEFI specs allow for others too. Each firmware might recognize additional / different / several filesystems for $ESP (e.g. other FAT variants, UDF, HPF+, NTFS,...).

According to the UEFI specs, the default location and naming conventions for storage media are:

EFI_SYSTEM_PARTITION/EFI/BOOT/BOOTIA32.EFI
for EFI IA32 firmware.
EFI_SYSTEM_PARTITION/EFI/BOOT/BOOTX64.EFI
for EFI X64 firmware.
The UEFI specs allow for additional alternative locations and names for UEFI binaries; the aforementioned are just the default location and naming conventions according to the UEFI specs, depending on the relevant firmware/architecture type.

Some firmware might use a different default location and naming for its default UEFI executable(s).

Note: According to the UEFI specs, the firmware uses backslash ("\") instead of slash ("/") characters as path separator.


The syslinux.efi bootloader files need at least a corresponding core module. Inside the official Syslinux distribution archives, the core modules for respective UEFI architectures are located as:

efi32/com32/elflink/ldlinux/ldlinux.e32
for EFI IA32.
efi64/com32/elflink/ldlinux/ldlinux.e64
for EFI X64.
There are no "installers" for syslinux.efi. Copy the relevant syslinux.efi file to an appropriate location, and rename it if necessary or desired. Additionally, copy the necessary core module file (either "ldlinux.e32" or "ldlinux.e64", according to the architecture of the firmware) to the same directory.
syslinux-6.04 xzm module is uploaded for reference and usage.
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.126 - 64 bit

rych
Shogun
Shogun
Posts: 227
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0rc3 x64 OpenBox
Location: NZ

Porteus on UEFI-ONLY: rock solid boot!

Post#10 by rych » 01 Jul 2021, 15:15

raja, not any modern apparently: "Some newer computers will only support "UEFI." It will not include an option for Legacy at all even with the latest BIOS version installed. This is normal, and it is working as expected" https://www.dell.com/support/kbdoc/en-n ... -boot-mode

And indeed I seem to have such a new DELL and I just UEFI-booted it with Porteus 5.0 rc2 FAT32 prepared with 1), 2), 3), 4*) steps as above. Next time I'll try to skip the 4*).

(The only problem is that when rebooting from OpenBox GUI it freezes instead at a black screen. But running poweroff at CLI does work. Maybe a random bug on a new DELL system only)

Ed_P On a different computer, I've tried to boot the same USB stick on a Legacy boot setting in BIOS and it fails with a message from SYSLINUX 4.06:

Code: Select all

vesamenu.c32: not a COM32R image
boot:
Changing the mode back to UEFI boots successfully.

My next big question: could I really somehow prepare a Porteus stick that would boot in both Legacy and UEFI? Otherwise I'll be forced to carry a separate stick for each system, UEFI and Legacy (we do have both old and new computers). I could start a new thread for this if you like.

Another problem to figure out is how to split FAT32 to also have an ext4 partition for porteus /changes and maybe modules too (?), leaving only the minimum required for booting (also an interesting experiment is to try exFAT instead of FAT32 but that's when all other problems are solved)

User avatar
M. Eerie
Shogun
Shogun
Posts: 303
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce x64

Porteus on UEFI-ONLY: rock solid boot!

Post#11 by M. Eerie » 01 Jul 2021, 18:15

rych wrote:
01 Jul 2021, 15:15
an interesting experiment is to try exFAT
Then you'll need a UEFI exFAT driver
Have a look at the main page for other drivers.

I'm having 2 USB sticks too. One for my HP desktop which supports BIOS legacy/UEFI, and one for a laptop EFI only system.

If I'm not mistaken, a default EFI system which includes a fallback method (as Ed_P script showed above) should suffice unless you're using a NON UEFI system.

May I suggest a "HOWTO BOOT" with updated methods? I mean, the USB_INSTALLATION.txt describes the procedures to get a bootable medium, but people seems to be confused about the various ways depending on filesystems, installation type, etc.

I think it would be very welcomed since times are changing and new users arrive all the time. And we must agree it is very frustrating to see other people work without a problem while they are in a endless loop.
This should be demystified once and for all...




:)
Cheers!

User avatar
Ed_P
Contributor
Contributor
Posts: 6334
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 4.0 & 5.0rc3 ISOs
Location: Western NY, USA

Porteus on UEFI-ONLY: rock solid boot!

Post#12 by Ed_P » 01 Jul 2021, 19:10

M. Eerie wrote:
01 Jul 2021, 18:15
If I'm not mistaken, a default EFI system which includes a fallback method (as Ed_P script showed above) should suffice unless you're using a NON UEFI system.
My Acer Aspire One 722 is not an EFI system nor an EFI system booting in BIOS Legacy mode, it's pure BIOS based and my Porteus USB drive boots on it. I see no reason to boot my Porteus USB drive on my EFI Dell Inspiron system in Legacy BIOS mode when it boots fine in EFI mode on it. The EFI does have Secure Boot disabled.
Ed

beny
Full of knowledge
Full of knowledge
Posts: 1049
Joined: 02 Jan 2011, 11:33
Location: italy

Porteus on UEFI-ONLY: rock solid boot!

Post#13 by beny » 01 Jul 2021, 19:21

hi rych when you have this massage:vesamenu.c32: not a COM32R image
boot:
have you hit the tab key? if show the boot option lines.

raja
Shogun
Shogun
Posts: 344
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and Porteus-Artix-64
Location: Chennai,India

Porteus on UEFI-ONLY: rock solid boot!

Post#14 by raja » 01 Jul 2021, 19:31

rych,

vesamenu error is due to different versions of bootloader and files in syslinux folder.

In porteus, bootloader is 4.07, and files 6.03.

If you can access, copy vesamenu from older version of porteus, 3.22 or 4.0 to /boot/syslinux folder. file size will be much bigger.

Hope in v5.0rc3 bootloader and other files are from same version of syslinux. syslinux-6.03 from kernel.org provides all files required.

Partition:

load gparted in v5.0rc2. Will not load from menu due to gksu error.

under root in terminal /usr/bin/gparted will get you gparted.

choose your new disk in device selection

unmount

gparted will show free space.

choose new partition
fix size as 1gb
partition type fat32

choose again new partition
gparted will show balance free space
choose new partition
partition type ext4

check info in gparted

/dev/sdc1 1gb size as fat32
/dev/sdc2 balance size as ext4

if you are satisfied and information is correct.

apply (two pending jobs will be executed.

your usb disk is ready.

EFI:

when we install syslinux, in mbr partition, will tell boot loader to look for needed files in /boot/syslinux

there is no reference EFI folder.

BIOS will immediately switch to esp/EFI/microsoft bootloader and start loading windows, if there is no bootloader found in USB disk

Just to confirm, that bootx64.efi is used for boot in efi machine, add a small entry in MENU LABEL porteus-5.0rc2-EFI in porteus.cfg

and try in a uefi only machine.

If you see corrected menu label, I will agree that BIOS is directly looking at EFI folder in the USB disk. Other wise porteus menu from /boot/syslinux only is loaded. BIOS boot.
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.126 - 64 bit

User avatar
M. Eerie
Shogun
Shogun
Posts: 303
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce x64

Porteus on UEFI-ONLY: rock solid boot!

Post#15 by M. Eerie » 01 Jul 2021, 20:56

Ed_P wrote:
01 Jul 2021, 19:10
My Acer Aspire One 722 is not an EFI system
The real challenge is getting a USB drive that boots in all scenarios.

@rych
As for saving changes, there's no need to create a separate partition. In Porteus you can store your changes by creating a container file
Cheers!

Post Reply