Discussion:
Booting Debian 10 installer ISO from USB
(too old to reply)
p***@finsakxim.com.mx
2019-11-19 16:30:01 UTC
Permalink
I'm trying to boot Buster installer from a USB by using Grub's loopback
device.
I already installed grub in the USB and put Buster ISO in its data
partition.

I read this
https://wiki.debian.org/Installation+Archive+USBStick#Using_GRUB.27s_Loopback_Facility
so I downloaded both hd-media kernel and initrd from here
http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/
and put them in same directory as ISO, renaming them as "DebianVmlinuz"
and "debianGtkInitrd" respectively.

This is my grub.cfg config:

iso_path=/boot/iso/debian-10.1.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Graphical install" {
bootoptions="findiso=$iso_path desktop=xfce vga=788 --- quiet"
linux /boot/iso/DebianVmlinuz $bootoptions
initrd /boot/iso/debianGtkInitrd.gz
}

So booting from the USB works; the installer starts. But after selecting
languages it searches for the installer ISO, but always fails to find
it. I get "Debian was unable to find an ISO installer image". Even if I
tell it to browse the specific partition where ISO is it just fails with
same error.

I also tried loading hd-media initrd in conjunction with Buster ISO's
vmlinuz kernel, by specifying the loop device instead. Installer starts
as well but everything else the same: same error.

Can someone help please with this issue?
Thanks beforehand.
Brian
2019-11-19 20:00:02 UTC
Permalink
Post by p***@finsakxim.com.mx
I'm trying to boot Buster installer from a USB by using Grub's loopback
device.
I already installed grub in the USB and put Buster ISO in its data
partition.
I read this
https://wiki.debian.org/Installation+Archive+USBStick#Using_GRUB.27s_Loopback_Facility
so I downloaded both hd-media kernel and initrd from here
http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/
and put them in same directory as ISO, renaming them as "DebianVmlinuz" and
"debianGtkInitrd" respectively.
iso_path=/boot/iso/debian-10.1.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Graphical install" {
bootoptions="findiso=$iso_path desktop=xfce vga=788 --- quiet"
linux /boot/iso/DebianVmlinuz $bootoptions
initrd /boot/iso/debianGtkInitrd.gz
}
So booting from the USB works; the installer starts. But after selecting
languages it searches for the installer ISO, but always fails to find it. I
get "Debian was unable to find an ISO installer image". Even if I tell it to
browse the specific partition where ISO is it just fails with same error.
There is no guarantee that mixing an hd-media initrd with
an ISO's kernel will produce a desirable outcome in all
circumstances.
In other words, if the hack works for you - all well and good. If not,
you get to piece it together yourself.

Why is a loopback boot so important to you?
--
Brian.
p***@finsakxim.com.mx
2019-11-20 15:40:01 UTC
Permalink
On 2019-11-19 13:58, Brian <***@cityscape.co.uk> wrote:

On Tue 19 Nov 2019 at 10:20:16 -0600, ***@finsakxim.com.mx wrote:

I'm trying to boot Buster installer from a USB by using Grub's
loopback
device.
I already installed grub in the USB and put Buster ISO in its
data
partition.

I read this

https://wiki.debian.org/Installation+Archive+USBStick#Using_GRUB.27s_Loopback_Facility
so I downloaded both hd-media kernel and initrd from here

http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/
and put them in same directory as ISO, renaming them as
"DebianVmlinuz" and
"debianGtkInitrd" respectively.

This is my grub.cfg config:

iso_path=/boot/iso/debian-10.1.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Graphical install" {
bootoptions="findiso=$iso_path desktop=xfce vga=788 ---
quiet"
linux /boot/iso/DebianVmlinuz $bootoptions
initrd /boot/iso/debianGtkInitrd.gz
}

So booting from the USB works; the installer starts. But after
selecting
languages it searches for the installer ISO, but always fails to
find it. I
get "Debian was unable to find an ISO installer image". Even if
I tell it to
browse the specific partition where ISO is it just fails with
same error.
Post by p***@finsakxim.com.mx
There is no guarantee that mixing an hd-media initrd with
an ISO's kernel will produce a desirable outcome in all
circumstances.
In other words, if the hack works for you - all well and good. If
not,
you get to piece it together yourself.

