Uefi and porteus 3.0

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

Re: Uefi and porteus 3.0

Post#16 by brokenman » 29 May 2014, 14:14

Thanks. I'll check it out. No idea why ntfs-3g is involved here since you chose ext. For the second partition you may simply hit ENTER without entering a size to use the remainder of the device. Also think you will need to make sure both partitions are unmounted before starting the script.

Code: Select all

umount /dev/sdb1
umount /dev/sdb2
I will find a way to double check this in the script.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#17 by Ed_P » 30 May 2014, 05:08

Latest try, Nothing open except LXTerminal and Leafpad:

porteus-uefi.sh

Code: Select all

#!/bin/sh
## http://forum.porteus.org/viewtopic.php?f=81&t=3227#p25266 
## http://forum.porteus.org/viewtopic.php?f=81&t=3227&p=25308#p25308 

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

if [ ! -d /mnt/sdb1 ]; then
  umount /dev/sdb1
  umount /dev/sdb2
fi

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

Code: Select all

guest@porteus:~$ ./porteus-uefi.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   596    0   596    0     0   1088      0 --:--:-- --:--:-- --:--:--  1213
100  102k  100  102k    0     0  72229      0  0:00:01  0:00:01 --:--:-- 72229

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 
> 6BG
 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 
> 

 ### 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 0MB

 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  83915      0  0:00:27  0:00:27 --:--:--  161k
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 ...
sed: -e expression #1, char 0: no previous regular expression
Unmounting partition 1
Mounting partition 2
NTFS signature is missing.
Failed to mount '/dev/sdb2': Invalid argument
The device '/dev/sdb2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
Failed to mount /dev/sdb2
guest@porteus:~$ ls /dev/sdb1/
/bin/ls: cannot access /dev/sdb1/: Not a directory
guest@porteus:~$ ls /mnt/sdb1/
EFI/  Guest/  System\ Volume\ Information/
guest@porteus:~$ ls /mnt/sdb2/
/bin/ls: cannot access /mnt/sdb2/: No such file or directory
guest@porteus:~$ 
spaceFM

Code: Select all

Errors
Run: Mount /dev/sdb2
Status: Finished with error (exit status 1)
Object /org/freedesktop/UDisks2/block_devices/sdb2 is not a mountable filesystem.
See no reason for the System Volume Folder, I believe Windows only creates them on Fixed drives. And the Guest folder does not contain the current files that I have in my /home/guest/ or /mnt/sda5/porteus/Guest folders so I have no idea where it came from.

- update-

Found the source of the Guest files, my Porteus 2.1 system!! I'm running 3.0.

Maybe this will help.

On sda5 is:

guest@porteus:~$ ls /mnt/sda5
$RECYCLE.BIN/ RECYCLER/ Users/ porteus/
ISOs/ System\ Volume\ Information/ Win7\ boot\ files/ porteus2.1/

guest@porteus:~$ ls /mnt/sda5/ISOs
!ContigISOs.cmd* Porteus-RazorQT-v3.0.lst* porteus3.bmp*
Porteus-RazorQT-v2.1-x86_64.iso* Porteus.lst\ -\ Shortcut.lnk*
Porteus-RazorQT-v3.0-x86_64.iso* menu.lst\ -\ Shortcut.lnk*

guest@porteus:~$ ls /mnt/sda5/porteus
FormatUSBstick.txt* changes/
Guest/ create-uefi-usb-v2.sh*
KeePass.kdb* modsavedat/
Porteus.lst\ -\ Shortcut.lnk* modules/
PorteusRestore.cmd* modwines/
PorteusSaveBkup.cmd* porteus-uefi-usb-installer-v3.0.sh*
PorteusXZMupdate.cmd*

guest@porteus:~$ ls /mnt/sda5/porteus2.1
Guest/ PorteusXZMupdate.cmd* porteussave\ -\ base.7z*
KeePass.kdb* changes/ synclient.txt*
Porteus.lst\ -\ Shortcut.lnk* modsavedat/
PorteusSaveBkup.cmd* modules/
guest@porteus:~$
Ed

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

