Page 1 of 1

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 01 Aug 2021, 17:15
by Ed_P
This worked for me and booted on my Windows 10 UEFI system.

USB50.cmd

Code: Select all

@echo off&title Install Porteus

:: ## Partition & format the USB drive with a msdos Partition table.  ##
:: ## > diskpart          * Run Command Prompt with Admin Rights.     ##
:: ## > list disk                                                                                        ##
:: ## >....                                                                                                 ##
:: ## > select disk 1   * Note: disk nbr is the nbr of the USB disk       ##
:: ## > clean                                                                                           ##
:: ## > exit                                                                                              ##

::  User customize settings.  ISOdrv can be set when running if wrong. 
set ISO=D:\ISOs\Porteus-CINNAMON-v5.0rc3-x86_64.iso           
set ISOdrv=H:
set USBdrv=G:

echo Mounting %ISO%
powershell Mount-DiskImage -ImagePath "%ISO%"

if not exist %ISOdrv%\USB_INSTALLATION.txt (
   set /p ISOdrv=Enter ISO's mount drive or q to quit: ) 
if /I "%ISOdrv%" == "q" exit
if exist %ISOdrv%\USB_INSTALLATION.txt (
   echo "ISO drive: %ISOdrv%" 
) else ( 
   echo "Invalid ISO mount drive"
   pause > nul
   exit)

vol %USBdrv%  > nul 
if %errorLevel% == 0 (
   echo "USB drive: %USBdrv%" 
) else ( 
   echo "Invalid USB drive"
   pause > nul
   exit)

echo.
echo Copying files from %ISOdrv%\ to %USBdrv%\ 
xcopy %ISOdrv%\* %USBdrv%\ /y /s /c

if %errorLevel% == 0 (
   dir %USBdrv%\ 
) else ( 
   echo "Xcopy failed!"
   pause > nul
   exit)

echo.
echo Installing Porteus to the %USBdrv% drive
cd /d %USBdrv%\boot
Porteus-installer-for-Windows.exe
label %USBdrv% Porteus

echo Dismounting %ISO%
powershell Dismount-DiskImage -ImagePath "%ISO%"

echo Done
pause > nul
exit
But on my Windows 10 BIOS machine I get:

Code: Select all

SYSLINX 4.06 EDD 2012-10-23 Copyright (C) 1994-2012 H. Peter Anvin et al 
vesamenu.c32: not a COM32R image
boot:
loop. Trying to break out gives:

Code: Select all

Could not find kernel image: init

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 01 Aug 2021, 23:01
by ncmprhnsbl
the syslinux installers have no effect on uefi booting.
try these linked in this post ..(unzip them first)
Unable to boot Porteus 5.0 rc3 in Legacy mode (Post by ncmprhnsbl #83479)

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 01 Aug 2021, 23:42
by Ed_P
Thank you ncmp. I remembered reading about the c32 error but couldn't find it until I googled for it. Will test it more later.

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 04 Aug 2021, 16:37
by Ed_P
BTW On the BIOS 64bit system when the vesamenu.c32 error occurs if I hit the tab key then enter "text" to the boot option Porteus boots to a terminal screen where I login as root then enter "init 4" and Porteus boots to the normal GUI desktop. :)

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 12 Aug 2021, 21:16
by Ed_P
If someone is using a used USB drive or wants to rerun the USB install this version removes the old files/folder before adding Porteus to it.

USB50.cmd

Code: Select all

@echo off&title Install Porteus

:: ## Partition & format the USB drive with a msdos Partition table.  ##
:: ## > diskpart          * Run Command Prompt with Admin Rights.     ##
:: ## > list disk                                                                                        ##
:: ## >....                                                                                                 ##
:: ## > select disk 1   * Note: disk nbr is the nbr of the USB disk       ##
:: ## > clean                                                                                           ##
:: ## > exit                                                                                              ##

::  User customize settings.  ISOdrv can be set when running if wrong.
::set ISO=D:\ISOs\Porteus-CINNAMON-v5.0rc3-x86_64.iso
set ISO=D:\ISOs\Porteus-CINNAMON-v5.0rc3-i586.iso
set ISOdrv=H:
set USBdrv=G:


:: Check for Run as Admin
net sessions >nul 2>&1
if %errorLevel% == 0 (
   echo Running as Admin. 
   echo.    
 ) else (
    echo.
    echo  Deleting folders requires running as Admin.
    pause > nul
    exit
 )
echo Rerun
rmdir %USBdrv%\ /s
dir %USBdrv%\ > nul 2>&1
if %errorLevel% == 0 (
   echo "%USBdrv% not empty" 
   pause > nul
   exit
) else ( 
   echo "%USBdrv% is empty"
   echo.
)

echo Mounting %ISO%
powershell Mount-DiskImage -ImagePath "%ISO%"
::powershell Dismount-DiskImage -ImagePath "D:\ISOs\Porteus-CINNAMON-v5.0rc3-x86_64.iso"

if not exist %ISOdrv%\USB_INSTALLATION.txt (
   set /p ISOdrv=Enter ISO's mount drive or Q to quit: ) 
if /I "%ISOdrv%" == "q" exit
if exist %ISOdrv%\USB_INSTALLATION.txt (
   echo "ISO drive: %ISOdrv%" 
) else ( 
   echo "Invalid ISO mount drive"
   pause > nul
   exit)

vol %USBdrv%  > nul 
if %errorLevel% == 0 (
   echo "USB drive: %USBdrv%" 
) else ( 
   echo "Invalid USB drive"
   pause > nul
   exit)

echo.
echo Copying files from %ISOdrv%\ to %USBdrv%\ 
xcopy %ISOdrv%\* %USBdrv%\ /y /s /c

if %errorLevel% == 0 (
   dir %USBdrv%\ 
) else ( 
   echo "Xcopy failed!"
   pause > nul 
   exit)

echo.
echo Installing Porteus to the %USBdrv% drive

cd /d %USBdrv%\boot
Porteus-installer-for-Windows.exe
label %USBdrv% Porteus

echo Dismounting %ISO%
powershell Dismount-DiskImage -ImagePath "%ISO%"

echo Done
pause > nul
exit

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 06 Nov 2021, 20:10
by nanZor
Nice script, but it does bring up a question:

Since many modern machines don't absolutely *need* the use of the Porteus-installer-for-Windows.exe, (or for that matter the use of the included shell script) is there a performance / disadvantage to using it when not necessary?

Creating bootable Porteus 5.0rc3 USB in Windows 10

Posted: 06 Nov 2021, 21:52
by Ed_P
nanZor wrote:
06 Nov 2021, 20:10
is there a performance / disadvantage to using it when not necessary?
I don't know. I believe the Porteus Installer simply makes the drive bootable if not configured as such initially.