Why is a loopback boot so important to you?


If you re-read my post you realize that I first tried the "rightful" way
of using both kernel and initrd from hd-media, and didn't work.

Important because that would make it easier to make a multiboot USB with
several Linux distributions by just copying ISO files instead of dd-ing
multiple USBs or using 3rd party programs which modify the ISOs.

Sorry, I really didn't know Debian community actually disliked this
general idea (by little to no supporting and turning blind eye). Though
I fail to see a good reason for it...
Cindy Sue Causey
2019-11-20 17:30:02 UTC
Permalink
Post by p***@finsakxim.com.mx
Post by Brian
Post by p***@finsakxim.com.mx
I'm trying to boot Buster installer from a USB by using Grub's
loopback
device.
I already installed grub in the USB and put Buster ISO in its
data partition.
I read this
https://wiki.debian.org/Installation+Archive+USBStick#Using_GRUB.27s_Loopback_Facility
so I downloaded both hd-media kernel and initrd from here
There is no guarantee that mixing an hd-media initrd with
an ISO's kernel will produce a desirable outcome in all
circumstances.
In other words, if the hack works for you - all well and good. If
not,
you get to piece it together yourself.
Why is a loopback boot so important to you?
If you re-read my post you realize that I first tried the "rightful" way
of using both kernel and initrd from hd-media, and didn't work.
Important because that would make it easier to make a multiboot USB with
several Linux distributions by just copying ISO files instead of dd-ing
multiple USBs or using 3rd party programs which modify the ISOs.
Sorry, I really didn't know Debian community actually disliked this
general idea (by little to no supporting and turning blind eye). Though
I fail to see a good reason for it...
Free operating systems, their methodologies, and their supportive
documentation evolve based on the majority... based on the relevant
community's collective usage case needs over time.

Just because something doesn't appear to exist doesn't mean VOLUNTEER
Developers don't give a dang. It instead means that users needing a
more specifically individualized setup simply had not yet noticed that
missing [perk] and thus...

Had not yet stepped up to VOLUNTEER to develop the potentially
required software package, methodology, and/or any supportive
documentation necessary.

If this is something that already exists in another free operating
system, hey, cool beans, not to mention... well, there you go: A
ready-to-go foundation for a new package with morally responsible, if
not also likely requisite, head nods given to the original creators,
of course.

OF course...... :)

With respect to "disliking" something involving various operating
systems, there's almost a tone that might imply the community might
feel something like... oh, I don't know... being "threatened", maybe,
by the presence of other operating systems. Based on observing
Debian-User posts for some ten years or so now, nope, not here.

Here at Debian-User, there's occasional chatter about multiple
operating systems coexisting via virtual machines, multiple
interactive hard drive partitions, and such. Beyond those options
presenting scenarios for learning how to make ALL things Linux sing,
it can also be about the more primordial desire for, attraction to....

Variety, the spice of #Life, yada-yada. :)

