UEFI problem

Post here if you are a new Porteus member and you're looking for some help.
User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI problem

Post#16 by brokenman » 06 Sep 2013, 02:24

You need to enter your BIOS and disable 'secure boot'. You should only have UEFI enabled, but secure boot disabled at this stage. Secure boot is the next thing to tackle.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: UEFI problem

Post#17 by Ed_P » 27 Sep 2013, 00:41

Sorry to be so long getting back to you brokenman. I've finally bought a new flash drive.

Ok, following your instructions, I am booted in a fresh mode, ie no changes= parm, of RazorQT 2.1. I downloaded your script, figured out how to get into Command mode, LI got:X Terminal, and inputted the command:

sh /home/guest/Downloads/create-efi-usb.sh

and this is what I got:

guest@porteus:~$ sh /home/guest/Downloads/create-efi-usb.sh
ls: cannot access /mnt/isoloop/porteus/base: No such file or directory

#### WELCOME TO THE PORTEUS UEFI USB CREATOR ####
#### Type quit at any question to quit.
Script by Brokenman

gdisk was not found and is required to continue
Would you like to download it now [y/n]?


What do I do about the 2 error msgs? And why did I get them?

Thanks :)
Ed

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

Re: UEFI problem

Post#18 by Ed_P » 27 Sep 2013, 00:52

I replied Yes to the gdisk prompt and got this:

y
--2013-09-26 20:45:40-- https://dl.dropbox.com/s/pynrlyp87p6ipq ... 1alien.xzm
Resolving dl.dropbox.com (dl.dropbox.com)... 50.19.238.95
Connecting to dl.dropbox.com (dl.dropbox.com)|50.19.238.95|:443... connected.
WARNING: cannot verify dl.dropbox.com's certificate, issued by ‘/C=US/O=Thawte, Inc./CN=Thawte SSL CA’:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 FOUND
Location: https://dl.dropboxusercontent.com/s/pyn ... 1alien.xzm [following]
--2013-09-26 20:45:40-- https://dl.dropboxusercontent.com/s/pyn ... 1alien.xzm
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 23.21.250.170
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|23.21.250.170|:443... connected.
WARNING: cannot verify dl.dropboxusercontent.com's certificate, issued by ‘/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3’:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 139264 (136K) [application/octet-stream]
Saving to: ‘/home/guest/Downloads/efimods/gdisk-0.6.14-x86_64-1alien.xzm’

100%[======================================>] 139,264 62.9KB/s in 2.2s

2013-09-26 20:45:45 (62.9 KB/s) - ‘/home/guest/Downloads/efimods/gdisk-0.6.14-x86_64-1alien.xzm’ saved [139264/139264]

gdisk-0.6.14-x86_64-1alien.xzm: This is not a valid module


Plus a pop up windows that says:

Activate Error
gdisk-0.6.14-x86_64-1alien.xzm: This is not a valid module.

I closed the pop up windows and got:

gdisk-0.6.14-x86_64-1alien.xzm: This is not a valid module

/home/guest/Downloads/create-efi-usb.sh: line 139: blkid: command not found

Above is a list of your partitions.
Please enter the base path to your target USB device.
Example: /dev/sdc (no numbers)
>



