Discussion:
[Grml] grub2 loopback feature
Alexander 'Leo' Bergolth
2010-06-15 15:38:59 UTC
Permalink
Hi!

I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.

Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?

I am thinking about something like:

/boot/grub/grub.cfg on USB drive:
-------------------- 8< --------------------
menuentry 'GRML' {
iso_path=/iso/grml_2010.04.iso
bootid=grml201004
export iso_path
export bootid

loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
}
-------------------- 8< --------------------

Unfortunately, when selecting the menuantry above, my box reboots.

When trying the same on the grub commandline, it reboots at
"set root=(loop)". So root=loop doesn't seem to be supported...

On the other hand, "configfile (loop)/boot/grub/grub.cfg" perfectly
jumps to grmls boot menu. But when using this approach, I guess some
support in grml's grub.cfg would be needed so that grub can correctly
locate the image files.
(Maybe a $loop variable prepended to all filenames in grmls grub.cfg,
which is conditionally set to "(loop)"?)

Any other hints?

Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
T o n g
2010-06-17 17:14:40 UTC
Permalink
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/

Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Michael Prokop
2010-06-17 17:22:43 UTC
Permalink
Post by T o n g
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/
Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
I wrote:

http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/

And for the german speaking people, Marc Haber wrote about it as
well:

http://blog.zugschlus.de/archives/825-grml-als-eigenes-Rescuesystem.html

HTH && regards,
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.mur.at/pipermail/grml/attachments/20100617/47950fa6/attachment.pgp
Alexander 'Leo' Bergolth
2010-06-17 19:46:28 UTC
Permalink
Post by Michael Prokop
Post by T o n g
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/
Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/
And for the german speaking people, Marc Haber wrote about it as
http://blog.zugschlus.de/archives/825-grml-als-eigenes-Rescuesystem.html
Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?
I am trying to branch to grmls own grub configuration:
-------------------- 8< --------------------
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
-------------------- 8< --------------------

... which seems to fail because of a bug in grub. (set root=(loop) fails)
See http://savannah.gnu.org/bugs/?30143 for the bug report.

As a workaround, I suggested to prepend a variable like ${loop} to all
paths in grmls grub.conf, which could be set to loop="(loop)" by the
calling grub.cfg on the usb drive. Besides a variable like ${kernelopts}
at the end of each kernel commandline would allow passing custom boot
options from the calling grub.cfg.

Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
Michael Prokop
2010-06-25 12:16:02 UTC
Permalink
Post by Alexander 'Leo' Bergolth
Post by Alexander 'Leo' Bergolth
Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?
-------------------- 8< --------------------
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
-------------------- 8< --------------------
... which seems to fail because of a bug in grub. (set root=(loop) fails)
See http://savannah.gnu.org/bugs/?30143 for the bug report.
As a workaround, I suggested to prepend a variable like ${loop} to all
paths in grmls grub.conf, which could be set to loop="(loop)" by the
calling grub.cfg on the usb drive. Besides a variable like ${kernelopts}
at the end of each kernel commandline would allow passing custom boot
options from the calling grub.cfg.
Jordan Uggla pointed out on #grml that it's working for him with
grub 1.98 compiled from source.

Instead of working around I'd prefer to see this bug fixed in Grub.
I've just updated templates/boot/grub/ to the most recent Grub2
version from Debian/unstable and also added support for
"${kernelopts}" (what a lovely idea! :)):

http://git.grml.org/?p=grml-live.git;a=commit;h=07ca6d5