Cindy :)
--
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with... a healthy, helpfully diverse stack of OS CDs and DVDs *
p***@finsakxim.com.mx
2019-11-20 17:50:01 UTC
Permalink
Post by Cindy Sue Causey
Post by p***@finsakxim.com.mx
Post by Brian
Post by p***@finsakxim.com.mx
I'm trying to boot Buster installer from a USB by using Grub's
loopback
device.
I already installed grub in the USB and put Buster ISO in its
data partition.
I read this
https://wiki.debian.org/Installation+Archive+USBStick#Using_GRUB.27s_Loopback_Facility
so I downloaded both hd-media kernel and initrd from here
There is no guarantee that mixing an hd-media initrd with
an ISO's kernel will produce a desirable outcome in all
circumstances.
In other words, if the hack works for you - all well and good. If
not,
you get to piece it together yourself.
Why is a loopback boot so important to you?
If you re-read my post you realize that I first tried the "rightful" way
of using both kernel and initrd from hd-media, and didn't work.
Important because that would make it easier to make a multiboot USB with
several Linux distributions by just copying ISO files instead of dd-ing
multiple USBs or using 3rd party programs which modify the ISOs.
Sorry, I really didn't know Debian community actually disliked this
general idea (by little to no supporting and turning blind eye). Though
I fail to see a good reason for it...
Free operating systems, their methodologies, and their supportive
documentation evolve based on the majority... based on the relevant
community's collective usage case needs over time.
Just because something doesn't appear to exist doesn't mean VOLUNTEER
Developers don't give a dang. It instead means that users needing a
more specifically individualized setup simply had not yet noticed that
missing [perk] and thus...
Had not yet stepped up to VOLUNTEER to develop the potentially
required software package, methodology, and/or any supportive
documentation necessary.
If this is something that already exists in another free operating
system, hey, cool beans, not to mention... well, there you go: A
ready-to-go foundation for a new package with morally responsible, if
not also likely requisite, head nods given to the original creators,
of course.
OF course...... :)
With respect to "disliking" something involving various operating
systems, there's almost a tone that might imply the community might
feel something like... oh, I don't know... being "threatened", maybe,
by the presence of other operating systems. Based on observing
Debian-User posts for some ten years or so now, nope, not here.
Here at Debian-User, there's occasional chatter about multiple
operating systems coexisting via virtual machines, multiple
interactive hard drive partitions, and such. Beyond those options
presenting scenarios for learning how to make ALL things Linux sing,
it can also be about the more primordial desire for, attraction to....
Variety, the spice of #Life, yada-yada. :)
Cindy :)
So in the end no one being able to help booting Debian 10 with grub
loopback?
My grub.cfg and symptoms are back in first post of this thread.
Cannot understand why Debian kernel/initrd are unable to find the ISO,
even with hd-media...
Brian
2019-11-20 18:50:01 UTC
Permalink
Post by p***@finsakxim.com.mx
So in the end no one being able to help booting Debian 10 with grub
loopback?
Using GRUB loopback isn't supported by the installer. The installer
images have initrds which do not contain iso-scan.
Post by p***@finsakxim.com.mx
My grub.cfg and symptoms are back in first post of this thread.
Cannot understand why Debian kernel/initrd are unable to find the ISO, even
with hd-media...
The hd-media have no trouble finding debian-10.2.0-i386-netinst.iso
Post by p***@finsakxim.com.mx
... Ensure the image, vmlinuz and initrd.gz are the most
up-to-date possible.
--
Brian.
p***@finsakxim.com.mx
2019-11-20 19:40:01 UTC
Permalink
Post by Brian
Post by p***@finsakxim.com.mx
So in the end no one being able to help booting Debian 10 with grub
loopback?
Using GRUB loopback isn't supported by the installer. The installer
images have initrds which do not contain iso-scan.
Post by p***@finsakxim.com.mx
My grub.cfg and symptoms are back in first post of this thread.
Cannot understand why Debian kernel/initrd are unable to find the ISO, even
with hd-media...
The hd-media have no trouble finding debian-10.2.0-i386-netinst.iso
Post by p***@finsakxim.com.mx
... Ensure the image, vmlinuz and initrd.gz are the most
up-to-date possible.
I already know and understand that CD installer's initrd doesn't have
iso-scan.
Which is why, as put in first post of this thread, I tried using
hd-media vmlinuz and initrd, though with same CD installer ISO rather
than the netinst.

Last thing I read about the netinst is, just like live CD, they didn't
suffer from the lack of iso-scan, so they could be used for grub
loopback out of the box. Which is why I didn't try netinst yet. Correct
me if wrong.

I got both hd-media vmlinuz and initrd just this week, from the link in
first post, from the current "stable" tree. So they should be indeed
updated.

I already know one way around for installation would be booting Live CD
and installing from within it. But feels slightly "unorthodox", and it's
not the same as directly using the installer. Specially because I often
use the "expert" install option.
Also I often do offline installations (internet connection is not
available beforehand), so netinst would not be useful for those cases.

So, if someone could help with this CD installer and hd-media issue, I'd
be very thankful.
Or if the fact was that Buster installer no longer supports loopback at
all even with hd-media, just confirm it.

