Page 1 of 1

Creating a USB Porteus drive cp problem

Posted: 06 Aug 2022, 04:41
by Ed_P
I execute a script to copy as root all ISO files to the USB drive and I get:

Code: Select all

cp: failed to preserve ownership for '/mnt/sda1/EFI/boot/bootx64.efi': Operation not permitted
cp: failed to preserve ownership for '/mnt/sda1/EFI/boot/chain.c32': Operation not permitted
cp: failed to preserve ownership for '/mnt/sda1/EFI/boot/ldlinux.e64': Operation not permitted
for each of the ISO files. How do I preserve ownership?

Doing this script in 4.0 worked.

The copy is a simple:

Code: Select all

cp -a /mnt/$LOOP/*                            $USB/ 
where $LOOP is LOOP=isoloop and $USB is USB='/mnt/sda1'.

Creating a USB Porteus drive cp problem

Posted: 06 Aug 2022, 06:06
by itrukrakso
Hi
I guess sda1 is a FAT partition ???
If the USB drive should be bootable for EFI the 1st partition must be a FAT partition.
FAT knows no rights management,so the ownership can't be preserved.
try:
cp -n

Creating a USB Porteus drive cp problem

Posted: 06 Aug 2022, 06:37
by Ed_P
Thank you itrukrakso. Yes, sda1 is a FAT32 partition and the drive will be booted on an EFI system. Based on Google searches for a solution what I did was add --no-preserve=mode to the cp command which solved the ownership error problem.

But now I have a new error. With the files and folders copied to the drive I ran the Porteus-installer-for-Linux.com app on the USB drive and got:

Code: Select all

Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing Porteus Installer  100%   ... Extraction failed.
Terminated
I don't know what the Porteus-installer-for-Linux.com app is trying to extract. :unknown:

Added in 11 minutes 6 seconds:
Interesting. I just ran the Porteus-installer-for-Linux.com app by clicking on it rather than my script doing it and it ran successfully. :Yahoo!: Now to see if the USB drive boots. :good: