Debian Bug report logs - #759744
debian-cd: loopback.cfg support for booting ISOs from within GRUB

version graph

Package: debian-cd; Maintainer for debian-cd is Debian CD Group <debian-cd@lists.debian.org>; Source for debian-cd is src:debian-cd (PTS, buildd, popcon).

Reported by: Michael Prokop <mika@debian.org>

Date: Fri, 29 Aug 2014 21:30:01 UTC

Severity: wishlist

Found in version debian-cd/3.1.15

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian CD Group <debian-cd@lists.debian.org>:
Bug#759744; Package debian-cd. (Fri, 29 Aug 2014 21:30:06 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Prokop <mika@debian.org>:
New Bug report received and forwarded. Copy sent to Debian CD Group <debian-cd@lists.debian.org>. (Fri, 29 Aug 2014 21:30:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Michael Prokop <mika@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Cc: Colin Watson <cjwatson@debian.org>
Subject: debian-cd: loopback.cfg support for booting ISOs from within GRUB
Date: Fri, 29 Aug 2014 23:28:13 +0200
[Message part 1 (text/plain, inline)]
Package: debian-cd
Version: 3.1.15
Severity: wishlist

[Cc-ing Colin as requested]

I'm hereby following up our discussion we - Steve McIntyre, Colin
Watson and me - had at DebConf14.

Quoting from http://www.supergrubdisk.org/wiki/Loopback.cfg:

| A loopback.cfg is basically just a grub.cfg that's designed to be
| used to boot a live distribution from an iso file on a filesystem
| rather than an actual physical CD.

This is a very handy feature for booting ISO directly from within
GRUB and it would be great if this feature would be supported by the
official Debian ISOs as well. (For example Ubuntu and Grml support
it since quite some time and it's really useful.)

Quoting tools/boot/utopic/boot-amd64 from
"bzr branch lp:~ubuntu-cdimage/debian-cd/ubuntu debian-cd":

,---- [ debian-cd.bzr/tools/boot/utopic/boot-amd64 ]
|     cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
| menuentry "${livelabel#^}" {
|         set gfxpayload=keep
|         linux   $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper$liveparams iso-scan/filename=\${iso_path} quiet splas
| h --
|         initrd  $CASPER_INITRD
| }
| EOF
`----

The options/params would need to be adjusted accordingly
for sure (e.g. like boot=live instead of boot=casper, findiso
instead of iso-scan,...), but the idea should be clear.

regards,
-mika-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian CD Group <debian-cd@lists.debian.org>:
Bug#759744; Package debian-cd. (Fri, 29 Aug 2014 22:06:16 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Prokop <mika@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian CD Group <debian-cd@lists.debian.org>. (Fri, 29 Aug 2014 22:06:17 GMT) (full text, mbox, link).


Message #10 received at 759744@bugs.debian.org (full text, mbox, reply):

From: Michael Prokop <mika@debian.org>
To: 759744@bugs.debian.org
Cc: debian-live@lists.debian.org, Colin Watson <cjwatson@debian.org>
Subject: Re: Bug#759744: debian-cd: loopback.cfg support for booting ISOs from within GRUB
Date: Sat, 30 Aug 2014 00:04:09 +0200
[Message part 1 (text/plain, inline)]
Hi,

Cc-ing also debian-live ML to make sure they are aware of the issue.

* Michael Prokop [Fri Aug 29, 2014 at 11:28:13PM +0200]:

> I'm hereby following up our discussion we - Steve McIntyre, Colin
> Watson and me - had at DebConf14.
> Quoting from http://www.supergrubdisk.org/wiki/Loopback.cfg:
[...]

Adrian just pointed out to me that in #757883 he was working on this
feature for supporting it in debian-live, that might be useful for
further development and sharing this feature between debian-cd and
debian-live.

regards,
-mika-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian CD Group <debian-cd@lists.debian.org>:
Bug#759744; Package debian-cd. (Fri, 29 Aug 2014 22:51:08 GMT) (full text, mbox, link).


Acknowledgement sent to adrian15 <adrian15sgd@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian CD Group <debian-cd@lists.debian.org>. (Fri, 29 Aug 2014 22:51:09 GMT) (full text, mbox, link).


Message #15 received at 759744@bugs.debian.org (full text, mbox, reply):

From: adrian15 <adrian15sgd@gmail.com>
To: Michael Prokop <mika@debian.org>, 759744@bugs.debian.org
Cc: debian-live@lists.debian.org, Colin Watson <cjwatson@debian.org>
Subject: Re: Bug#759744: debian-cd: loopback.cfg support for booting ISOs from within GRUB
Date: Sat, 30 Aug 2014 00:48:47 +0200
El 30/08/14 00:04, Michael Prokop escribió:
> Hi,
>
> Cc-ing also debian-live ML to make sure they are aware of the issue.
>
> * Michael Prokop [Fri Aug 29, 2014 at 11:28:13PM +0200]:
>
>> I'm hereby following up our discussion we - Steve McIntyre, Colin
>> Watson and me - had at DebConf14.
>> Quoting from http://www.supergrubdisk.org/wiki/Loopback.cfg:
> [...]
>
> Adrian just pointed out to me that in #757883 he was working on this
> feature for supporting it in debian-live, that might be useful for
> further development and sharing this feature between debian-cd and
> debian-live.
>
> regards,
> -mika-
>

This implementation is not easy as it might seem at first glance.

So, you know in Debian Live we have both fromiso and findiso boot 
parametres. You define them in Grub so that they Linux kernel gets them 
as a cmdline and then initrd detects fromiso or findiso and acts 
accordingly.

So fromiso needs the exact location of the iso (including its device) 
and, you might guess the Debian Live is loop mounted and then usual 
stuff ocurrs like trying to mount the squashfs big image and the boot of 
Debian Live continues.

Findiso does not need the exact location of the iso. The reason is that 
it loops all its devices and its partitions till it finds the iso. Then 
once it knows its device it acts as fromiso boot parametre does.

So, I will give three examples so that you get the point:

* fromiso=/dev/sda1/live/mydistro.iso
* 
fromiso=/dev/disk/by-uuid/c02dcbff-3222-4555-b333-c2351b73f88b/live/mydistro.iso

* findiso=/live/mydistro.iso

Basically if you want loopback.cfg to work you need a findiso alike option.

So, what you need in Debian-cd (or other packages) is a findiso alike 
option. This option is not currently available (please read on).

Support for a findiso alike option is already implemented in: #724931 . 
However the actual patch status for adding this functionality seems to 
affect many packages and I think it has been kind of put aside because 
of other higher priorities.

I plan myself on reviewing the patch and discovering why it affects so 
many packages ( 3 or 4 ) while Debian Live only needed live-boot to be 
modified (well, fromiso boot parametre had already implemented when I 
ported grml's findiso code, maybe that explains the reason why I find 
Debian Live much more simple).

So, that's it:
* Either someone implements a findiso alike option from scratch that 
affects as less packages as possible
* Either current patch is stripped down and fully tested

so that somehow less packages are affected than with the current patch.

* or current patch is fully tested

because, you know, it has some additional features like discovering new 
isos that are great. Additional features are, you know, more things to 
test, so it makes the patch less likely to be frozen or even considered 
so I suppose you have to weight it pros and cons.

By the way if Debian Live's findiso implementation is handy you can find 
its associated bug at: #656135.

Feel free to make depend this bug on #724931 if that it makes sense (not 
very experienced on BTS and Debian policies).

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian CD Group <debian-cd@lists.debian.org>:
Bug#759744; Package debian-cd. (Sat, 30 Aug 2014 13:54:08 GMT) (full text, mbox, link).


Acknowledgement sent to Evgeni Golov <evgeni@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian CD Group <debian-cd@lists.debian.org>. (Sat, 30 Aug 2014 13:54:08 GMT) (full text, mbox, link).


Message #20 received at 759744@bugs.debian.org (full text, mbox, reply):

From: Evgeni Golov <evgeni@debian.org>
To: adrian15 <adrian15sgd@gmail.com>, Michael Prokop <mika@debian.org>, 759744@bugs.debian.org
Cc: debian-live@lists.debian.org, Colin Watson <cjwatson@debian.org>
Subject: Re: Bug#759744: debian-cd: loopback.cfg support for booting ISOs from within GRUB
Date: Sat, 30 Aug 2014 15:44:17 +0200
Hi *,

On 08/30/2014 12:48 AM, adrian15 wrote:

>> Adrian just pointed out to me that in #757883 he was working on this
>> feature for supporting it in debian-live, that might be useful for
>> further development and sharing this feature between debian-cd and
>> debian-live.

and I hacked stuff up for debian-cd some years ago [1][2][3][4], but the
interest was quite low back then.

Greets
Evgeni

[1] Message-ID: <4EF5B96C.30205@debian.org>,
<20111229160619.GJ8519@dorei.kerker.die-welt.net>,
<20111231174244.GM8519@dorei.kerker.die-welt.net>
[2]
http://anonscm.debian.org/cgit/users/evgeni/tmp/cdrom-detect.git/commit/?id=6129510d3c28dee41d6e03db331009148b9d0fb9
[3]
http://anonscm.debian.org/cgit/users/evgeni/tmp/debian-installer.git/commit/?id=f641a79c2cda851cd067a6daa460203e98f22b67
[4]
http://anonscm.debian.org/cgit/users/evgeni/tmp/iso-scan.git/commit/?id=c61a8073e1c4283e5e426209041c1d082801b7b5



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Sep 26 02:04:31 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.