Thanks.
Brian
2019-11-20 20:00:02 UTC
Permalink
Post by p***@finsakxim.com.mx
Post by Brian
Post by p***@finsakxim.com.mx
So in the end no one being able to help booting Debian 10 with grub
loopback?
Using GRUB loopback isn't supported by the installer. The installer
images have initrds which do not contain iso-scan.
Post by p***@finsakxim.com.mx
My grub.cfg and symptoms are back in first post of this thread.
Cannot understand why Debian kernel/initrd are unable to find the ISO, even
with hd-media...
The hd-media have no trouble finding debian-10.2.0-i386-netinst.iso
Post by p***@finsakxim.com.mx
... Ensure the image, vmlinuz and initrd.gz are the most
up-to-date possible.
I already know and understand that CD installer's initrd doesn't have
iso-scan.
Everybody else understands this too. That is why no one is able to help
with booting Debian 10 with GRUB's loopback.
Post by p***@finsakxim.com.mx
Which is why, as put in first post of this thread, I tried using hd-media
vmlinuz and initrd, though with same CD installer ISO rather than the
netinst.
Last thing I read about the netinst is, just like live CD, they didn't
suffer from the lack of iso-scan, so they could be used for grub loopback
out of the box. Which is why I didn't try netinst yet. Correct me if wrong.
Open up a netinst ISO and look in /pool. Do you see iso-scan there?
Post by p***@finsakxim.com.mx
I got both hd-media vmlinuz and initrd just this week, from the link in
first post, from the current "stable" tree. So they should be indeed
updated.
The image you have? That's up-to-date?
Post by p***@finsakxim.com.mx
I already know one way around for installation would be booting Live CD and
installing from within it. But feels slightly "unorthodox", and it's not the
same as directly using the installer. Specially because I often use the
"expert" install option.
Also I often do offline installations (internet connection is not available
beforehand), so netinst would not be useful for those cases.
So, if someone could help with this CD installer and hd-media issue, I'd be
very thankful.
Or if the fact was that Buster installer no longer supports loopback at all
even with hd-media, just confirm it.
No installer has ever supported loopback, with or without the assistance
of hd-media.
--
Brian.
p***@finsakxim.com.mx
2019-11-20 22:10:02 UTC
Permalink
Post by Brian
Open up a netinst ISO and look in /pool. Do you see iso-scan there?
So according to you, grub loopback with hd-media vmlinuz and initrd
works but only with netinst?
Post by Brian
No installer has ever supported loopback, with or without the
assistance
of hd-media.
This is *false*.
https://www.linuxjournal.com/content/grub-boot-iso?page=0,1
https://www.linuxbabe.com/debian/boot-debian-9-iso-from-hard-drive-grub2


@didier:
That trick of using ISO's kernel with hd-media initrd I already tried.
Brian
2019-11-20 23:10:02 UTC
Permalink
Post by Brian
Open up a netinst ISO and look in /pool. Do you see iso-scan there?
So according to you, grub loopback with hd-media vmlinuz and initrd works
but only with netinst?
I asked *my* question first.
Post by Brian
No installer has ever supported loopback, with or without the assistance
of hd-media.
This is *false*.
https://www.linuxjournal.com/content/grub-boot-iso?page=0,1
https://www.linuxbabe.com/debian/boot-debian-9-iso-from-hard-drive-grub2
A couple of techniques for you to investigate and report on.
--
Brian.
p***@finsakxim.com.mx
2019-11-21 18:10:01 UTC
Permalink
I think I sorted out part of my problem.
For those who I made them lost, a summary of what I'm trying to do.

I'm trying to boot Debian 10 via Grub's loopback device, in order to
make a multiboot USB with several Linux distros by copying just the
ISOs.

I already read Debian installer CD has an initrd with no iso-scan
package, so won't work out of the box and must use hd-media initrd and
vmlinuz to make it work.

So I downloaded, renamed, and placed them in same directory as Debian
installer ISO, in the USB partition. Then created grub.cfg config in
USB:

iso_path=/boot/iso/debian-10.2.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Graphical install" {
bootoptions="iso-scan/filename=$iso_path desktop=xfce vga=788 ---
quiet"
linux /boot/iso/DebianVmlinuz $bootoptions
initrd /boot/iso/debianGtkInitrd.gz
}

