Uefi and porteus 3.0

Post here if you are a new Porteus member and you're looking for some help.
bour59
Samurai
Samurai
Posts: 118
Joined: 29 Dec 2010, 08:10
Distribution: porteus v3.2.2-xfce
Location: France

Uefi and porteus 3.0

Post#1 by bour59 » 19 Mar 2014, 16:06

hello !
I've created my usbv2.1(uefi) with "create-uefi-usb-v2.sh" (from brokenman)
works fine.
may I expect a v3 to use Porteus 3.0
or the way to create the new kernel000.xzm and template

or another plan to use Uefi
thx

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

Re: Uefi and porteus 3.0

Post#2 by brokenman » 19 Mar 2014, 17:06

bour59 it should be enough to just replace the existing files with Porteus v3.0. UEFI support is built into the kernel so no need to modify anything. From Porteus v3.0 replace your existing /mnt/sda2/EFI/Boot/{vmlinuz,initrd.xz} and then in your booting path replace all the base modules with those from Porteus 3.
How do i become super user?
Wear your underpants on the outside and put on a cape.

mtdew3q
White ninja
White ninja
Posts: 17
Joined: 25 Dec 2013, 20:27
Distribution: ubuntu 12.04
Location: New York

Re: Uefi and porteus 3.0

Post#3 by mtdew3q » 22 Mar 2014, 16:17

Hi bour59 -

Is there a link with brokenman and you discussing this uefi? Is there a link for the description on how to use the file "create-uefi-usb-v2.sh" (from brokenman)? I am kind of curious how it works. It is not something I need right away, but I am interested in how you handle uefi, if there is a quick link.

thanks for any links to threads.

mtdew3q



.

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

Re: Uefi and porteus 3.0

Post#4 by bour59 » 22 Mar 2014, 17:28

hello!
you can look at "Uefi problem" in this Newbie questions (100 posts)
good luck

EDIT/
see brokenman » 29 Août 2013, 02:50 in this thread

mtdew3q
White ninja
White ninja
Posts: 17
Joined: 25 Dec 2013, 20:27
Distribution: ubuntu 12.04
Location: New York

Re: Uefi and porteus 3.0

Post#5 by mtdew3q » 22 Mar 2014, 20:01

Hi bour59-

very cool.
thanks :)

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

Re: Uefi and porteus 3.0

Post#6 by Ed_P » 12 May 2014, 04:57

brokenman wrote:From Porteus v3.0 replace your existing /mnt/sda2/EFI/Boot/{vmlinuz,initrd.xz} and then in your booting path replace all the base modules with those from Porteus 3.

Any chance this update function can be made a part of the script? I'm sure this isn't going to be the last version of Porteus.

And speaking of changes, three others that I would like to see;

1. Allow the end user to specify how big the USB drive's partitions will be. Currently sda1 is 100 MB, I would like it to be 4 GB for data files to be shared between systems. (Window can only access the 1st partition on removable drives.

2. Remove the Removable drive requirement. Some newer USB drivers are configured as Fixed drives rather than Removable. (A new Microsoft Windows 8 requirement.)

3. Fix the sdb1's partition table. As currently created by this script Windows 7 systems can't see it let alone access it. But once I fixed it with testdisk Windows 7 can see and access the files on it. And it still boots on Windows 8 UEFI systems without touching the BIOS. :good:
Ed

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

Re: Uefi and porteus 3.0

Post#7 by brokenman » 12 May 2014, 12:12

Thanks for the suggestions. Will put this on my TODO list.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Uefi and porteus 3.0

Post#8 by brokenman » 27 May 2014, 17:16

This is an updated porteus installer for removable devices.

I am only releasing the removable drive version As I don't want people nuking there fixed drives because of this script. Once it is stable and known to work I will show how to do the same for internal fixed drives.

REQUIREMENTS:
Porteus v3.0 booted in always fresh mode.
Secure boot disabled in your BIOS/UEFI
INTERNET CONNECTION

The script will guide you through partitioning and installing Portues with the refind bootloader. It will attempt to search a windows install and add it to the boot options (please test).
To get the script open a root terminal and type:

Code: Select all