Re: Uefi and porteus 3.0

Post#18 by brokenman » 30 May 2014, 14:06

Thanks. The installer is failing when trying to mount /dev/sdb2 before copying the porteus files over. It is also curious that refind finds an existing icons directory since the first step of the installer is to nuke the GPT/MBR of the target device, then recreate the partitions. The script dumps a log file to /var/log/refind-installer.log in which you will no doubt see the error about mounting sdb2. I will need to track down why it fails.

For now you can nuke the drive yourself before starting and see if ti makes any difference:

Code: Select all

parted /dev/sdb
mklabel msdos
quit
PS: Anything in /dev/sda is irrelevant since the script doesn't touch it.

AFTERTHOUGHT: Are you booting from ISO? It shouldn't make any difference when it comes to mounting a partition but I will need to test it under these conditions.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#19 by Ed_P » 30 May 2014, 14:23

brokenman wrote:For now you can nuke the drive yourself before starting and see if ti makes any difference:

Code: Select all

parted /dev/sdb
mklabel msdos
quit
OK. I will give it a shot.
AFTERTHOUGHT: Are you booting from ISO?
Yes.


-update-

It appears to have worked. :good:

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# ls /dev/sdb1
/dev/sdb1
root@porteus:/home/guest# ls /dev/sdb2
/dev/sdb2
root@porteus:/home/guest# ls /mnt/sdb1
root@porteus:/home/guest# parted /dev/sdb
GNU Parted 3.1
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?
Yes/No? yes                                                               
(parted) quit                                                             
Information: You may need to update /etc/fstab.

root@porteus:/home/guest# ls /dev/sdb2                                 
/bin/ls: cannot access /dev/sdb2: No such file or directory
root@porteus:/home/guest# ls /dev/sdb1
/bin/ls: cannot access /dev/sdb1: No such file or directory
root@porteus:/home/guest# 
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#20 by Ed_P » 30 May 2014, 15:07

brokenman wrote: For the second partition you may simply hit ENTER without entering a size to use the remainder of the device.
Apparently not.

Code: Select all

guest@porteus:~$ ./porteus-uefi.sh
umount: /dev/sdb1: not found
umount: /dev/sdb2: not found

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   596    0   596    0     0   1072      0 --:--:-- --:--:-- --:--:--  1233
100  102k  100  102k    0     0  67674      0  0:00:01  0:00:01 --:--:--  442k

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.

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

 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 
> 

 ### 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 0MB

 Please confirm the above information.
 Press Y to begin format, any other key to exit.
Last edited by Ed_P on 30 May 2014, 15:22, edited 1 time in total.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#21 by Ed_P » 30 May 2014, 15:21

And the results are....

Code: Select all

guest@porteus:~$ ./porteus-uefi.sh
umount: /dev/sdb1: not found
umount: /dev/sdb2: not found

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   596    0   596    0     0    634      0 --:--:-- --:--:-- --:--:--   688
100  102k  100  102k    0     0  56627      0  0:00:01  0:00:01 --:--:--  336k

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.

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

 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 ...

Decompressing refind ...
Installing refind to device ...
Installing rEFInd on Linux....
UnmountEsp = 1
Copied rEFInd binary files

Copying sample configuration file as refind.conf; edit this file to configure
rEFInd.


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
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
 
guest@porteus:~$ ls /dev/sdb1
/dev/sdb1
guest@porteus:~$ ls /mnt/sdb1
guest@porteus:~$ ls /dev/sdb2
/bin/ls: cannot access /dev/sdb2: No such file or directory
guest@porteus:~$ 
brokenman wrote:PS: Anything in /dev/sda is irrelevant since the script doesn't touch it.
You're sure of that eh?
brokenman wrote:It will attempt to search a windows install and add it to the boot options
Image
I assume the ntfs-3g app is being used to see if the harddrive has a Windows system so it can add it to the rEFInd menu. However, Windows systems aren't always installed on sda1 anymore so a search will have to include sda2 and sda3 also at this point.