Then tested booting from USB, and the graphical installer does start,
but after selecting language, locale and keyboard, I got this message:
"The quick scan for installer ISO images, which looks only in common
places, did not find an installer ISO image. It's possible that a more
thorough search will find the ISO image, but it may take a long time. Do
you wish to do a full scan?"

Now, my recent problem was that even by answering yes, it didn't find
the installer ISO which is right there in the USB.
How sorted? It turned people here were right: I needed to update both
initrd and installer ISO, since version 10.2 was released just 5 days
ago...

Having done this I retried. Still get the above message, but now
thorough search is able to find and use the installer ISO.

Now, my last issue is: quick scan always fails, looking only in "common
places". So perhaps the location in the USB sdb3/boot/isos is not
considered a "common place" and thus only full search can find it here.
Can this behavior be changed?
Maybe somehow telling quick scan to search in custom directories in
grub.cfg?
For this matter, why isn't iso-scan/filename actually working?

Thanks.
Pascal Hambourg
2019-11-22 06:20:01 UTC
Permalink
Post by p***@finsakxim.com.mx
Now, my last issue is: quick scan always fails, looking only in "common
places". So perhaps the location in the USB sdb3/boot/isos is not
considered a "common place" and thus only full search can find it here.
The quick scan only searches in top-level directories.
Post by p***@finsakxim.com.mx
Can this behavior be changed?
Try iso-scan/ask_second_pass=true.
Post by p***@finsakxim.com.mx
For this matter, why isn't iso-scan/filename actually working?
It does not seem to be an input but an output.
Brian
2019-11-22 14:10:01 UTC
Permalink
Post by p***@finsakxim.com.mx
I think I sorted out part of my problem.
For those who I made them lost, a summary of what I'm trying to do.
I'm trying to boot Debian 10 via Grub's loopback device, in order to make a
multiboot USB with several Linux distros by copying just the ISOs.
I already read Debian installer CD has an initrd with no iso-scan package,
so won't work out of the box and must use hd-media initrd and vmlinuz to
make it work.
So I downloaded, renamed, and placed them in same directory as Debian
iso_path=/boot/iso/debian-10.2.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Graphical install" {
bootoptions="iso-scan/filename=$iso_path desktop=xfce vga=788 --- quiet"
linux /boot/iso/DebianVmlinuz $bootoptions
initrd /boot/iso/debianGtkInitrd.gz
}
Then tested booting from USB, and the graphical installer does start, but
"The quick scan for installer ISO images, which looks only in common places,
did not find an installer ISO image. It's possible that a more thorough
search will find the ISO image, but it may take a long time. Do you wish to
do a full scan?"
Now, my recent problem was that even by answering yes, it didn't find the
installer ISO which is right there in the USB.
How sorted? It turned people here were right: I needed to update both initrd
and installer ISO, since version 10.2 was released just 5 days ago...
Having done this I retried. Still get the above message, but now thorough
search is able to find and use the installer ISO.
Now, my last issue is: quick scan always fails, looking only in "common
places". So perhaps the location in the USB sdb3/boot/isos is not considered
a "common place" and thus only full search can find it here. Can this
behavior be changed?
Maybe somehow telling quick scan to search in custom directories in
grub.cfg?
My first point is that you are having the installer mount and search
every partition to find an ISO. This is time consuming.

The second point is that an ISO on another partition might be found
and used. What happens if it is a jessie ISO?

Why not label the partition on the USB drive and use the boot option

shared/enter_device=/dev/disk/by-label/<LABEL>

I would also put the ISO in / or /iso.
Post by p***@finsakxim.com.mx
For this matter, why isn't iso-scan/filename actually working?
You need to sort out the above first before proceeding with this.
--
Brian.
p***@finsakxim.com.mx
2019-11-22 19:40:02 UTC
Permalink
Post by Brian
My first point is that you are having the installer mount and search
every partition to find an ISO. This is time consuming.
The second point is that an ISO on another partition might be found
and used. What happens if it is a jessie ISO?
Why not label the partition on the USB drive and use the boot option
shared/enter_device=/dev/disk/by-label/<LABEL>
I would also put the ISO in / or /iso.
Thanks Brian and Pascal.

