Technical issues/questions of an intermediate or advanced nature.
-
Ed_P
- Contributor
![Contributor Contributor](./images/ranks/contributor.gif)
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#1
by Ed_P » 01 Aug 2021, 17:15
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:
Ed
Ed_P
-
Ed_P
- Contributor
![Contributor Contributor](./images/ranks/contributor.gif)
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#3
by Ed_P » 01 Aug 2021, 23:42
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.
Ed
Ed_P
-
Ed_P
- Contributor
![Contributor Contributor](./images/ranks/contributor.gif)
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#4
by Ed_P » 04 Aug 2021, 16:37
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.
![Smile :)](./images/smilies/smile.gif)
Ed
Ed_P
-
Ed_P
- Contributor
![Contributor Contributor](./images/ranks/contributor.gif)
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#5
by Ed_P » 12 Aug 2021, 21:16
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
Ed
Ed_P
-
nanZor
- Shogun
![Shogun Shogun](./images/ranks/SilverStar5.png)
- Posts: 381
- Joined: 09 Apr 2019, 03:27
- Distribution: Porteus 5.01 x86-64 LXQT
Post#6
by nanZor » 06 Nov 2021, 20:10
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?
That's a UNIX book - cool. -Garth
nanZor
-
Ed_P
- Contributor
![Contributor Contributor](./images/ranks/contributor.gif)
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Post#7
by Ed_P » 06 Nov 2021, 21:52
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.
Ed
Ed_P