curl -L  https://www.dropbox.com/s/w1i7b2p4viinnq8/porteus-uefi-usb-installer-v3.0.sh -o porteus-uefi-usb-installer-v3.0.sh
sh porteus-uefi-usb-installer-v3.0.sh
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Uefi and porteus 3.0

Post#9 by Ed_P » 28 May 2014, 21:10

brokenman wrote: I will show how to do the same for internal fixed drives.
What about Fixed flash drives?
The script will guide you through partitioning and installing Portues with the refind bootloader. It will attempt to search a windows install and add it to the boot options (please test).
It's going to modify the Windows system's bcd file!! :shock: Now that is scary. Will definitely have to check this out. Have you tried this on your wife's machine? :D
Ed

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

Re: Uefi and porteus 3.0

Post#10 by brokenman » 28 May 2014, 22:52

What about Fixed flash drives?
Think of them as equal to internal fixed drives. No support for now.

It's going to modify the Windows system's bcd file!!
No. Once again, this is an updated porteus installer for removable devices. The script will guide you through partitioning and installing Portues with the refind bootloader. It will attempt to search a windows install and add it to the boot options (being the REFIND bootloader). BCD is not touched in anyway. Conversely, win likes to touch other boot loaders when it feels threatened. My last windows update nuked my bootloader setup.

If you are not confident then don't touch this script. I have added every safety precaution I can think of to make the process smooth, but I take zero responsibility for any human made mistakes.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Uefi and porteus 3.0

Post#11 by Ed_P » 28 May 2014, 23:13

brokenman wrote:It will attempt to search a windows install and add it to the boot options (being the REFIND bootloader.
Oh! You're adding the boot of Windows to the Linux bootloader not the other way around. Ok, now I understand.

I boot alternate systems using an entry in the BCD that invoke grldr and by modifying the BIOS to boot USB drives before the harddrive.
BCD is not touched in anyway. Conversely, win likes to touch other boot loaders when it feels threatened. My last windows update nuked my bootloader setup.
I would think that was more a Windows AV update change than Windows itself.
I have added every safety precaution I can think of
Maybe too many.
Ed

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

Re: Uefi and porteus 3.0

Post#12 by brokenman » 29 May 2014, 00:33

I would think that was more a Windows AV update change than Windows itself.
It was an update from 8.0 to 8.1 which replaced my modified .efi file with the original windows one. Honest mistake if you think you are the only system on a machine.

I originally wanted to use BCDEDIT for my bootloader for dualboot but it wasn't compatible at the time. Now I've found refind I like the look better.

Maybe too many.
:) I would hate to mess up someones system. The official installer will support UEFI on HD.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Uefi and porteus 3.0

Post#13 by Ed_P » 29 May 2014, 00:41

Code: Select all

guest@porteus:~$ sh /mnt/sda5/porteus/porteus-uefi-usb-installer-v3.0.sh
You must be root to run this!!
guest@porteus:~$ su
Password: 
root@porteus:/home/guest# sh /mnt/sda5/porteus/porteus-uefi-usb-installer-v3.0.sh

Checking boot directory
 Passed 
Checking porteus directory
 Passed 
Checking internet.
 Passed 


 ################## DISCLAIMER ################# 
This script comes as is with no warranty or guarantee
implied or even otherwise hinted at in any form. This
deniability of any implied warranty or guarantee includes
any voice you may hear in your head telling you otherwise.

Any loss of data, information, sanity or even temper is
hereby NOT the responsibility of the author of this script
and thereby renders all responsibility for the use of this
on you the user.

Essentially if you screw things up, don't blame me!

 ################## DISCLAIMER ################# 

 THIS SCRIPT WILL DESTROY ALL DATA ON THE TARGET DEVICE!! 
As a safety precaution the script will only have access
to removable devices and no internal fixed drives.
 Press ctrl+c at any time to exit the script. 

 Would you like to conitnue? [Yes/No]

 ### TARGET DEVICE ### 
Select the removable device on which you want to 
install Porteus.

NAME   LABEL   MODEL              SIZE
sdb            USB Flash Memory   7.3G


 Choose your target device and press enter:  
 

1) sdb
#? 
1) sdb
#? sdb
 Invalid choice! 


 Choose your target device and press enter:  
 

