Page 1 of 2
booting from iso file (not from iso cdrom)
Posted: 01 Mar 2015, 16:20
by Rava
Maybe a silly question....
The cheatcodes.txt says:
Code: Select all
from=/path/porteus.iso
... Loads Porteus from the specified device, folder or ISO file.
I found on the web this, but it's about grub2:
Rather then wasting a CD or wearing-out one of your USB sticks, you could boot directly off the ISO. See below for a sample entry of the Grub2 40_custom file. Change /path/to/iso.iso as required. More options
menuentry "Porteus ISO" {
set iso="/path/to/iso.iso"
loopback loop (hd0,1)$iso
linux (loop)/boot/syslinux/vmlinuz from=/dev/sda1$iso iso-scan/filename=$iso noeject
initrd (loop)/boot/syslinux/initrd.xz
(from
http://peter-heinrich-claus.eu.org/arti ... x.php#v3_1 )
Since it says nothing in the cheatcodes.txt, does that mean one can load any bootable ISO, be it Porteus, another Linux or even BSD or Windoze from an given ISO file like so?
Is any more stuff needed to be told to Porteus when it's NOT a Porteus ISO to boot, or will all bootable ISO work that way?
Re: booting from iso
Posted: 01 Mar 2015, 17:21
by neko
@Rava
My understanding is as following.
These functions are depending on grub.
----------------------------------------------
set iso="/path/to/iso.iso"
loopback loop (hd0,1)$iso
linux (loop)/boot/syslinux/vmlinuz
initrd (loop)/boot/syslinux/initrd.xz
----------------------------------------------
Other functions are depending on the initram of each distribution.
----------------------------------------------
from=/dev/sda1$iso iso-scan/filename=$iso
----------------------------------------------
Thanks.
Re: booting from iso
Posted: 01 Mar 2015, 17:45
by Rava
^
I also think the non Porteus quoted stuff is about grub.
But the Porteus cheatcodes.txt just says the above.
"from=/path/porteus.iso"
No more info, therefore my question: will any bootable ISO boot like so? With the usual frugal USB or Harddisk install running Porteus-installer-for-Linux.com, using syslinux and/or isolinux and/or ldlinux.sys, but NOT grub?
But the standard porteus.cfg has aditional info already, like:
KERNEL vmlinuz
APPEND initrd=initrd.xz nomagic base_only norootcopy
Now, what to do when the iso has, say, initrd but no initrd.gz?
What to do when the vmlinux and initrd is not in boot/syslinux, but maybe in the ISO root directory?
(Why is Porteus-installer-for-Linux.com named .com and not .sh anyway?)
Re: booting from iso
Posted: 01 Mar 2015, 19:33
by Ed_P
Maybe these grub4dos lines will help.
Code: Select all
timeout 300
default 0
fallback 1
map --unhook
set ISOx=elementaryos.iso
set ISO31=Porteus-LXQT-v3.1-x86_64-nu.iso
set ISO30i=Porteus-RazorQT-v3.0.1-i486-nu.iso
set ISO30=Porteus-RazorQT-v3.0.1-x86_64-nu.iso
set ISO21=Porteus-RazorQT-v2.1-x86_64.iso
# menu entries
title Porteus 3.1 changes=EXIT \n186MB\n %ISO31%
find --set-root /ISOs/%ISO31%
map --heads=0 --sectors-per-track=0 /ISOs/%ISO31% (0xff)
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz from=/ISOs/%ISO31% changes=EXIT:/porteus3.1/changes/porteussave.dat extramod=/porteus3.1/Modules volume=40 ramsize=80%
initrd /boot/syslinux/initrd.xz
title Windows 7 System Repair Disc - 64-bit\n 187MB\n\ When prompted press Enter to boot disc.
find --set-root /ISOs/repair_disc_windows_7_64_bit.iso
map /ISOs/repair_disc_windows_7_64_bit.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
title X. Elementary OS \n 845MB\n -unstable-amd64.20140810.iso
find --set-root /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0 /ISOs/%ISOx% (0xff)
map --hook
root (0xff)
#kernel /casper/vmlinuz file=/ISOs/%ISOx% iso-scan/filename=/ISOs/%ISO% boot=casper quiet splash --
kernel /casper/vmlinuz file=/ISOs/%ISOx% iso-scan/filename=/ISOs/%ISO% boot=casper quiet splash --
initrd /casper/initrd.lz
Whether it's from= or file= or whatever depends on the OS but yes ISO can be booted.
Re: booting from iso
Posted: 01 Mar 2015, 22:36
by Rava
^
Interesting.... I look into it ASAP... G'night for now!
Re: booting from iso file (not from iso cdrom)
Posted: 27 Jul 2015, 20:13
by Bogomips
phhpro wrote:To clarify in advance: Yes, this is about Grub2, and Grub2 only. Grub Legacy doesn't really support booting off ISO.
IMHO one cannot categorically write off Grub Legacy, as the
loop mount need ony be done just the once. (See
http://forum.porteus.org/viewtopic.php?f=62&t=3994) Quite a few of us use Grub Legacy to boot across distros, satisfying each distro's idiosyncracies with its own set of kernel parameters. e.g. Mint needs
live-media=, while others require
fromiso= etc.
Can give, as an example, regular Porteus boot of iso file from hd using Grub Legacy:-
Entry in menu.lst:
Code: Select all
title Porteus Live UPrmPorteus-KDE4-v3.1-i486.iso (Remastered)
root (hd0,0)
kernel /por/up3.1/vmlinuz from=/tmp/iso/UPrmPor-KDE4-v3.1-i486.iso copy2ram ramsize=30% noauto changes=/dev/sda4 changes-ro guiexec=palemoon~-profile~/mnt/sda1/tmp/DVD_Space/pmProfile timezone=Europe/London volume=80%
initrd /por/up3.1/initrd.xz
Kernel command line:
Code: Select all
guest@porteus:~$ cat /proc/cmdline
quiet from=/tmp/iso/UPrmPor-KDE4-v3.1-i486.iso copy2ram ramsize=30% noauto changes=/dev/sda4 changes-ro guiexec=palemoon~-profile~/mnt/sda1/tmp/DVD_Space/pmProfile timezone=Europe/London volume=80%
Using a stopwatch and timing from moment of hitting Grub entry, and loading from iso file with copy2ram, changes, rootcopy; activation of VLC, python, gtk+3; opening of Konsole, Kate, Nautilus windows; right up to final opening of PaleMoon window, took 1min 35sec with kernel 3.18.18 and 1min 34sec with kernel 3.18.19.
Re: booting from iso file (not from iso cdrom)
Posted: 29 Jul 2015, 15:32
by francois
@bogomips:
Does your grub legacy strategy works for other distributions isos: archlinux or the sort
?
Re: booting from iso file (not from iso cdrom)
Posted: 29 Jul 2015, 16:15
by Bogomips
francois wrote:@bogomips:
Does your grub legacy strategy works for other distributions isos: archlinux or the sort
?
Just a sample from latest menu.lst:
Code: Select all
# ISO boot Sat Nov 30 17:44:40 UTC 2013
title Linux Mint 16 Petra Cinnamon DVD 'iso-scan/filename='linuxmint-16-cinnamon-dvd-32bit.iso' 26.11.13
root (hd0,0)
kernel /Mint/Petra/vmlinuz live-media=/dev/sda10 iso-scan/filename=/tmp/linuxmint-16-cinnamon-dvd-32bit.iso file=/cdrom/preseed/mint.seed boot=casper noprompt
initrd /Mint/Petra/initrd.lz
# ISO boot Sat Jun 21 16:30:16 CEST 2014
title KaOS Live KDE 4.13.2 'fromiso=' KaOS-2014.06-x86_64.iso 12.06.14
root (hd0,0)
kernel /KaOS/kdeosiso kdeosisolabel=p_10 quiet lang=engb xdriver=no xres=1280x1024 kdeosisobasedir=tmp/kaos
initrd /KaOS/kdeosiso.img
title Kanotix Live - GFX - EN 'fromiso=' kanotix-2.6.38 PERSISTENCE EXAMPLE
root (hd0,0)
kernel /kx/vmlinuz fromiso=/dev/sda5/kx/kanotix-2.6.38.iso boot=live config utc=yes locales=us quiet gfx=on persistent noprompt
initrd /kx/initrd.img
# ISO boot 2014-09-13 22:46:20
title Elementary OS Luna DVD 'iso-scan/filename='elementaryos-stable-i386.20130810.iso' 10.08.13
root (hd0,0)
kernel /ElOs/Luna/vmlinuz live-media=/dev/sda9 iso-scan/filename=/Hold/elementaryos-stable-i386.20130810.iso file=/cdrom/preseed/ubuntu.seed boot=casper noprompt quiet splash --
initrd /ElOs/Luna/initrd.lz
title AgiliaLinux fromiso=AgiliaLinux-8.1.1.1-x86.iso 1.04.13
root (hd0,0)
kernel /AgL/vmlinuz32
initrd /AgL/initrd32.img
title Chakra Live KDE 13.37 'fromiso=' chakra-2012.05-Archimedes-i686.iso 06.06.12
root (hd0,0)
kernel /Ckr/chakraiso chakraisolabel=iso quiet lang=engb nonfree=no xdriver=no xres=1280x1024 chakraisobasedir=Ckr
initrd /Ckr/chakraiso.img
Had Mandriva at one time. Arch should work, as one of above distros is based on Arch. Not certain which.
Update 2-8-15: Chakra it was that forked from Arch in 2010.
Re: booting from iso file (not from iso cdrom)
Posted: 21 Aug 2015, 03:23
by Rava
Have my entries for
TinyCore and
Puppy fatdog:. I use the Porteus installer, this is from my boot/syslinux/porteus.cfg :
Code: Select all
LABEL tc
MENU LABEL Boot TinyCorePure64
TEXT HELP
Boot TinyCorePure64 with Embedded X/GUI extensions.
ENDTEXT
KERNEL /boot/vmlinuz64
INITRD /boot/corepure64.gz
APPEND loglevel=3 vga=791
#LABEL Fatdog64 7.00 via memdisk
#KERNEL memdisk
#INITRD boot/Fatdog64-700.iso
#APPEND iso
#TEXT HELP
# Run fatdog from ISO file
# via memdisk (part of
# syslinux)
#ENDTEXT
Please see that Puppy is deactivated.
TC is now the TC style frugal install, since I am not that good at creating my custom TC iso yet (because of not being able to create a TC conform to rules palemoon module), and so I go for frugal to play and learn about TC and be able to expand it and not having anything lost cause it sad no such sing like Porteus save.dat file.
(I used to have an entry for the ISO file as well, but seems I not saved that entry, silly me.
And here my entries for a
Porteus ISO and good ol
Slax iso:
Code: Select all
LABEL xfceRava.ISO
MENU LABEL Text mode XFCe, RavaStyle
KERNEL vmlinuz
APPEND from=/boot/Porteus-3.1.1_XFCe.iso initrd=initrd.xz sgnfile=porteus-v3.1-x86_64.sgn ramsize=45% zram=20% timezone=Europe/Berlin volume=75% kmap=de
TEXT HELP
Run Porteus the Rava way:
from local ISO file
ENDTEXT
LABEL Slax.ISO
MENU LABEL Slax, RavaStyle
KERNEL /slax/boot/vmlinuz
APPEND from=/boot/slax-German-7.0.8-x86_64.iso vga=normal initrd=/slax/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=perch,xmode
timezone=Europe/Berlin
#initrd=initrd.xz volume=75% kmap=de
# sgnfile=porteus-v3.1-x86_64.sgn ramsize=45% zram=20%
TEXT HELP
Run Slax the Rava way:
from local ISO file
ENDTEXT
Be aware of my
custom changes, e.g. German keyboard, sound volume and such.
Re: booting from iso file (not from iso cdrom)
Posted: 17 Oct 2015, 14:41
by francois
@bogomips:
With grub legacy here is what I have as menu.lst:
Code: Select all
title NEMESIS .iso
root (hd0,1)
kernel /1_isos/nemesis/vmlinuz from=/1_isos/nemesis-v1.1.0-151013-x86_64.iso changes=/1_isos/nemesis login=root
initrd /1_isos/nemesis/initrd.xz
I realized that this would not boot unless I extract vmlinuz and initrd to the /1_isos/nemesis folder. Thus that has to be done for each different iso.
Is there a way to add modules to such a running installation? My provisional answer is no, as the /nemesis/modules (i.e. equivalent of /porteus/modules) folder is inacessible. Not even thru the /mnt/live/nemesis/modules folder.
Re: booting from iso file (not from iso cdrom)
Posted: 17 Oct 2015, 15:29
by Bogomips
francois wrote:I realized that this would not boot unless I extract vmlinuz and initrd to the /1_isos/nemesis folder. Thus that has to be done for each different iso.
If changing iso files with such frequency afaik with grub2 it is possible to loop both initrd and vmlinuz.
Re: booting from iso file (not from iso cdrom)
Posted: 17 Oct 2015, 17:05
by francois
In fact, not sure that grub2 makes it easier.
For grub legacy, it might be possible to make a few scripts.
1) for extracting vmlinuz and initrd.xz of a given iso and set it in the iso appropriate folder
2) mounting the iso, inserting the modules in /porteus/modules folder and makeiso newiso and replacing oldiso with new iso in menu.lst.
3) very easy to change menu.lst in root mode
For grub2:
1) no extraction needed for vmlinuz and initrd.xz
2) idem as for grub legacy.
3) after changing menu entries have to update-grub
Re: booting from iso file (not from iso cdrom)
Posted: 26 Mar 2016, 00:37
by francois
@bogomips:
For grub legacy menu entries:
Code: Select all
title Elementary OS Luna DVD 'elementaryos-0.3.2-stable-amd64.20151209.iso'
root (hd0,1)
kernel /ElOs/freya/vmlinuz live-media=/dev/sda2 iso-scan/filename=/1_isos/elementaryos-0.3.2-stable-amd64.20151209.iso file=/cdrom/preseed/ubuntu.seed boot=casper noprompt quiet splash --
initrd /ElOs/freya/initrd.lz
Where:
In /ElOs/freya I have copied the vmlinuz and initrd.lz of mloop of elementaryos-0.3.2-stable-amd64.20151209.iso
live-media=/dev/sda2, or sda2 is the hdd on which /1_isos/elementaryos-0.3.2-stable-amd64.20151209.iso
Thanks, this worked like a charm.
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