UEFI problem

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
uyduruq
Black ninja
Black ninja
Posts: 32
Joined: 30 Sep 2012, 19:57
Distribution: 1.2

UEFI problem

Post#1 by uyduruq » 30 May 2013, 19:13

Hello,
Is it possible to boot porteus with other bootloaders which have uefi support instead of syslinux? If yes, how can I do this?

Because of uefi, I need to set bios everytime when I want to switch between Windows and Porteus. This is very annoying.

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: UEFI problem

Post#2 by Hamza » 30 May 2013, 20:11

Disable 'Secure Boot' in UEFI Advanced Settings.
NjVFQzY2Rg==

uyduruq
Black ninja
Black ninja
Posts: 32
Joined: 30 Sep 2012, 19:57
Distribution: 1.2

Re: UEFI problem

Post#3 by uyduruq » 30 May 2013, 21:57

Hi, It is not enough to disable secure boot. It needs additional setting; UEFI vs CSM. I have to switch between UEFI and CSM to switch Porteus vs Windows.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI problem

Post#4 by brokenman » 27 Aug 2013, 03:26

I now have Porteus booting on UEFI with secure boot enabled. I'll write up a HOWTO explaining how to achieve this. It takes a little hackery but in the end it works. My method does NOT involve writing ANYTHING to your firmware so it is less risky than some documented methods. You can also choose to have secure boot enabled or disabled. Personally I disable it, but it is nice to have the option.

The good news is we can now sign binaries in linux so future installers can support UEFI secure boot without too much user interaction.
How do i become super user?
Wear your underpants on the outside and put on a cape.

bour59
Samurai
Samurai
Posts: 118
Joined: 29 Dec 2010, 08:10
Distribution: porteus v3.2.2-xfce
Location: France

Re: UEFI problem

Post#5 by bour59 » 27 Aug 2013, 13:13

Good new !
my HP UEFI desktop was alone without Porteus
Thanks

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI problem

Post#6 by brokenman » 29 Aug 2013, 02:50

To create your Porteus UEFI USB device please download this script.

Step 1) Boot into the latest Porteus v2.1 in fresh mode
Step 2) Plug in your USB device
Step 3) Run the script AS ROOT: sh /path/to/create-efi-usb.sh

The result will be a UEFI bootable Porteus USB device. It will use the latest stable kernel compiled for EFI stub support.
I will write up a HOWTO for people that want to follow the procedure involved. The following HOWTO will include how to install Porteus to the hard drive and allow secure boot to load it on UEFI machines.

Please let me know how the process goes.

NOTE: The script will only run on a Porteus fresh mode (or save mode) install. It will download around 20Mb of files to install to your chosen USB device. The script does not mess with your UEFI firmware in any way. It also does not search any internal drive so to dual boot into windows from this USB you will need to modify refind.conf and add the word 'external' to line so it looks like this:
scanfor manual,external

After this your windows install may be detected and you may be able to boot into it.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3320
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: UEFI problem

Post#7 by Ed_P » 29 Aug 2013, 15:37

Wow!! VERY nice brokenman.

Not sure what "fresh mode" means, and not sure about what this script does to the USB drive. I run Porteus from a multi-boot USB drive, will this script change my multi-boot such that I only boot Porteus? And will the USB drive still run on non-UEFI machines?
Ed

bour59
Samurai
Samurai
Posts: 118
Joined: 29 Dec 2010, 08:10
Distribution: porteus v3.2.2-xfce
Location: France

Re: UEFI problem

Post#8 by bour59 » 29 Aug 2013, 16:01

Thanks for the script
for now my comments are (boot on cd -fresh - guest
root or guest login?
if root : all's ok until tar xzf $wrk not found
if guest : blkid not found (no usb device)
(tried in gui and cli)

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI problem

Post#9 by brokenman » 29 Aug 2013, 18:24

The script will remove EVERYTHING from the USB device and nuke the MBR. UEFI machines require a GUUID partition table in place of an MBR so use a USB device that you don't need to use for anything else other than booting on a UEFI machine.

You can reformat the USB device later by first removing the GPT using:

Code: Select all

parted /dev/sdx
mklabel msdos
quit
Then reformat using fdisk or whatever your choice of partition application is.

I havn't tested the script from a CD. Nothing is written to the porteus storage so I imagine it should be no problem. I tested it after booting into fresh mode as guest and opening a root console, then running the script. Please change tar xzf to tar xf

In short the script partitions the USB device with a 100Mb FAT32 partition as partition 1 and the rest as ext2 (partition 2). It then downloads and copies the boot files (and 3.10.9 kernel compiled with EFI stub) to the 100Mb partition. It then copies the 'porteus' folder from your existing running porteus onto the ext2 partition. On the 100Mb partition it uses the universal fallback bootloader EFI/BOOT/bootx64.efi
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3320
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: UEFI problem

Post#10 by Ed_P » 30 Aug 2013, 00:18

Any chance the formatting of the 2nd partition could be user selectable, ie ext2, FAT32, NTFS?

Does the UEFI bootloader support a menu function? Boot Porteus, Boot harddrive, Boot Recovery system, etc?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI problem

Post#11 by brokenman » 30 Aug 2013, 00:40

Eventually the default installer in porteus will include UEFI support and you can choose your preferred 2nd partition. I will also update this CLI script to do the same after it has been tested a little by people. Did it work for you?

If you prefer, for some reason, a FAT32 or NTFS partition for porteus you can simply format the second partition after running the wizard and then copy the porteus folder from your running porteus onto the newly formatted partition. You should then replace porteus/base/000-kernel.xzm with thisfile.
How do i become super user?
Wear your underpants on the outside and put on a cape.

bour59
Samurai
Samurai
Posts: 118
Joined: 29 Dec 2010, 08:10
Distribution: porteus v3.2.2-xfce
Location: France

Re: UEFI problem

Post#12 by bour59 » 02 Sep 2013, 16:09

@brokenman
"your installation has finished"
Simply modified in create shell the wget call
with --no-check-certificate

UEFI compatible USB device created with boot fresh on CD (guest)
then loging to root
now I've to test the uefi boot

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI problem

Post#13 by brokenman » 05 Sep 2013, 13:38

Any news? Was your UEFI mode boot successful?

I need someone to confirm it works so I can create a HOWTO for others. After this I will move on to installing to HD, and then installing to HD with secure boot enabled.
How do i become super user?
Wear your underpants on the outside and put on a cape.

bour59
Samurai
Samurai
Posts: 118
Joined: 29 Dec 2010, 08:10
Distribution: porteus v3.2.2-xfce
Location: France

Re: UEFI problem

Post#14 by bour59 » 05 Sep 2013, 17:02

For now I can't
I get this message (sorry but it is in french )

Code: Select all

Violation d'amorçage sécurisé
Une signature non valide a été détectée
Vérifiez la politique d'amorçage sécurisé dans Configuratin
I prefer not to translate , sure a french member of yout team can do
After that I don't know what to do .

User avatar
francois
Contributor
Contributor
Posts: 5080
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: UEFI problem

Post#15 by francois » 05 Sep 2013, 20:11

Giving a try to a decent translation:

Code: Select all

Violation d'amorçage sécurisé = violation of secure bootup
Une signature non valide a été détectée = non valid signature has been detected
Vérifiez la politique d'amorçage sécurisé dans Configuratin = You need to verify in configuration the settings of secure bootup
Voltaire: Le mieux est l'ennemi du bien.

Post Reply