This is not going well. :(
Ed

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

Re: UEFI problem

Post#19 by brokenman » 27 Sep 2013, 15:14

Thanks Ed. I've modified the script and uploaded. The script needs to be run as root so I've added a check for that.
Please try again. If anyone can test this and confirm it boots their UEFI system I will post a HOWTO on how to install Porteus to HD and enable 'secure boot' to Porteus.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: UEFI problem

Post#20 by Ed_P » 28 Sep 2013, 00:17

Newbie question, how do I, or can I signoff of Guest and signon as Root without rebooting?

And I intend on testing to completion now that I have the new USB flash drive.
Ed

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

Re: UEFI problem

Post#21 by brokenman » 28 Sep 2013, 00:29

It really depends on the desktop environment you are in. If you are indeed in Razor there should be a logout in the user menu. The when you get to the slim login manager screen you enter: root as user and toor as password.

If you want to force it you can use the keyboard combination ctrl+alt+F2 and then at the login prompt you can login as above and then type: startx
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: UEFI problem

Post#22 by Ed_P » 28 Sep 2013, 04:52

If you want to force it you can use the keyboard combination ctrl+alt+F2 and then at the login prompt you can login as above and then type: startx
Excellent!! It is what I used, and I suggest the script display this if the user is not root.

Ok, this is what I got as root.

Code: Select all

root@porteus:~# sh /root/Downloads/create-efi-usb.sh
ls: cannot access /mnt/isoloop/porteus/base: No such file or directory

#### WELCOME TO THE PORTEUS UEFI USB CREATOR ####
#### Type quit at any question to quit.
Script by Brokenman


/dev/sda1: LABEL="PQSERVICE" UUID="9894832D94830CC6" TYPE="ntfs" 
/dev/sda2: LABEL="SYSTEM RESERVED" UUID="ECF483DEF483AA02" TYPE="ntfs" 
/dev/sda3: LABEL="Acer" UUID="48168114168103E2" TYPE="ntfs" 
/dev/sda5: LABEL="Data" UUID="01CD20066B8BF780" TYPE="ntfs" 
/dev/sda6: LABEL="BKUPS" UUID="14E65B5EE65B3F64" TYPE="ntfs" 
/dev/sdb1: LABEL="PORTEUSUEFI" UUID="8952-182C" TYPE="vfat" 

Above is a list of your partitions.
Please enter the base path to your target USB device.
Example: /dev/sdc (no numbers)
> /dev/sdb
1
Target verified as removable

We will now format your USB /dev/sdb device with partition UUID's:
8952-182C
MAKE SURE YOU ARE CERTAIN!!
Would you like to continue? [y/n]
y

GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel msdos                                                    
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
(parted) quit                                                             
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************


Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): 
Command (? for help): Partition number (1-128, default 1): First sector (34-15240542, default = 2048) or {+-}size{KMGTP}: Last sector (2048-15240542, default = 15240542) or {+-}size{KMGTP}: Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'EFI System'

Command (? for help): Partition number (2-128, default 2): First sector (34-15240542, default = 206848) or {+-}size{KMGTP}: Last sector (206848-15240542, default = 15240542) or {+-}size{KMGTP}: Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): Hex code or GUID (L to show codes, Enter = 8300): Hex code or GUID (L to show codes, Enter = 8300): Hex code or GUID (L to show codes, Enter = 8300): mkfs.fat 3.0.22 (2013-07-19)
mke2fs 1.42.8 (20-Jun-2013)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

We will now download the required files (20Mb)from the internet.
Make sure you have an internet connection before continuing.
Press enter to continue

--2013-09-28 00:41:06--  https://dl.dropbox.com/s/1bsl2nqtfv1i01x/porteus-uefi-usb-template.tar.xz
Resolving dl.dropbox.com (dl.dropbox.com)... 184.73.185.158
Connecting to dl.dropbox.com (dl.dropbox.com)|184.73.185.158|:443... connected.
WARNING: cannot verify dl.dropbox.com's certificate, issued by ‘/C=US/O=Thawte, Inc./CN=Thawte SSL CA’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 FOUND
Location: https://dl.dropboxusercontent.com/s/1bsl2nqtfv1i01x/porteus-uefi-usb-template.tar.xz [following]
--2013-09-28 00:41:07--  https://dl.dropboxusercontent.com/s/1bsl2nqtfv1i01x/porteus-uefi-usb-template.tar.xz
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 23.23.104.199
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|23.23.104.199|:443... connected.
WARNING: cannot verify dl.dropboxusercontent.com's certificate, issued by ‘/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 3854716 (3.7M) [application/octet-stream]
Saving to: ‘/home/guest/Downloads/efimods/porteus-uefi-usb-template.tar.xz’

100%[==============================================================================================================================>] 3,854,716    127KB/s   in 27s    

2013-09-28 00:41:35 (140 KB/s) - ‘/home/guest/Downloads/efimods/porteus-uefi-usb-template.tar.xz’ saved [3854716/3854716]

--2013-09-28 00:41:35--  https://dl.dropbox.com/s/9nrwswxk1av5gaz/000-uefi-kernel.xzm
Resolving dl.dropbox.com (dl.dropbox.com)... 184.73.185.158
Connecting to dl.dropbox.com (dl.dropbox.com)|184.73.185.158|:443... connected.
WARNING: cannot verify dl.dropbox.com's certificate, issued by ‘/C=US/O=Thawte, Inc./CN=Thawte SSL CA’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 FOUND
Location: https://dl.dropboxusercontent.com/s/9nrwswxk1av5gaz/000-uefi-kernel.xzm [following]
--2013-09-28 00:41:35--  https://dl.dropboxusercontent.com/s/9nrwswxk1av5gaz/000-uefi-kernel.xzm
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 23.23.104.199
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|23.23.104.199|:443... connected.
WARNING: cannot verify dl.dropboxusercontent.com's certificate, issued by ‘/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 15429632 (15M) [application/octet-stream]
Saving to: ‘/home/guest/Downloads/efimods/000-uefi-kernel.xzm’

