booting from iso file (not from iso cdrom)

Non release banter
User avatar
Ed_P
Contributor
Contributor
Posts: 7675
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.0 ISO
Location: Western NY, USA

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

Post#16 by Ed_P » 26 Mar 2016, 04:44

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
}
Last edited by Ed_P on 26 Mar 2016, 20:46, edited 1 time in total.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 4650
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.0 x86_64 + 4.0 i586
Location: Forests of Germany

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

Post#17 by Rava » 26 Mar 2016, 19:49

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
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 7675
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.0 ISO
Location: Western NY, USA

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

Post#18 by Ed_P » 26 Mar 2016, 20:45

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.
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

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

Post#19 by Bogomips » 26 Mar 2016, 22:24

@ 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:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 7675
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.0 ISO
Location: Western NY, USA

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

Post#20 by Ed_P » 26 Mar 2016, 23:10

Most of my learning I got from this app:

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

which works with BIOS based and EFI based systems.
Ed

User avatar
francois
Contributor
Contributor
Posts: 6312
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

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

Post#21 by francois » 30 Mar 2016, 02:33

@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. :(
Prendre son temps, profiter de celui qui passe.

Post Reply