BTW spaceFM shows a single folder on sdb1 now.

Code: Select all

guest@porteus:~$ ls /mnt/sdb1
EFI/
guest@porteus:~$ ls /mnt/sdb2
/bin/ls: cannot access /mnt/sdb2: No such file or directory
guest@porteus:~$ 
Ed

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

Re: Uefi and porteus 3.0

Post#22 by brokenman » 30 May 2014, 16:05

You're sure of that eh?
Absolutely positive. I wrote the script.
I assume the ntfs-3g app is being used to see if the harddrive has a Windows system
No. Since the windows partition is automatically mounted during Porteus boot, the script has no reason to use ntfs-3g. The script doesn't touch the fixed drive at all, it just searches it (only in the case that it exists). If it finds a fixed drive with an EFI folder it will search that folder for the EFI/Microsoft/Boot/bootmgfw.efi file and add it to the bootloader config file. In any case the EFI folder is located on a FAT32 partition in all scenarios. ntfs partitions don't even enter the story with this script. That's why I find it curious. I don't have high hopes for the script successfully adding the windows option since the functions of refind are relative to the device it is loaded on. This means I have to find the UUID of the windows EFI partition and hope that refind will accept the boot entry.

I will boot from ISO and troubleshoot this today.
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: 5503
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Uefi and porteus 3.0

Post#23 by brokenman » 30 May 2014, 17:08

However, Windows systems aren't always installed on sda1 anymore so a search will have to include sda2 and sda3 also at this point.
Yes I am well aware of that.

I have just booted into an ISO and found that the script ran without problem. So the problem lies in the mounting of your second partition during the script. Here is the process so you have a better understanding what is important and what is not.

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

This operation occurs with the device unmounted. Notice that the creation and formatting of partition2 was successful.

The script then mounts your sdb1 and copies over refind files with success.
Mounting partition1 ...
Copying kernel files to device ...
Copying custom icons ...


Now comes the mystery.
lsblk: /dev/sdb2: not a block device
If the partition was indeed created then it should show up in lsblk.

Please plug in your USB and show the output of: lsblk /dev/sdb2

In the meantime is there anyone else that uses EFI that can test this? I need it tested on an 'always fresh' mode of Porteus version 3 so I can be sure it is not user error.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#24 by Ed_P » 30 May 2014, 18:25

brokenman wrote:Since the windows partition is automatically mounted during Porteus boot, the script has no reason to use ntfs-3g.
Excellent point Image oh Master.
The script doesn't touch the fixed drive at all, it just searches it
We disagree on the meaning of the word "touch". Accessing, as in reading or searching, in IMO "touching".
This means I have to find the UUID of the windows EFI partition and hope that refind will accept the boot entry.
But if you use the UUID the USB drive will only work on a single machine.
brokenman wrote:I need it tested on an 'always fresh' mode
Oops. :oops:

I will retry later. :sorry:
Ed

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

Re: Uefi and porteus 3.0

Post#25 by brokenman » 30 May 2014, 18:42

We disagree on the meaning of the word "touch". Accessing, as in reading or searching, in IMO "touching".
It appears we do. So we are understood in the future ... in linux there a program called 'touch' which physically accesses the file and modifies the timestamp. I consider this a touch. The command 'find' modifies nothing. It just looks. I don't consider this touching anything. I also don't consider reading a piece of paper touching it.

I consider touch to be contact as in the expression: 'look but don't touch' or 'Hey, I didn't touch her, even though she looks over 18!'
But if you use the UUID the USB drive will only work on a single machine.
Good point. Porteus will work on any machine since the UUID of the USB partitions go wherever it goes. Booting windows will only work on the machine on which the script was run. I think I will remove this windows option for the script.

This script is a testing ground for the GUI installer so it would be nice to have it work for everybody, but right now I need to find out if it works from always fresh mode. I have the feeling it will be the same result when you test in this mode, but I need to be sure.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#26 by Ed_P » 30 May 2014, 20:37