100%[==============================================================================================================================>] 15,429,632   113KB/s   in 1m 55s 

2013-09-28 00:43:31 (132 KB/s) - ‘/home/guest/Downloads/efimods/000-uefi-kernel.xzm’ saved [15429632/15429632]

ntfs-3g: Failed to access volume '/dev/sdb2': No such file or directory

ntfs-3g 2013.1.13 integrated FUSE 27 - Third Generation NTFS Driver
		Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2012 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options:  ro (read-only mount), windows_names, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

News, support and information:  http://tuxera.com
Creating EPS file structure ...
EFI/
EFI/BOOT/
EFI/BOOT/myicons/
EFI/BOOT/myicons/func_about.icns
EFI/BOOT/myicons/func_exit.icns
EFI/BOOT/myicons/func_reset.icns
EFI/BOOT/myicons/func_shutdown.icns
EFI/BOOT/myicons/porteus-bootloader.bmp
EFI/BOOT/myicons/porteus-fresh.png
EFI/BOOT/myicons/porteus-ram.png
EFI/BOOT/myicons/porteus-saved.png
EFI/BOOT/myicons/porteus-text.png
EFI/BOOT/bootx64.efi
EFI/BOOT/icons/
EFI/BOOT/icons/os_refind.icns
EFI/BOOT/icons/os_unknown.icns
EFI/BOOT/icons/vol_optical.icns
EFI/BOOT/icons/func_reset.icns
EFI/BOOT/icons/func_shutdown.icns
EFI/BOOT/icons/tool_part.icns
EFI/BOOT/icons/vol_internal.icns
EFI/BOOT/icons/tool_apple_rescue.icns
EFI/BOOT/icons/func_about.icns
EFI/BOOT/icons/boot_linux.icns
EFI/BOOT/icons/transparent.icns
EFI/BOOT/icons/boot_win.icns
EFI/BOOT/icons/func_firmware.icns
EFI/BOOT/icons/func_exit.icns
EFI/BOOT/icons/os_slackware.icns
EFI/BOOT/icons/vol_external.icns
EFI/BOOT/icons/arrow_left.icns
EFI/BOOT/icons/tool_shell.icns
EFI/BOOT/icons/os_win.icns
EFI/BOOT/icons/tool_mok_tool.icns
EFI/BOOT/icons/os_legacy.icns
EFI/BOOT/icons/os_linux.icns
EFI/BOOT/icons/arrow_right.icns
EFI/BOOT/icons/tool_memtest.icns
EFI/BOOT/refind.conf
EFI/porteus/
EFI/porteus/vmlinuz
EFI/porteus/initrd.xz
EFI/porteus/refind.conf
EFI/tools/
EFI/tools/Shell.efi
EFI/tools/drivers_x64/
EFI/tools/drivers_x64/LICENSE.txt
EFI/tools/drivers_x64/LICENSE_GPL.txt
EFI/tools/drivers_x64/btrfs_x64.efi
EFI/tools/drivers_x64/ext2_x64.efi
EFI/tools/drivers_x64/ext4_x64.efi
EFI/tools/drivers_x64/hfs_x64.efi
EFI/tools/drivers_x64/iso9660_x64.efi
EFI/tools/drivers_x64/reiserfs_x64.efi
/root

Copying porteus files ...
cp: cannot stat ‘/mnt/isoloop/porteus’: No such file or directory
Finishing installation ....
Your installation has finished!!
Make sure you set your system to boot
into UEFI mode and reboot now!
root@porteus:~# 
I have yet to boot it. Was surprised the script found a MBR. I thought flash drives were formatted as Super Floppies, thus no MBR. Also concerned about the various error msgs shown. Meaningful?
Ed

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

Re: UEFI problem

Post#23 by Ed_P » 28 Sep 2013, 05:06

Ok, SpaceFM shows a 7G EFI folder on the /mnt/sdb1 partition but no sdb2 partition thus no Porteus files.

Now, my Porteus is an ISO file booted via Grub4DOS. Is that a problem?

Code: Select all

