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






