Option 1: If the ISO is flashed directly to the drive

If your Ubuntu ISO is already flashed to your first hard drive (hd0), you can boot it directly from the GRUB terminal with these steps:

  1. First, identify the exact partition where your ISO is located:

    grub> ls (hd0,*) 
    

    This will show all partitions on hd0.

  2. Set the root to the correct partition (replace # with the actual partition number):

    grub> set root=(hd0,#)
    
  3. If the ISO is flashed directly to the drive (not just stored as a file), you can boot it with:

    grub> linux /casper/vmlinuz boot=casper quiet splash
    grub> initrd /casper/initrd
    grub> boot
    

Option 2: If the ISO is stored as a file on the drive

If you copied the ISO file to a partition on hd0 (rather than “flashing” it), you’ll need to use the loopback method:

grub> set root=(hd0,#)
grub> loopback loop /path/to/ubuntu.iso
grub> linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/path/to/ubuntu.iso quiet splash
grub> initrd (loop)/casper/initrd
grub> boot

Troubleshooting

If you’re not finding the expected files, you may need to explore the drive structure with commands like:

grub> ls /
grub> ls /casper/

The paths might vary slightly depending on your Ubuntu version, but most recent Ubuntu releases follow this pattern.

Note

For newer Ubuntu versions (20.04+), the paths might be slightly different:

grub> linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash

For UEFI systems, you might need to use linuxefi and initrdefi instead of linux and initrd.

For boot order

Restore factory default settings as boot settings Keep hitting F2 upon reboot into BIOS Turn Secure Boot on Go to Security tab and look for “Select an UEFI file as trusted for executing” and click enter.

Select your hard disk like HDD0. Press Enter Select here. Press enter. Select . Press enter Select shimx64.efi. Press enter in boot order, put shimx64.efi as 1st priority!!! Asked “do you wish to add this file …”. type Yes and select enter. Save settings and exit BIOS