[Solved] UEFI Boot ISO from disk - possible?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
blockhead47
Level 2
Level 2
Posts: 80
Joined: Wed Jun 15, 2016 4:50 pm
Location: Chicago, IL, USA

[Solved] UEFI Boot ISO from disk - possible?

Post by blockhead47 » Wed Dec 13, 2017 4:22 pm

I was able to do this just fine on my old BIOS system. My new system has UFEI boot.
I dual boot Windows 7 and Linux Mint my daily driver. Both installed in UEFI mode.
I have searched and googled but I cannot find a solution that works that allows me
to boot an ISO directly from hard disk via the grub menu. 2 questions:
1) is it possible with UEFI?
2) If so has anyone done it?

This is my configuration:
Layout of /dev/sda:

Code: Select all

MODEL            NAME   SIZE FSTYPE LABEL           UUID                                 MOUNTPOINT
Samsung SSD 850  sda  232.9G                                                             
                 sda1   100M vfat   EFI             B25B-D3A9                            /boot/efi
                 sda2   128M                                                             
                 sda3 107.4G ntfs   Win7_Sys        7A5E5F905E5F4453                     
                 sda4   3.8G swap                   ffa2db74-8b1e-4565-ac4c-e20949bc9a75 [SWAP]
                 sda5   4.7G ext4   SystemRescue    1a8673b9-33f6-4077-9d62-11c25c946193 
                 sda6  37.3G ext4   Linux Mint 18.3 ddcb965b-74d1-493e-99c5-f54ab37a2408 /
Contents of /dev/sda5 (SystemRescue) partition

Code: Select all

.
├── boot
│   └── memdisk
├── boot-repair-disk-64bit.iso
├── gparted-live-0.30.0-1-i686.iso
├── lost+found
└── systemrescuecd-x86-5.1.0.iso

2 directories, 5 files
cat /etc/grub.d/40_custom

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

submenu "System Rescue Utils"{
 menuentry "System Rescue 5.1.0" {
 set root=(hd0,5)
 set isofile="/systemrescuecd-x86-5.1.0.iso"
 loopback loop (hd0,5)$isofile
 linux (loop)/isolinux/rescue64 setkmap=us isoloop=$isofile
 initrd (loop)/isolinux/initram.igz
 }
 menuentry "Boot Repair (64-bit) " {
 set root=(hd0,5)
 set isofile="/boot-repair-disk-64bit.iso"
 loopback loop (hd0,5)$isofile
  linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
  initrd (loop)/casper/initrd.lz
 }
 menuentry "Gparted" {
 set root=(hd0,5)
 set isofile="/gparted-live-0.30.0-1-i686.iso"
 loopback loop $isofile
 linux (loop)/live/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 toram=filesystem.squashfs findiso=$isofile
 initrd (loop)/live/initrd.img
 }
}
Any pointers would be appreciated.
Last edited by blockhead47 on Thu Dec 14, 2017 3:14 am, edited 1 time in total.

Laurent85
Level 15
Level 15
Posts: 5747
Joined: Tue May 26, 2015 10:11 am

Re: UEFI Boot ISO from disk - possible?

Post by Laurent85 » Wed Dec 13, 2017 5:07 pm

Install grml-rescueboot and place your iso images into /boot/grml

Update grub :

Code: Select all

sudo update-grub
Grub menu will offer to boot available iso images. Notice not all iso images support booting this way.
Image

blockhead47
Level 2
Level 2
Posts: 80
Joined: Wed Jun 15, 2016 4:50 pm
Location: Chicago, IL, USA

Re: UEFI Boot ISO from disk - possible?

Post by blockhead47 » Wed Dec 13, 2017 8:26 pm

Thanks for those clues. They got me googling in the right spots.
I did not have to install grml-rescueboot.
Ultimately the solution was found using the grub command ls.
At the grub boot menu I pressed c and entered the ls command. This showed me the boot disk as grub sees it.

The solution was simple then. In /etc/grub.d/40_custom change all my (hd0,5) entries to (hd1,gpt5).
Problem solved. My Entries in 40_custom boot just fine now.

It appears the naming convention is different between Legacy BIOS and UEFI BIOS boot for the boot disk.
I still have a lot to learn about UEFI booting.

Post Reply

Return to “Installation & Boot”