title Porteus 2.1 - Fresh mode \n 193MB\n Porteus-RazorQT-v2.1-i486.iso \n Use to check space usage of porteus.dat file.\n No changes= parm used.
find --set-root                     /ISOs/Porteus-RazorQT-v2.1-i486.iso
map --heads=0 --sectors-per-track=0 /ISOs/Porteus-RazorQT-v2.1-i486.iso (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz  from=/ISOs/Porteus-RazorQT-v2.1-i486.iso vga=791 autoexec=startx   
initrd /boot/syslinux/initrd.xz
Ed

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

Re: UEFI problem

Post#24 by Ed_P » 28 Sep 2013, 05:40

Good news, bad news...

Booting a UEFI machine, with the USB flash drive plugged in, and NO changes to the machine's BIOS, a boot menu appears with Linux as one of the options. :Yahoo!:

However, selecting the Linux option results in an error, about a missing file or folder. Sorry I didn't record it.

SO CLOSE!!
Ed

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

Re: UEFI problem

Post#25 by bour59 » 28 Sep 2013, 14:15

I know now howto disable secure boot (sorry for the long wait)
So I can boot on the usb created
I canl choose the boot option for Porteus
choice 1 : fresh
----> live system ready
----> linuxrc : exec: line 437 bin/chroot I/o error
choice 2 : ram
very long time to load modules
same issue

Hard reboot mandatory

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

Re: UEFI problem

Post#26 by Ed_P » 28 Sep 2013, 15:22

Ok, a little more information on booting the flash drive.

1. On a non-UEFI system the machine fails to boot with the flash drive plugged in. Operating system not found. Does this indicate that this flash drive can only be used on UEFI machines?

2. On a UEFI system the machines boots to a screen titled: Porteus System Boot Loader. And on the screen are 5 Porteus options. Last time I booted the UEFI machine with the flash drive I didn't read what was presented. All I saw was the Penguin which is what I immediately clicked on. :oops:

3. This time I choose the Fresh option and got:

Starting init script
Searching for ......sgn file
From= cheatcode incorrect

I didn't try the other options but would expect similar results with the single partition on the flash drive.
Ed

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

Re: UEFI problem

Post#27 by brokenman » 28 Sep 2013, 18:59

1) Yes only UEFI machines
2) Your almost there. This error means that it is not finding the porteus installation on the USB. You should open the file EFI/Boot/refind.conf and scroll to the bottom where you will see the Porteus entry and you can check the from= line to make sure it points to the USB device.

I would boot into a working porteus and from a console get the UUID of the USB device by typing: blkid
Then in the refind.conf file look for the Porteus line and it should read from=UUID:d0ee276c-b261-47ab-a783-a6c61f1e27cf (replacing the string with your USB's UUID.

The script should do all this. Perhaps you can run the script with all output dumped to a file and show me.

sh create-uefi-usb.sh >/tmp/uefi.log 2>/tmp/uefi.log
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#28 by bour59 » 28 Sep 2013, 20:04

@brokenman
I agree with you
but what can I do later with
----> live system ready
----> linuxrc : exec: line 437 bin/chroot I/o error

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

Re: UEFI problem

Post#29 by brokenman » 28 Sep 2013, 20:15

bour59 this looks like corruption since line 437 is the last line in linuxrc. If the last step in linuxrc (pivot_root) went wrong you should have seen an error, something like: ERROR, something went wrong. We can not continue!
If you get as far as this then loading from UEFI is working ... and you should probably check that the ISO being used is not corrupt. Check the md5sums of modules in the base folder against the md5sum s in the ISO you are using.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: UEFI problem

Post#30 by Ed_P » 28 Sep 2013, 23:19

brokenman wrote:1) Yes only UEFI machines
2) Your almost there. This error means that it is not finding the porteus installation on the USB. You should open the file EFI/Boot/refind.conf and scroll to the bottom where you will see the Porteus entry and you can check the from= line to make sure it points to the USB device.

I would boot into a working porteus and from a console get the UUID of the USB device by typing: blkid
Then in the refind.conf file look for the Porteus line and it should read from=UUID:d0ee276c-b261-47ab-a783-a6c61f1e27cf (replacing the string with your USB's UUID.

The script should do all this. Perhaps you can run the script with all output dumped to a file and show me.

sh create-uefi-usb.sh >/tmp/uefi.log 2>/tmp/uefi.log
I don't have a "Porteus installation on the USB". I boot a Porteus ISO file into RAM and it runs from there.

A second problem is the script didn't partition my USB drive into 2 partitions.
brokenman wrote: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
I have a single 7G FAT32 partition with the EFI folder on it containing a BOOT, porteus and tools folders.

All the output of running the script I have already posted. Check my post 8 above this one.
Ed

Post Reply