Page 2 of 2

Re: booting from iso file (not from iso cdrom)

Posted: 26 Mar 2016, 04:44
by Ed_P
FWIW This grub2 menu works for isos without extracting files from it.

Code: Select all

menuentry "Porteus LXQT ISO"   {
     set iso=/ISOs/Porteus-LXQT-v3.1-x86_64.iso
     search -f $iso --set=root
     echo ISO root is:          $root
     echo ISO is:               $iso
     if [ -f (hd0,1)/USB_INSTALLATION.txt ]; then
         set linux_drv=/mnt/sdb1/porteus3.1
     else
         set linux_drv=/mnt/sda5/porteus3.1
     fi
     echo Porteus extramods     $linux_drv
     set porteus_parms="extramod=$linux_drv/Modules;$linux_drv/modsavedat volume=33 reboot=cold"
     echo Porteus parms are:    $porteus_parms
      loopback loop $iso
     sleep -v -i 17
     linux (loop)/boot/syslinux/vmlinuz from=$iso $porteus_parms
     initrd (loop)/boot/syslinux/initrd.xz
}

Re: booting from iso file (not from iso cdrom)

Posted: 26 Mar 2016, 19:49
by Rava
What is the reason for these:

Code: Select all

     if [ -f (hd0,1)/USB_INSTALLATION.txt ]; then
         set linux_drv=/mnt/sdb1/porteus3.1
     else
         set linux_drv=/mnt/sda5/porteus3.1
     fi
     echo Porteus extramods     $linux_drv

Re: booting from iso file (not from iso cdrom)

Posted: 26 Mar 2016, 20:45
by Ed_P
Rava wrote:What is the reason for these:
The same menu works on my USB drive and harddrive. The .txt file is on the Porteus USB drive and other is for the my harddrive. This way I can copy the menu from harddrive to USB drive.

Re: booting from iso file (not from iso cdrom)

Posted: 26 Mar 2016, 22:24
by Bogomips
@ francois

No need for mloop with these newer kernels. Iso can just be mounted. Looping taken care of for you. 8)

@ Ed

Methinks it's about time you regaled us with a tutorial, and what better subject than Grub 2 :twisted:

Re: booting from iso file (not from iso cdrom)

Posted: 26 Mar 2016, 23:10
by Ed_P
Most of my learning I got from this app:

https://sourceforge.net/projects/grub2win/files/

which works with BIOS based and EFI based systems.

Re: booting from iso file (not from iso cdrom)

Posted: 30 Mar 2016, 02:33
by francois
@bogomips:
The arch linux variant is chakra. Here is an example for manjaro:

Code: Select all

title      manjaro MJRO1512  'fromiso=' manjaro-net-15.12-i686.iso
root      (hd0,0)
kernel     /Manjaro/manjaro misobasedir=manjaro misolabel=MJRO1512 nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree showopts
initrd       /Manjaro/manjaro.img
You have to mloop the manjaro.iso and look into isolinux.cfg to get the appropriate menu.lst settings. 8)

Something is wrong about this menu entry of mine. :(