Jump to content











Photo
- - - - -

How to boot ubuntu.iso file using grub2 on UEFI machines?


  • Please log in to reply
5 replies to this topic

#1 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 177 posts
  • Location:tel aviv
  •  
    Israel

Posted 18 May 2019 - 07:55 PM

I tried this  - But it does not work
 
 
}
menuentry "ubuntu.iso" {
    linuxefi (loop)/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash iso-scan/filename=/Images/ubuntu.iso noeject noprompt --
    initrdefi (loop)/casper/initrd.lz
}
 
 
menuentry "ubuntu.iso" {
    set root=(hd0,1)
    set isofile="/Images/ubuntu.iso"
    loopback loop $isofile
    linuxefi (loop)/live/vmlinuz boot=live union=overlay username=user config components noswap noeject toram=filesystem.squashfs ip='' nosplash findiso=$isofile splash --
    initrdefi (loop)/live/initrd.img
}

 


  • Mov AX 0xDEAD likes this

#2 wimb

wimb

    Platinum Member

  • Developer
  • 2626 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 18 May 2019 - 08:20 PM

Hello sara - pmedia

 

This is a working solution that can be made easily.

 

http://reboot.pro/to...drive/?p=208817

 

http://reboot.pro/to...drive/?p=209075

 

Attached File  Win10_Inst_Eng.pdf   1.39MB   63 downloads

 

 



#3 wimb

wimb

    Platinum Member

  • Developer
  • 2626 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 19 May 2019 - 06:37 AM

Download ubuntu-19.04-desktop-amd64.iso from here copied to folder images on FAT32 partition of Portable SSD T5

 

Download UEFI_MULTI-89 from here will make UEFI Grub2 boot configuration files Boot\grub\grub.cfg and Boot\grub\grub_Linux.cfg

 

In case UEFI Grub2 is not available as Boot option in your F8 Boot Menu for your Portable SSD 

then you need to use BOOTICE to Add UEFI entry.
Unneeded for USB-Stick, but UEFI Grub2 boot entry is easily lost in case of Portable SSD.
Select as UEFI Boot entry on USB the Linux Mint Grub2 file \EFI\Boot\BOOTx64.EFI
 
UEFI_Grub2.png
 
More Info on page 8 of Attached File  Win10_Inst_Eng.pdf   1.39MB   63 downloads

 

Attached File  Screenshot from 2019-05-19 06-27-19.png   524.69KB   0 downloads

 

File Boot\grub\grub_Linux.cfg has entry for UEFI Secure booting of ubuntu-19.04-desktop-amd64.iso located in folder images on FAT32 partition of Portable SSD T5

 

where Boot\grub\grub.cfg will export iso_drive

if [ -e "$iso_drive/images/ubuntu-19.04-desktop-amd64.iso" ]; then
menuentry "ISO Ubuntu - ubuntu-19.04-desktop-amd64.iso $iso_drive" {
  set iso_path=/images/ubuntu-19.04-desktop-amd64.iso
  loopback loop $iso_drive$iso_path
  linux (loop)/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=$iso_path quiet splash ---
  initrd (loop)/casper/initrd
}
fi



#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7033 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 19 May 2019 - 09:08 AM

Most Ubuntu ISOs contain a loopback.cfg file. This already has the correct cheat codes to boot correctly from an ISO file.

https://rmprepusb.bl...menu-using.html

so you just need to run it from your grub2 menu after using loop to mount the iso file - this way you won't have to change the cheat code line when you come to change Ubuntu version.

configfile /boot/grub/loopback.cfg


#5 wimb

wimb

    Platinum Member

  • Developer
  • 2626 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 19 May 2019 - 10:03 AM

I confirm that the ubuntu internal loopback.cfg as proposed by steve6375 can be used. 

It is not enough to just add the configfile line for using loopback.cfg, but it requires in that case a grub2 menuentry as given below

if [ -e "$iso_drive/images/ubuntu-19.04-desktop-amd64.iso" ]; then
menuentry "ISO Ubuntu - ubuntu-19.04-desktop-amd64.iso $iso_drive - loopback.cfg" {
  set iso_path=/images/ubuntu-19.04-desktop-amd64.iso
  export iso_path
  loopback loop $iso_drive$iso_path
  set root=(loop)
  configfile /boot/grub/loopback.cfg
  loopback --delete loop}
fi

Attached File  Screenshot from 2019-05-19 09-57-21.png   530.07KB   0 downloads



#6 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 177 posts
  • Location:tel aviv
  •  
    Israel

Posted 4 weeks ago

Thank you Friends
You are great :)

  • wimb likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users