1) sdb
#? yes
 Invalid choice! 


 Choose your target device and press enter:  
 

1) sdb
#? 
Don't know what to answer. The USB flash drive is the one created by your prior script and has a label on the sdb1 partition of PORTEUS.

I think the opening code should be

Code: Select all

if [ `whoami` != "root" ]; then
  ktsuss "$0"
  exit
fi
Ed

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

Re: Uefi and porteus 3.0

Post#14 by brokenman » 29 May 2014, 02:48

Answer: 1

I will update the text to be more informative.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Uefi and porteus 3.0

Post#15 by Ed_P » 29 May 2014, 04:47

brokenman wrote:Answer: 1
Thank you.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# sh /mnt/sda5/porteus/porteus-uefi-usb-installer-v3.0.sh

Checking boot directory
 Passed 
Checking porteus directory
 Passed 
Checking internet.
 Passed 


 ################## DISCLAIMER ################# 
This script comes as is with no warranty or guarantee
implied or even otherwise hinted at in any form. This
deniability of any implied warranty or guarantee includes
any voice you may hear in your head telling you otherwise.

Any loss of data, information, sanity or even temper is
hereby NOT the responsibility of the author of this script
and thereby renders all responsibility for the use of this
on you the user.

Essentially if you screw things up, don't blame me!

 ################## DISCLAIMER ################# 

 THIS SCRIPT WILL DESTROY ALL DATA ON THE TARGET DEVICE!! 
As a safety precaution the script will only have access
to removable devices and no internal fixed drives.
 Press ctrl+c at any time to exit the script. 

 Would you like to conitnue? [Yes/No]

 ### TARGET DEVICE ### 
Select the removable device on which you want to 
install Porteus.

NAME   LABEL   MODEL              SIZE
sdb            USB Flash Memory   7.3G


 Choose your target device and press enter:  
 

1) sdb
#? 1

 IMPORTANT INFORMATION 
Your removable device will be formatted into 2 partitions
This is required for UEFI systems. The first partition
is the UEFI boot partition and must be FAT32.


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util sfdisk doesn't support GPT. Use GNU Parted.

 ### FIRST PARTITION ### 
Choose a size for the first partition.
Available free space:  7.3G
100M
7.2G 

 Enter the partition size. 
Example: 200MB or 2GB 
> 6gb
 Please include either MB or GB. 

 Enter the partition size. 
Example: 200MB or 2GB 
> 6GB

 ### SECOND PARTITION ### 
Choose a size for the second partition.
Press ENTER to use remaining free space.
Available free space:  1297 MB 

 Enter the partition size. 
Example: 200MB or 2GB 
> 1297MB

 ### PARTITION TYPE ### 
Choose a partition type for the second parition which will 
hold porteus. I recommend choosing a native linux file 
system instead of FAT32. If you choose FAT32 and want to 
save changes to Porteus you will need to use a savefile.dat 
container

 Choose a filesytem for porteus to reside on. 
 Choose ext2 if you are not sure.

1) FAT32
2) ext2
3) ext3
4) ext4
5) reiserfs
6) xfs
#? ext2
 Invalid choice! 


 Choose a filesytem for porteus to reside on. 
 Choose ext2 if you are not sure.

1) FAT32
2) ext2
3) ext3
4) ext4
5) reiserfs
6) xfs
#? 2

 ### FINAL REPORT ### 
 Target device:  /dev/sdb
 Partition 1:  FAT32 6144MB
 Parition 2:  ext2 1297MB

 Please confirm the above information.
 Press Y to begin format, any other key to exit.

Creating partition table on:
/dev/sdb
Creating partition 1
Creating partition 2
Setting partition2 name as: porteus
Formatting partition1
Formatting partition2

Downloading refind ...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2288k  100 2288k    0     0   363k      0  0:00:06  0:00:06 --:--:--  393k
Decompressing refind ...
Installing refind to device ...
Installing rEFInd on Linux....
UnmountEsp = 1
Copied rEFInd binary files

Notice: Backed up existing icons directory as icons-backup.
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.


Installation has completed successfully.

