This answer will explain how to use Windows CMD to boot from the Ubuntu ISO file in the C partition without needing a USB flash drive or creating another partition.
The steps:
- Install sudo for Windows (this step is optional)
- Create a grub menu
- Download the Ubuntu ISO file
- Download grub-2.12 for Windows
- Install grub
- Reboot to use Ubuntu live system

- Install sudo for Windows
This step is optional. if you don't want to install sudo, you can open cmd as administrator, delete sudo word from any command in this guide, and go to step 2.
To install sudo for Windows, open Windows cmd and apply this command:
winget install gerardog.gsudo
"gsudo is a sudo equivalent for Windows, with a similar
user-experience as the original Unix/Linux sudo. Allows you to run a
command (or re-launch your current shell) with elevated permissions,
in the current console window or a new one."
When sudo is installed reopen cmd. if you don't want to install sudo, you can open cmd as administrator instead.
- Create a grub menu
In Windows cmd apply these commands:
echo #boot menu > grub.cfg
notepad grub.cfg
Windows Notepad will open. type or copy the following, and save the file:
menuentry "win 11 pro /sda1" --class windows11 {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
parttool ${root} hidden-
chainloader +1
}
menuentry "noble-desktop-amd64.iso Live system" --class ubuntu {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
loopback loop /noble-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/noble-desktop-amd64.iso --
initrd (loop)/casper/initrd
}
Save and exit notepad. make sure that is C partition the first partition in your hard disk. if it is the second partition, replace set root='hd0,msdos1' by set root='hd0,msdos2' in the second menu entry.
- Download the Ubuntu ISO file
In Windows cmd and apply this command:
curl https://cdimage.ubuntu.com/noble/daily-live/current/noble-desktop-amd64.iso --output noble-desktop-amd64.iso
You can choose another Ubuntu ISO file but correct the link and the file name in the last command and grub menu entry.
When the ISO file is downloaded, move grub.cfg to /boot/grub and the Ubuntu ISO file to the root of the C partition
In Windows cmd and apply these commands:
sudo mkdir c:\boot\grub
sudo move grub.cfg c:\boot\grub\
sudo move noble-desktop-amd64.iso c:\
- Download grub-2.12 for Windows
curl https://ftp.gnu.org/gnu/grub/grub-2.12-for-windows.zip --output grub-2.12-for-windows.zip
When the download is finished, extract the zip file
tar -xf grub-2.12-for-windows.zip
- Install grub
First, make sure that the C:\boot directory exists and is not hidden. if it exists and isn't hidden, go on
cd %UserProfile%\grub-2.12-for-windows
To install Grub2 for BIOS, type or copy the following, (replacing X with your drive letter and # your Disk number), and then press Enter.
sudo grub-install.exe --force --no-floppy --target=i386-pc --boot-directory=X:\boot //./PHYSICALDRIVE#
in my case, I used this command:
sudo grub-install.exe --force --no-floppy --target=i386-pc --boot-directory=C:\boot //./PHYSICALDRIVE0
To install Grub2 for UEFI 32-bit or 64-bit, see this guide.
If the C:\boot directory is hidden or does not exist, use this command instead of the last one:
grub-install.exe --force --no-floppy --target=i386-pc --boot-directory=X:\ //./PHYSICALDRIVE#
(replacing X with your drive letter and # your Disk number), and then press Enter. in this case, you must move the grub.cfg to the /grub directory instead of the /boot/grub directory.
When grub is installed successfully, reboot to boot by the Ubuntu live system
shutdown /r

Boot with live Ubuntu session and Ubuntu partition from Windows without a USB and without installing grub