brokenman wrote:I also don't consider reading a piece of paper touching it.
If you leave a finger print on the paper you touched it.
I consider touch to be contact as in the expression: 'look but don't touch'
An interesting analogy.
Good point. Porteus will work on any machine since the UUID of the USB partitions go wherever it goes. Booting windows will only work on the machine on which the script was run.
Not necessarily. Booting Windows should work on any machine on which Windows is installed. And if you're really good it will boot any version of Windows it finds. But that's a lot to test for, maybe just Windows 7 and 8 would do. :good:

Code: Select all

guest@porteus:~$ lsblk /dev/sdb2
lsblk: /dev/sdb2: not a block device
guest@porteus:~$ lsblk /dev/sdb1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb1   8:17   1   6G  0 part 
guest@porteus:~$ 
I think your partition table is screwed up, which is also why the device isn't accessible in Windows 7. My UEFI Windows 8 Repair flash drive is a single partition, readable by Windows 7 and UEFI boots on the Windows 8 machine. Should be able to do the same with Porteus IMO.

Always fresh mode

Code: Select all

guest@porteus:~$ sh /mnt/sda5/porteus/Guest/porteus-uefi.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   596    0   596    0     0    918      0 --:--:-- --:--:-- --:--:--   980
100  102k  100  102k    0     0  67027      0  0:00:01  0:00:01 --:--:-- 67027

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   264k      0  0:00:08  0:00:08 --:--:--  330k
Decompressing refind ...
Installing refind to device ...
Installing rEFInd on Linux....
UnmountEsp = 1
Copied rEFInd binary files

Copying sample configuration file as refind.conf; edit this file to configure
rEFInd.


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
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
guest@porteus:~$ 
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#27 by Ed_P » 31 May 2014, 17:25

Can we try a modified approach?

I found that on my wife's UEFI machine the sdb1 partition is readable. And on my standard machine it is not. On my wife's machine she doesn't have Porteus. On my machine I do.

So.... On my machine I want to run the Porteus-installer-for-Linux.com or the Windows version and put Porteus on the sdb1 partition. Then have your script add the UEFI directory to sdb1 and create the sdb2 partition and install Porteus to it.

Possible?

Once done I configure the two installs to use a common save.dat file on sdb1!! :good: The USB drive would boot in all machines regardless of UEFI or no UEFI.




=update=

Check out the gdisk h option. It sounds like it has potential, especially for movable USB drives.
http://www.rodsbooks.com/gdisk/gdisk.html wrote:enables GPT-unaware OSes, or those that can't boot from a GPT disk, to access up to three of the partitions on the disk by creating MBR entries for them.
And the gdisk f option.
http://www.rodsbooks.com/gdisk/gdisk.html wrote:Load MBR and build fresh GPT from it. Use this option if your GPT is corrupt or conflicts with the MBR and you want to use the MBR as the basis for a new set of GPT partitions
Ed

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

Re: Uefi and porteus 3.0

Post#28 by brokenman » 01 Jun 2014, 14:43

Possible?
I don't know, I havn't tried it. My interest lies in getting this working by nuking the existing partition setup (which it currenttly does) and starting from there. Feel free to try your theory. The only hitch I can think of is that Porteus installer will not mark the partition type as 'ef00' which is required for EFI.

I will check out those gdisk options. Thanks.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3201
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#29 by Ed_P » 01 Jun 2014, 20:14

brokenman wrote:My interest lies in getting this working by nuking the existing partition setup (which it currenttly does)
Are you sure about that?
brokenman wrote:For now you can nuke the drive yourself before starting and see if ti makes any difference:

Code: Select all

parted /dev/sdb
mklabel msdos
quit
:wink:
I will check out those gdisk options. Thanks.
Thank you. :good:
Ed

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

Re: Uefi and porteus 3.0

Post#30 by brokenman » 01 Jun 2014, 20:21

Are you sure about that?
Yes. Check out the gdisk options: x, z
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply