How to start the ISO from HD using Grub2?

Post here if you are a new Porteus member and you're looking for some help.
oui
White ninja
White ninja
Posts: 16
Joined: 20 Feb 2013, 17:53
Distribution: SliTaz
Location: earth

How to start the ISO from HD using Grub2?

Post#1 by oui » 20 Feb 2013, 18:01

Hi
I wish to tray Porteus2
How to start the ISO from HD using Grub2?
Kind regards

OldGeek
Ronin
Ronin
Posts: 2
Joined: 27 Apr 2012, 00:11
Distribution: Ubuntu, Mint, Pinguy, Porteus,
Location: Chicago

Re: How to start the ISO from HD using Grub2?

Post#2 by OldGeek » 20 Feb 2013, 22:45

Personally, I find it effective to use VirtualBox to boot ISO images, but I believe you may find answers to your question at
http://www.webupd8.org/2011/02/how-to-b ... y-way.html

All the best 8)

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: How to start the ISO from HD using Grub2?

Post#3 by fanthom » 21 Feb 2013, 09:46

i have no experience with grub2 but here is a sample for grub4dos which should be similar:
http://forum.porteus.org/viewtopic.php?f=81&t=1866
Please add [Solved] to your thread title if the solution was found.

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

Re: How to start the ISO from HD using Grub2?

Post#4 by Ed_P » 21 Feb 2013, 16:09

The Grub4DOS menu shown here is for version 2.0.

http://forum.porteus.org/viewtopic.php? ... 841#p12841

And no file extractions needed. Might be a better example for Grub2.
Ed

oui
White ninja
White ninja
Posts: 16
Joined: 20 Feb 2013, 17:53
Distribution: SliTaz
Location: earth

Re: How to start the ISO from HD using Grub2?

Post#5 by oui » 21 Feb 2013, 20:31

Hi

Thank you for your help.

I only have Linux on my PC any more since more than 5 y. and can do nothing probably with grub4dos: it is the other world, the M$ world :evil:

and grub2 is an appreciable amount of years the official boot loader from GNU and did be accepted by all serious distributions, contributing or not :crazy: ....

but I did observe since I have Grub2 in the MBR that a lot of young distributors forget to care care on this reality and build their own ISO's without understandig: Grub2 can't work with them (it is now possible to say: absolutely all established distros can manage it. it is a real standard...

it is a great handicap for a distribution don't to take care on this.

kind regards

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: How to start the ISO from HD using Grub2?

Post#6 by Ahau » 21 Feb 2013, 21:09

Thanks oui,

Porteus is fully compatible with grub2, meaning that grub2 can boot it without a problem. However, most users do not utilize grub2 for a number of reasons, primarily that syslinux is the default bootloader for Porteus (so most people use that) and grub2 is not used by default in Slackware (upon which Porteus is based, and from which many of our users originate).

One of our members (and documentation team contributors), francois, put together this post on grub2:

viewtopic.php?f=48&t=1790

Please note that the location of the kernel and initrd have changed, so you'll want to point grub2 to /boot/syslinux/vmlinuz and /boot/syslinux/initrd.xz, respectively (absolute paths from the root directory of the partition set as root for your grub2 entry). "toroot" has also changed to "login=root" if you want to be logged in as root.

There is also a link at the bottom of that post to an example of booting an iso file from grub2 (on the slax website), here:


http://old.slax.org/forum.php?action=vi ... ntID=83453


Given that I've never booted an ISO file from grub2 myself (I always just extract it because it doesn't take up any more room than the ISO file itself), some guesswork is involved, but I imagine the entry would look something like this:

Code: Select all

menuentry "Porteus ISO" {
insmod part_msdos
insmod ext2
set isofile="/isos/Porteus-v2.0-i486.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile 
initrd (loop)/boot/syslinux/initrd.xz
}
I hope that helps, or is at least a step in the right direction.
Please take a look at our online documentation, here. Suggestions are welcome!

oui
White ninja
White ninja
Posts: 16
Joined: 20 Feb 2013, 17:53
Distribution: SliTaz
Location: earth

Re: How to start the ISO from HD using Grub2?

Post#7 by oui » 22 Feb 2013, 22:13

Hi Ahau

I confirm: Your code is good. Only a line more is needed:

menuentry "Porteus ISO" {
insmod part_msdos
insmod ext2

set root=(hd0,5) <-- as you need on your own system!
set isofile="/isos/Porteus-v2.0-i486.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile
initrd (loop)/boot/syslinux/initrd.xz
}


Tank you very much!

Kind rgds

