How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post tutorials, HOWTO's and other useful resources here.
User avatar
Ed_P
Contributor
Contributor
Posts: 9270
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#16 by Ed_P » 15 Jan 2026, 05:14

A Windows 11 script to do the grub2 install steps I spoke about here:
How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition (Post by Ed_P #104216)

EFIGrub2.cmd

Code: Select all

@echo off&Title Impliment Ubuntu's grub2 system&Color 1F&MODE CON COLS=70 LINES=70

:: https://forum.porteus.org/viewtopic.php?p=104216#p104216 - Tutorial

echo %CD% & echo.

set EFI=U:\EFI

dir %EFI% > nul 2>&1
if %errorLevel% == 0 (
   echo U: is assigned to the UEFI drive.
 ) else (
   echo  Run the EFIdrv.cmd in Admin mode to assign U: to the EFI drive.  
   echo. & pause > nul & exit
)
echo. & pause > nul

if not exist %CD%\*.iso (
   echo  Downloading the Ubuntu ISO
   curl http://mirrors.rit.edu/ubuntu-releases/25.10/ubuntu-25.10-desktop-amd64.iso -O
   if %errorlevel% == 0 (
      echo. & pause
      dir *.iso
    ) else (
    echo. & echo  Download failed. 
    echo. & pause > nul
    exit
    )
)
explorer "%CD%\ubuntu-25.10-desktop-amd64.iso" > nul
set /p ISO= Enter the drive Letter Explorer has assigned to the iso file: 
dir /og %ISO%:
echo. & pause > nul

:: Check for Run as Admin
net sessions >nul 2>&1
if %errorLevel% == 0 (
   echo  Running as Admin.
   echo.
) else (
   echo  To continue, script must be Run as Admin.
   echo. & pause > nul
   exit
)

:: For testing using other drives.
rem set Udrv=F:
rem set Cdrv=C:
rem if not %Udrv% == "U:" set EFI=%Udrv%\EFI
rem echo on

set /p YN=   Write grub2 to %EFI%\? y/n: 
if /I not "%YN%" == "Y" (
   echo. & pause > nul 
   exit
)
echo.

rem Backup the current Windows' system \Boot folder
if not exist %EFI%\Windows (
   mkdir %EFI%\Windows
   xcopy /e %EFI%\Boot\             %EFI%\Windows\ 
   echo.
) 

xcopy /e /s /y %ISO%:\EFI\boot\     %EFI%\Boot\
del  %EFI%\Boot\mmx64.efi
dir  %EFI%\Boot
echo.

if exist %Udrv%\boot rmdir /s /q      %Udrv%\boot
mkdir %Udrv%\boot
xcopy /e %ISO%:\boot\grub\fonts\      %Udrv%\boot\grub\fonts\ 
xcopy /e %ISO%:\boot\grub\x86_64-efi\ %Udrv%\boot\grub\x86_64-efi\ > nul
echo %ISO%:\boot\grub\x86_64-efi\*.* copied
xcopy /e %ISO%:\boot\grub\*.cfg       %Udrv%\boot\grub\ 
copy  %Udrv%\boot\grub\grub.cfg       %Udrv%\boot\grub\UgrubBkup.cfg
echo.
dir   %Udrv%\boot\grub
echo.

set /p YN=  Copy my custom grub.cfg to %Udrv%\boot\grub\? y/n: 
if "%YN%" == "y" ( 
   copy grub.cfg %Udrv%\boot\grub\
   echo. 
   echo grub.cfg 
   echo.
   type %Udrv%\boot\grub\grub.cfg 
)
echo.
echo Grub2 installed to system's UEFI drive.
echo Reboot to UEFI Menu (F2) and add grub to the boot options.
pause > nul

 
The EFIdrv script it references is found here: How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition (Post by Ed_P #104197)
and the grub.cfg I use is found here: How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition (Post by Ed_P #104325)

pterid
Contributor
Contributor
Posts: 97
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce on ext4 USB

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#17 by pterid » 18 Jan 2026, 15:25

Thanks tpkusr for the tutorial! I tried to test it on my 2022 Windows 11 machine with UEFI and and NTFS main partition...

The first issue I had is that the GRUB commands in your Part 1, Step 2 seem to just set variables:

Code: Select all

# Set the path to your Porteus ISO file

set isopath="/iso/Porteus-KDE-v5.01-x86_64.iso"

set kernelpath='/boot/syslinux/vmlinuz'
set initrdpath='/boot/syslinux/initrd.xz'
set bootparms='from='$isopath' volume=33 reboot=cold extramod=/iso/Modules'
So on its own, these don't boot anything (I tried). I added a couple of commands from one of Ed's posts, to do the boot:

Code: Select all

search -f $isopath --set=root
loopback loop $isopath
linux (loop)/boot/syslinux/vmlinuz from=$isopath $bootparms
initrd (loop)/boot/syslinux/initrd.xz
I think the concatenation of the two above code blocks should work for some people. Unfortunately I got an error:

error: ../../grub-core/fs/ntfs.c:422:read out of range

A slop bot suggests this is do to with the ISO being quite big and my file system being NTFS. So I extracted vmlinuz and initrd and put them in a iso/porteus folder:

Code: Select all

pterid@WINDOWS-8MKHXU0:/mnt/c/iso$ tree
.
├── Modules
├── Porteus-XFCE-v5.01-x86_64.iso
└── porteus
    ├── initrd.xz
    └── vmlinuz
and then changed the custom grub code to

Code: Select all

set isopath="/iso/Porteus-XFCE-v5.01-x86_64.iso"

set kernelpath='/boot/syslinux/vmlinuz'
set initrdpath='/boot/syslinux/initrd.xz'
set bootparms='volume=33 reboot=cold extramod=/iso/Modules'

search -f $isopath --set=root

# loopback loop $isopath <-- moved files out of iso, no more loopback needed

linux /iso/porteus/vmlinuz from=$isopath $bootparms
initrd /iso/porteus/initrd.xz
and at this point Porteus does boot!

User avatar
Ed_P
Contributor
Contributor
Posts: 9270
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#18 by Ed_P » 18 Jan 2026, 16:27

pterid wrote:
18 Jan 2026, 15:25
error: ../../grub-core/fs/ntfs.c:422:read out of range
Defragging the drive might have helped you.

pterid
Contributor
Contributor
Posts: 97
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce on ext4 USB

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#19 by pterid » 18 Jan 2026, 17:17

Ed_P wrote:
18 Jan 2026, 16:27
Defragging the drive might have helped you.
It didn't seem to do anything for me (I did try), but it might help others!

User avatar
Ed_P
Contributor
Contributor
Posts: 9270
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#20 by Ed_P » 18 Jan 2026, 17:59

The other thing that helps me with ISO errors like you experienced is redownloading the file. :)

All my ISOs are on a NTFS drive.

User avatar
tpkusr
Black ninja
Black ninja
Posts: 34
Joined: 22 Oct 2025, 16:47
Distribution: I am using porteus 5.1 alpha 3

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#21 by tpkusr » 22 Jan 2026, 21:25

The first issue I had is that the GRUB commands in your Part 1, Step 2 seem to just set variables:
Thanks @pterid for addressing the issue. I didn't mention that there are two options: one is 'Custom Code' and the other is 'Load Sample Code.' My example was for 'Load Sample Code' to set the variables. Grub2Win converts them into Grub code. On the other hand, you can use standard Grub code when you choose 'Custom Code.' I hope the confusion is cleared now and it will work for you.

pterid
Contributor
Contributor
Posts: 97
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce on ext4 USB

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#22 by pterid » 12 Feb 2026, 00:13

tpkusr wrote:
22 Jan 2026, 21:25
Thanks @pterid for addressing the issue. I didn't mention that there are two options: one is 'Custom Code' and the other is 'Load Sample Code.' My example was for 'Load Sample Code' to set the variables. Grub2Win converts them into Grub code. On the other hand, you can use standard Grub code when you choose 'Custom Code.' I hope the confusion is cleared now and it will work for you.
Thank you again tpkusr! :) I went through the process again to add 5.1 alpha to the boot menu, and it worked perfectly. This is the easiest dual boot I've ever heard of - beautiful!!

User avatar
tpkusr
Black ninja
Black ninja
Posts: 34
Joined: 22 Oct 2025, 16:47
Distribution: I am using porteus 5.1 alpha 3

How to Dual Boot Porteus Linux with windows 11 without USB Drive or Creating Partition

Post#23 by tpkusr » 16 Feb 2026, 10:27

Thank you again tpkusr! I went through the process again to add 5.1 alpha to the boot menu, and it worked perfectly. This is the easiest dual boot I've ever heard of - beautiful!!
You're welcome, pterid! I'm glad that it worked. Thanks for the kind compliment.

Post Reply