Unmounting install dir
Probing target device ...
Error: Partition(s) 1, 2 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.

Mounting partition1 ...
Copying kernel files to device ...
Copying custom icons ...
sed: -e expression #1, char 0: no previous regular expression
Unmounting partition 1
Mounting partition 2
Copying porteus files ...
Waiting for jobs to finish ...
End of script

 ########## FINISHED ############# 
Please remember that in order to boot into UEFI you must:
1) Disable secure boot in your BIOS/UEFI
2) Set your removeable device as a bootable device in your BIOS

You may now reboot
root@porteus:/home/guest# 
I suspect the "in use" error" was because I had spaceFM open.

After rebooting I have a 6 GB sdb1 but no sdb2.

Try again.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# sh /mnt/sda5/porteus/porteus-uefi-usb-installer-v3.0.sh

Checking boot directory
 Passed 
Checking porteus directory
 Passed 
Checking internet.
 Passed 





















 ################## DISCLAIMER ################# 
This script comes as is with no warranty or guarantee
implied or even otherwise hinted at in any form. This
deniability of any implied warranty or guarantee includes
any voice you may hear in your head telling you otherwise.

Any loss of data, information, sanity or even temper is
hereby NOT the responsibility of the author of this script
and thereby renders all responsibility for the use of this
on you the user.

Essentially if you screw things up, don't blame me!

 ################## DISCLAIMER ################# 

 THIS SCRIPT WILL DESTROY ALL DATA ON THE TARGET DEVICE!! 
As a safety precaution the script will only have access
to removable devices and no internal fixed drives.
 Press ctrl+c at any time to exit the script. 

 Would you like to conitnue? [Yes/No]

 ### TARGET DEVICE ### 
Select the removable device on which you want to 
install Porteus.

NAME   LABEL   MODEL              SIZE
sdb            USB Flash Memory   7.3G


 Choose your target device and press enter:  
 

1) sdb
#? 1

 IMPORTANT INFORMATION 
Your removable device will be formatted into 2 partitions
This is required for UEFI systems. The first partition
is the UEFI boot partition and must be FAT32.


WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util sfdisk doesn't support GPT. Use GNU Parted.

 ### FIRST PARTITION ### 
Choose a size for the first partition.
Available free space:  7.3G
6G 

 Enter the partition size. 
Example: 200MB or 2GB 
> 6GB

 ### SECOND PARTITION ### 
Choose a size for the second partition.
Press ENTER to use remaining free space.
Available free space:  1297 MB 

 Enter the partition size. 
Example: 200MB or 2GB 
> 1297MB

 ### PARTITION TYPE ### 
Choose a partition type for the second parition which will 
hold porteus. I recommend choosing a native linux file 
system instead of FAT32. If you choose FAT32 and want to 
save changes to Porteus you will need to use a savefile.dat 
container

 Choose a filesytem for porteus to reside on. 
 Choose ext2 if you are not sure.

1) FAT32
2) ext2
3) ext3
4) ext4
5) reiserfs
6) xfs
#? 2

 ### FINAL REPORT ### 
 Target device:  /dev/sdb
 Partition 1:  FAT32 6144MB
 Parition 2:  ext2 1297MB

 Please confirm the above information.
 Press Y to begin format, any other key to exit.

Creating partition table on:
/dev/sdb
Creating partition 1
Creating partition 2
Setting partition2 name as: porteus
Formatting partition1
Formatting partition2

Downloading refind ...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2288k  100 2288k    0     0   363k      0  0:00:06  0:00:06 --:--:--  395k
Decompressing refind ...
Installing refind to device ...
Installing rEFInd on Linux....
UnmountEsp = 1
Copied rEFInd binary files

Notice: Backed up existing icons directory as icons-backup.
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.


Installation has completed successfully.

Unmounting install dir
Probing target device ...

Mounting partition1 ...
Copying kernel files to device ...
Copying custom icons ...
lsblk: /dev/sdb2: not a block device
sed: -e expression #1, char 0: no previous regular expression
Unmounting partition 1
Mounting partition 2
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
Failed to mount /dev/sdb2
root@porteus:/home/guest# 

:o


And the 6GB partition is not accessible with Windows 7.
Ed

Post Reply