Regarding putting ISO in / , both of you are right: iso-scan's quick
scan seems to work only in / , plus perhaps other few "common"
locations. I just tried it.

When using full/thorough search among partitions, once finished
installer actually lists all found Debian ISOs and which disk/partition
they're located in, so one can choose.

I tried the "shared/enter_device" boot option for the ISO located in
custom /boot/iso directory, but it seems this doesn't work alone;
instead needing to be used in conjunction with boot option
"shared/ask_device=manual". With this the quick scan failure message
stills there, but now when selecting "yes" to the thorough scan it only
scans the specified device, so now it's faster.

To get rid of the thorough scan question Pascal's advise of boot option
"iso-scan/ask_second_pass=true" is in place.

So overall string of kernel boot options would be like
"iso-scan/ask_second_pass=true shared/ask_device=manual
shared/enter_device=/dev/disk/by-label/<label>"
ouch, a bit long of boot options, but with this installer at least goes
a bit smoother...

But still the question about boot opton "iso-scan/filename"... why isn't
it actually working?
What does it mean that this may be an output instead of an input?
Brian
2019-11-22 22:50:01 UTC
Permalink
Post by p***@finsakxim.com.mx
Post by Brian
My first point is that you are having the installer mount and search
every partition to find an ISO. This is time consuming.
The second point is that an ISO on another partition might be found
and used. What happens if it is a jessie ISO?
Why not label the partition on the USB drive and use the boot option
shared/enter_device=/dev/disk/by-label/<LABEL>
I would also put the ISO in / or /iso.
Thanks Brian and Pascal.
Regarding putting ISO in / , both of you are right: iso-scan's quick scan
seems to work only in / , plus perhaps other few "common" locations. I just
tried it.
When using full/thorough search among partitions, once finished installer
actually lists all found Debian ISOs and which disk/partition they're
located in, so one can choose.
I tried the "shared/enter_device" boot option for the ISO located in custom
/boot/iso directory, but it seems this doesn't work alone; instead needing
to be used in conjunction with boot option "shared/ask_device=manual". With
this the quick scan failure message stills there, but now when selecting
"yes" to the thorough scan it only scans the specified device, so now it's
faster.
Sorry; I forgot about "shared/ask_device=manual".
Post by p***@finsakxim.com.mx
To get rid of the thorough scan question Pascal's advise of boot option
"iso-scan/ask_second_pass=true" is in place.
So overall string of kernel boot options would be like
"iso-scan/ask_second_pass=true shared/ask_device=manual
shared/enter_device=/dev/disk/by-label/<label>"
ouch, a bit long of boot options, but with this installer at least goes a
bit smoother...
But still the question about boot opton "iso-scan/filename"... why isn't it
actually working?
What does it mean that this may be an output instead of an input?
Try this for the kernel boot options:

"iso-scan/filename=$iso_path priority=low"

In other words, replace two of the options with iso-scan/filename=. It
works for me when the ISO, vmlinuz and initrd.gz are all in /boot.
--
Brian.
p***@finsakxim.com.mx
2019-11-23 17:10:01 UTC
Permalink
Post by Brian
"iso-scan/filename=$iso_path priority=low"
In other words, replace two of the options with iso-scan/filename=. It
works for me when the ISO, vmlinuz and initrd.gz are all in /boot.
This
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841135
would explain why it works for you, as well as in other cases.

It seems to only work at maximum level 1 directories; further, as in my
case, no longer works.
Pity...
Brian
2019-11-23 19:20:01 UTC
Permalink
Post by p***@finsakxim.com.mx
Post by Brian
"iso-scan/filename=$iso_path priority=low"
In other words, replace two of the options with iso-scan/filename=. It
works for me when the ISO, vmlinuz and initrd.gz are all in /boot.
This
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841135
would explain why it works for you, as well as in other cases.
It seems to only work at maximum level 1 directories; further, as in my
case, no longer works.
Pity...
Thank you for the link. I had not seen this report before. One bit of it
Post by p***@finsakxim.com.mx
From what I understand now, iso-scan is not meant to use
any iso filename supplied to it via grub command line, but
it rather prefers to scan the USB stick for usable images
itself, and then present the user with a menu.
My understanding is that iso-scan/filename= simply says which ISO is to
be searched for. But, additionally, iso-scan needs to be told where to
search by being informed of the device or partition to use or by getting
it to look at every device/partition on the system or by extra kernel
command line options.