The daily ISOs (http://daily.grml.org/) by tomorrow (2010-06-26)
will include this update. Would be great to get know whether this
fixes your issue.

regards,
-mika-
--
http://grml.org/ # Linux for texttool-users and sysadmins
http://wiki.grml.org/ # share your knowledge
http://grml.supersized.org/ # the grml development weblog
#grml @ irc.freenode.org # meet us on irc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mur.at/pipermail/grml/attachments/20100625/209999a0/attachment.pgp>
Michael Prokop
2010-06-25 12:16:02 UTC
Permalink
Post by Alexander 'Leo' Bergolth
Post by Alexander 'Leo' Bergolth
Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?
-------------------- 8< --------------------
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
-------------------- 8< --------------------
... which seems to fail because of a bug in grub. (set root=(loop) fails)
See http://savannah.gnu.org/bugs/?30143 for the bug report.
As a workaround, I suggested to prepend a variable like ${loop} to all
paths in grmls grub.conf, which could be set to loop="(loop)" by the
calling grub.cfg on the usb drive. Besides a variable like ${kernelopts}
at the end of each kernel commandline would allow passing custom boot
options from the calling grub.cfg.
Jordan Uggla pointed out on #grml that it's working for him with
grub 1.98 compiled from source.

Instead of working around I'd prefer to see this bug fixed in Grub.
I've just updated templates/boot/grub/ to the most recent Grub2
version from Debian/unstable and also added support for
"${kernelopts}" (what a lovely idea! :)):

http://git.grml.org/?p=grml-live.git;a=commit;h=07ca6d5

The daily ISOs (http://daily.grml.org/) by tomorrow (2010-06-26)
will include this update. Would be great to get know whether this
fixes your issue.

regards,
-mika-
--
http://grml.org/ # Linux for texttool-users and sysadmins
http://wiki.grml.org/ # share your knowledge
http://grml.supersized.org/ # the grml development weblog
#grml @ irc.freenode.org # meet us on irc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20100625/209999a0/attachment-0002.pgp>
Michael Prokop
2010-06-25 12:16:02 UTC
Permalink
Post by Alexander 'Leo' Bergolth
Post by Alexander 'Leo' Bergolth
Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?
-------------------- 8< --------------------
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
-------------------- 8< --------------------
... which seems to fail because of a bug in grub. (set root=(loop) fails)
See http://savannah.gnu.org/bugs/?30143 for the bug report.
As a workaround, I suggested to prepend a variable like ${loop} to all
paths in grmls grub.conf, which could be set to loop="(loop)" by the
calling grub.cfg on the usb drive. Besides a variable like ${kernelopts}
at the end of each kernel commandline would allow passing custom boot
options from the calling grub.cfg.
Jordan Uggla pointed out on #grml that it's working for him with
grub 1.98 compiled from source.

Instead of working around I'd prefer to see this bug fixed in Grub.
I've just updated templates/boot/grub/ to the most recent Grub2
version from Debian/unstable and also added support for
"${kernelopts}" (what a lovely idea! :)):

http://git.grml.org/?p=grml-live.git;a=commit;h=07ca6d5