oui
White ninja
White ninja
Posts: 16
Joined: 20 Feb 2013, 17:53
Distribution: SliTaz
Location: earth

Re: How to start the ISO from HD using Grub2?

Post#8 by oui » 21 Oct 2014, 22:28

Hi

1 1/2 y later, I did go back to...

Grub legacy :D

Is there an analog ready to use text proposal in the forum or doc for menu.lst?

Kind regards

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

Re: How to start the ISO from HD using Grub2?

Post#9 by Ed_P » 22 Oct 2014, 02:38

oui wrote: and can do nothing probably with grub4dos: it is the other world, the M$ world :evil:
Just for the record, grub4dos has NOTHING to do with the MS world, either Windows or DOS. It is a modern, updated, supported, boot manager that can boot anything.
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: How to start the ISO from HD using Grub2?

Post#10 by Bogomips » 22 Oct 2014, 11:40

oui wrote:Hi

1 1/2 y later, I did go back to...

Grub legacy :D

Is there an analog ready to use text proposal in the forum or doc for menu.lst?

Kind regards
Been using Grub 1 for all distros. Will post a bit later, if no one in meantime provides info.

UPDATE: http://forum.porteus.org/viewtopic.php?f=62&t=3994
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

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

Re: How to start the ISO from HD using Grub2?

Post#11 by Bogomips » 22 Oct 2014, 14:51

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
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: How to start the ISO from HD using Grub2?

Post#12 by francois » 23 Oct 2014, 13:10

Welcome back oui!

For grub2 and porteus you will find information in:
http://forum.porteus.org/viewtopic.php?f=62&t=946

For grub legacy and porteus there is this thread:
http://forum.porteus.org/viewtopic.php?f=48&t=1790
Last edited by francois on 24 Oct 2014, 04:25, edited 5 times in total.
Prendre son temps, profiter de celui qui passe.

linus72
Ronin
Ronin
Posts: 2
Joined: 03 Apr 2011, 22:05
Location: gordonsville,Va

Re: How to start the ISO from HD using Grub2?

Post#13 by linus72 » 26 Oct 2014, 20:07

I simply did this-
Porteus iso is on root (/) of sda5 which is the Ubuntu partition, Win7 on sda1
as root - (terminal) #mkdir /porteus
used isomaster (as root) to extract porteus kernel/initrd to /porteus folder

Edit /etc/grub.d/40_custom as root in my Ubuntu install

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.

menuentry "Plop"{
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set=root 586a7270-325c-41a5-a3f9-704c3b8920a8
	linux16 /porteus/plpbt
}
menuentry "Porteus"{
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set=root 586a7270-325c-41a5-a3f9-704c3b8920a8
	linux /porteus/vmlinuz from=/Porteus-XFCE-v3.0.1-i486.iso copy2ram changes=/porteussave.dat
	initrd /porteus/initrd.xz
}
menuentry "SalixLive"{
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set=root 586a7270-325c-41a5-a3f9-704c3b8920a8
	linux /boot/vmlinuz initrd=/boot/initrd.gz max_loop=255 vga=791 locale=en_US.utf8 keymap=us useswap=yes copy2ram=no tz=Etc/GMT runlevel=4 changes=/boot/sav
	initrd /boot/initrd.gz
}
menuentry "Ultimate GamersEdition"{
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set=root 586a7270-325c-41a5-a3f9-704c3b8920a8
        set isofile="/ultimate-edition-4.4-x86-gamers.iso"
        loopback loop /ultimate-edition-4.4-x86-gamers.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ultimate-edition-4.4-x86-gamers.iso noeject noprompt splash --file=/cdrom/preseed/ultimate.seed initrd=/casper/initrd.lz quiet splash --
        initrd (loop)/casper/initrd.lz
}
did "update-grub" in Ubuntu 14.04 and bam I'm bootin porteus off iso persistent bada-bing, bada boom lol

Code: Select all

#ls /
Porteus-XFCE-v3.0.1-i486.iso  porteussave.dat
bin/                          proc/
boot/                         root/
dev/                          run/
etc/                          sbin/
home/                         slitaz-4.0.iso
initrd.img@                   srv/
lib/                          sys/
lost+found/                   tmp/
media/                        ultimate-edition-4.4-x86-gamers.iso
mnt/                          usr/
opt/                          var/
porteus/                      vmlinuz@

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

Re: How to start the ISO from HD using Grub2?

Post#14 by francois » 26 Oct 2014, 21:28

Good. For sure this is one way to do it. It depends on what you want to do.
http://www.porteus.org/faq.html#twenty4
http://www.porteus.org/component/conten ... tcode.html
Prendre son temps, profiter de celui qui passe.

Post Reply