I put two Debian ISOs in /boot/iso and had a similar grub.cfg to yours:

iso_path=/boot/iso/debian-10.2.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Test" {
linux /boot/vmlinuz iso-scan/filename=$iso_path priority=low
initrd /boot/initrd.gz
}

I get a list of sixteen partitions and devices and choose the one that I
Post by p***@finsakxim.com.mx
The quick scan for installer ISO images, which looks only
in common places....
But a full disk search immediately scans /dev/sdg1 and presents a choice
between the two ISOs.

If our experience differs, I cannot explain why.
--
Brian.
Pascal Hambourg
2019-11-24 08:30:01 UTC
Permalink
Post by Brian
Post by p***@finsakxim.com.mx
This
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841135
would explain why it works for you, as well as in other cases.
It seems to only work at maximum level 1 directories;
I already told you exactly this in my previous post :
"The quick scan only searches in top-level directories."
Post by Brian
Thank you for the link. I had not seen this report before. One bit of it
Post by p***@finsakxim.com.mx
From what I understand now, iso-scan is not meant to use
any iso filename supplied to it via grub command line, but
it rather prefers to scan the USB stick for usable images
This is what I understood from a quick look at the script.
Post by Brian
Post by p***@finsakxim.com.mx
itself, and then present the user with a menu.
Only with lower priority. With default priority, it automatically
selects the first "usable" image found.
Post by Brian
My understanding is that iso-scan/filename= simply says which ISO is to
be searched for.
How did you understand this ? It matches neither the script nor the
experiences.
Post by Brian
iso_path=/boot/iso/debian-10.2.0-amd64-xfce-CD-1.iso
export iso_path
search --set=root --file "$iso_path"
loopback loop "$iso_path"
menuentry "Test" {
linux /boot/vmlinuz iso-scan/filename=$iso_path priority=low
initrd /boot/initrd.gz
}
I get a list of sixteen partitions and devices and choose the one that I
know holds the ISOs (/dev/sdg1).
This is the effect of priority=low.
Post by Brian
Post by p***@finsakxim.com.mx
The quick scan for installer ISO images, which looks only
in common places....
But a full disk search immediately scans /dev/sdg1 and presents a choice
between the two ISOs.
Again the effect of priority=low.

So iso-scan seems to ignore the iso-scan/filename value provided in the
command line. If I understood the script correctly, it does not read
this parameter, it only writes the selected image pathname into it.
Brian
2019-11-24 12:10:01 UTC
Permalink
Post by Pascal Hambourg
So iso-scan seems to ignore the iso-scan/filename value provided in the
command line. If I understood the script correctly, it does not read this
parameter, it only writes the selected image pathname into it.
I have straightened my thinking out now. Thanks.
--
Brian.
d***@gmail.com
2019-11-20 19:50:01 UTC
Permalink
Post by p***@finsakxim.com.mx
So in the end no one being able to help booting Debian 10 with grub
loopback?
My grub.cfg and symptoms are back in first post of this thread.
Cannot understand why Debian kernel/initrd are unable to find the ISO,
even with hd-media...
I am not familiar with the Grub syntax so maybe I am wrong, but I think you should follow the syntax exposed in the wiki more closely:
- your pre-declaratives (iso_path, search, loopback) could be better placed between the menuentry brackets, because these items are entry specific and this could be a problem with several entries (from what I gather your goal is to have one USB key as a tool to install several OSes?)?
- you seem to boot the hd-media kernel with the hd-media initrd while the trick in the wiki seems to boot the iso image kernel with the hd-media initrd

I have never tested this kind of things so perhaps my observations are totally irrelevant...
Continue reading on narkive:
Loading...