The daily ISOs (http://daily.grml.org/) by tomorrow (2010-06-26)
will include this update. Would be great to get know whether this
fixes your issue.

regards,
-mika-
--
http://grml.org/ # Linux for texttool-users and sysadmins
http://wiki.grml.org/ # share your knowledge
http://grml.supersized.org/ # the grml development weblog
#grml @ irc.freenode.org # meet us on irc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20100625/209999a0/attachment-0003.pgp>
Alexander 'Leo' Bergolth
2010-06-17 19:46:28 UTC
Permalink
Post by Michael Prokop
Post by T o n g
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/
Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/
And for the german speaking people, Marc Haber wrote about it as
http://blog.zugschlus.de/archives/825-grml-als-eigenes-Rescuesystem.html
Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?
I am trying to branch to grmls own grub configuration:
-------------------- 8< --------------------
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
-------------------- 8< --------------------

... which seems to fail because of a bug in grub. (set root=(loop) fails)
See http://savannah.gnu.org/bugs/?30143 for the bug report.

As a workaround, I suggested to prepend a variable like ${loop} to all
paths in grmls grub.conf, which could be set to loop="(loop)" by the
calling grub.cfg on the usb drive. Besides a variable like ${kernelopts}
at the end of each kernel commandline would allow passing custom boot
options from the calling grub.cfg.

Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
Alexander 'Leo' Bergolth
2010-06-17 19:46:28 UTC
Permalink
Post by Michael Prokop
Post by T o n g
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/
Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/
And for the german speaking people, Marc Haber wrote about it as
http://blog.zugschlus.de/archives/825-grml-als-eigenes-Rescuesystem.html
Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?
I am trying to branch to grmls own grub configuration:
-------------------- 8< --------------------
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
-------------------- 8< --------------------

... which seems to fail because of a bug in grub. (set root=(loop) fails)
See http://savannah.gnu.org/bugs/?30143 for the bug report.

As a workaround, I suggested to prepend a variable like ${loop} to all
paths in grmls grub.conf, which could be set to loop="(loop)" by the
calling grub.cfg on the usb drive. Besides a variable like ${kernelopts}
at the end of each kernel commandline would allow passing custom boot
options from the calling grub.cfg.

Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
Michael Prokop
2010-06-17 17:22:43 UTC
Permalink
Post by T o n g
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/
Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
I wrote:

http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/

And for the german speaking people, Marc Haber wrote about it as
well:

http://blog.zugschlus.de/archives/825-grml-als-eigenes-Rescuesystem.html

HTH && regards,
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20100617/47950fa6/attachment-0002.pgp>
Michael Prokop
2010-06-17 17:22:43 UTC
Permalink
Post by T o n g
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/
Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
I wrote:

http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/

And for the german speaking people, Marc Haber wrote about it as
well:

http://blog.zugschlus.de/archives/825-grml-als-eigenes-Rescuesystem.html

HTH && regards,
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://ml.grml.org/pipermail/grml/attachments/20100617/47950fa6/attachment-0003.pgp>
Alexander 'Leo' Bergolth
2010-06-15 15:38:59 UTC
Permalink
Hi!

I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.

Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?

I am thinking about something like:

/boot/grub/grub.cfg on USB drive:
-------------------- 8< --------------------
menuentry 'GRML' {
iso_path=/iso/grml_2010.04.iso
bootid=grml201004
export iso_path
export bootid

loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
}
-------------------- 8< --------------------

Unfortunately, when selecting the menuantry above, my box reboots.

When trying the same on the grub commandline, it reboots at
"set root=(loop)". So root=loop doesn't seem to be supported...

On the other hand, "configfile (loop)/boot/grub/grub.cfg" perfectly
jumps to grmls boot menu. But when using this approach, I guess some
support in grml's grub.cfg would be needed so that grub can correctly
locate the image files.
(Maybe a $loop variable prepended to all filenames in grmls grub.cfg,
which is conditionally set to "(loop)"?)

Any other hints?

Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
T o n g
2010-06-17 17:14:40 UTC
Permalink
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/

Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Alexander 'Leo' Bergolth
2010-06-15 15:38:59 UTC
Permalink
Hi!

I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.

Is there a way to make grub jump to the existing /boot/grub/grub.cfg in
the ISO and show its contents as a submenu?

I am thinking about something like:

/boot/grub/grub.cfg on USB drive:
-------------------- 8< --------------------
menuentry 'GRML' {
iso_path=/iso/grml_2010.04.iso
bootid=grml201004
export iso_path
export bootid

loopback loop $iso_path
set root=(loop)
configfile /boot/grub/grub.cfg
}
-------------------- 8< --------------------

Unfortunately, when selecting the menuantry above, my box reboots.

When trying the same on the grub commandline, it reboots at
"set root=(loop)". So root=loop doesn't seem to be supported...

On the other hand, "configfile (loop)/boot/grub/grub.cfg" perfectly
jumps to grmls boot menu. But when using this approach, I guess some
support in grml's grub.cfg would be needed so that grub can correctly
locate the image files.
(Maybe a $loop variable prepended to all filenames in grmls grub.cfg,
which is conditionally set to "(loop)"?)

Any other hints?

Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
T o n g
2010-06-17 17:14:40 UTC
Permalink
Post by Alexander 'Leo' Bergolth
I'd like to use the loopback feature of grub2 to boot a grml iso-image
that resides on a USB drive.
IIRC, mika wrote about it in his blog, http://grml.supersized.org/

Hmm..., no, maybe somewhere else, 'cause searching loopback didn't help.
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Loading...