All of lore.kernel.org
 help / color / mirror / Atom feed
* Live-ISO's over PXE+HTTP using loopback
@ 2015-02-15 19:37 Beeblebrox
  2015-02-16  3:29 ` Andrei Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: Beeblebrox @ 2015-02-15 19:37 UTC (permalink / raw)
  To: grub-devel

Hi.
I'm trying to boot several live ISO's using my PXE-boot server and Grub loopback. ISO's are fetched by Grub from an HTTP server on the same host.
* I can boot the kernels of all live ISO's through PXE+HTTP transfer.
* Boot process fails at mount-root stage, where rootfs will obviously be mounted from the ISO.  Error message is usually similar "could not find the ISO" or "unable to find medium containing a live file system".
* A sample menu entry I'm using (thanks to previous answers from this list):
  menuentry "Debian-testing-i386-lxde.iso"" --class gnu-linux --class gnu --class os {
  set root="http,192.168.2.100"
  set isofile="debian-testing-i386-lxde.iso"
  loopback loop0 ($root)/iso/$isofile
  linux (loop0)/install.386/vmlinuz
  initrd (loop0)/install.386/initrd.gz

As the first step of solving this problem: Is ISO modification the only choice, or is it possible to boot a normal ISO by passing the correct parameters to grub.cfg? I think the problem could be that ramdisk fails to be created when PXE is involved.

Regards
-- 
FreeBSD_amd64_11-Current_RadeonKMS


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Live-ISO's over PXE+HTTP using loopback
  2015-02-15 19:37 Live-ISO's over PXE+HTTP using loopback Beeblebrox
@ 2015-02-16  3:29 ` Andrei Borzenkov
  2015-02-16  7:25   ` Beeblebrox
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Borzenkov @ 2015-02-16  3:29 UTC (permalink / raw)
  To: Beeblebrox; +Cc: grub-devel

В Sun, 15 Feb 2015 21:37:13 +0200
Beeblebrox <zaphod@berentweb.com> пишет:

> Hi.
> I'm trying to boot several live ISO's using my PXE-boot server and Grub loopback. ISO's are fetched by Grub from an HTTP server on the same host.
> * I can boot the kernels of all live ISO's through PXE+HTTP transfer.
> * Boot process fails at mount-root stage, where rootfs will obviously be mounted from the ISO.  Error message is usually similar "could not find the ISO" or "unable to find medium containing a live file system".
> * A sample menu entry I'm using (thanks to previous answers from this list):
>   menuentry "Debian-testing-i386-lxde.iso"" --class gnu-linux --class gnu --class os {
>   set root="http,192.168.2.100"
>   set isofile="debian-testing-i386-lxde.iso"
>   loopback loop0 ($root)/iso/$isofile
>   linux (loop0)/install.386/vmlinuz
>   initrd (loop0)/install.386/initrd.gz
> 
> As the first step of solving this problem: Is ISO modification the only choice, or is it possible to boot a normal ISO by passing the correct parameters to grub.cfg? I think the problem could be that ramdisk fails to be created when PXE is involved.
> 

You need to tell your kernel/initrd where to find ISO and it should be
able to fetch data from it via HTTP.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Live-ISO's over PXE+HTTP using loopback
  2015-02-16  3:29 ` Andrei Borzenkov
@ 2015-02-16  7:25   ` Beeblebrox
  2015-02-16  7:54     ` Andrei Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: Beeblebrox @ 2015-02-16  7:25 UTC (permalink / raw)
  To: Andrei Borzenkov; +Cc: grub-devel

Hi Andrei, thanks for the answer.

> You need to tell your kernel/initrd where to find ISO and it should be
> able to fetch data from it via HTTP.

I was advised on debian-live, "if ISO contains httpfs, you can boot by pointing the live initramfs to the iso location on your web server"; essentially the same thing you stated.

That's done by params in the "linux" line then? Something like this?
  loopback loop0 ($root)$path$isofile
  linux (loop0)/casper/vmlinuz.efi boot=casper fromiso=$isofile httpfs=$loop0
  initrd (loop0)/casper/initrd.lz  }

This is not working though, so:
* Should "fromiso=" be full path "($root)$path$isofile"?
* For "httpfs=", can loop0 be used or should I revert to "($root)$path$isofile"?
* Any other suggestions in above syntax appreciated.

Thanks and Regards.

-- 
FreeBSD_amd64_11-Current_RadeonKMS


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Live-ISO's over PXE+HTTP using loopback
  2015-02-16  7:25   ` Beeblebrox
@ 2015-02-16  7:54     ` Andrei Borzenkov
  2015-02-16 13:15       ` Beeblebrox
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Borzenkov @ 2015-02-16  7:54 UTC (permalink / raw)
  To: Beeblebrox; +Cc: grub-devel

On Mon, Feb 16, 2015 at 10:25 AM, Beeblebrox <zaphod@berentweb.com> wrote:
> Hi Andrei, thanks for the answer.
>
>> You need to tell your kernel/initrd where to find ISO and it should be
>> able to fetch data from it via HTTP.
>
> I was advised on debian-live, "if ISO contains httpfs, you can boot by pointing the live initramfs to the iso location on your web server"; essentially the same thing you stated.
>
> That's done by params in the "linux" line then? Something like this?
>   loopback loop0 ($root)$path$isofile
>   linux (loop0)/casper/vmlinuz.efi boot=casper fromiso=$isofile httpfs=$loop0

grub2 device names are not known by linux, so at least the last kernel
parameter is obviously bogus.

>   initrd (loop0)/casper/initrd.lz  }
>
> This is not working though, so:
> * Should "fromiso=" be full path "($root)$path$isofile"?
> * For "httpfs=", can loop0 be used or should I revert to "($root)$path$isofile"?

See above. It should use whatever kernel/initrd understands and
neither $loop nor $root are understood by kernel. The fact is that
linux kernel cannot read from grub2 (loop) device so unless necessary
support is in initrd this simply cannot be done.

> * Any other suggestions in above syntax appreciated.
>
> Thanks and Regards.
>
> --
> FreeBSD_amd64_11-Current_RadeonKMS


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Live-ISO's over PXE+HTTP using loopback
  2015-02-16  7:54     ` Andrei Borzenkov
@ 2015-02-16 13:15       ` Beeblebrox
  2015-02-16 15:02         ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Beeblebrox @ 2015-02-16 13:15 UTC (permalink / raw)
  To: Andrei Borzenkov; +Cc: grub-devel

I got the Gparted ISO to boot, although in a bit roun-about way:

menuentry 'Gparted i386' {
  set root="http,192.168.2.100"
  set isofile="gparted-live-0.19.0-beta1-3-i486.iso"
  loopback loop0 ($root)$isofile
  linux (loop0)/live/vmlinuz boot=live config noswap noprompt verbose noeject fetch=http://192.168.2.100/gparted-live-0.19.0-beta1-3-i486.iso
  initrd (loop0)/live/initrd.img  }

I did not use these, since the ISO boots witout them: toram=filesystem.squashfs fromiso=gparted-live-0.19.0-beta1-3-i486.iso

Just to confirm I've got this in my head correctly: It's not possible to partially load a live-CD.iso with the PXE method, unless using NFS or other block device. In absence of NFS/cifs or such, the entire iso must be loaded into RAM. Am I correct with this statement?

Yet, A similar ISO (Debian based) with below config fails due to no netboot or nfsmount, and does not try to fetch the ISO from the http server like it does in the above case. This ISO also has its own grub menu. Would it be possible to fetch the ISO then chainload to the grub inside the ISO? I'm probably overlooking something when asking this question...

menuentry "Inquisitor 3.1B-amd64" {
  set root="http,192.168.2.100"
  set isofile="inq-live-3.1beta2-amd64-debian.iso"
  loopback loop0 ($root)$path$isofile
  linux (loop0)/live/vmlinuz-2.6.26-2-amd64 boot=live config noswap noprompt verbose noeject noautologin union=aufs fetch=http://192.168.2.100/pub/tftp/rescue/inq-live-3.1beta2-amd64-debian.iso toram=filesystem.squashfs
  initrd (loop0)/live/initrd.img-2.6.26-2-amd64  }


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Live-ISO's over PXE+HTTP using loopback
  2015-02-16 13:15       ` Beeblebrox
@ 2015-02-16 15:02         ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-02-16 15:02 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]

On 16.02.2015 14:15, Beeblebrox wrote:
> I got the Gparted ISO to boot, although in a bit roun-about way:
> 
> menuentry 'Gparted i386' {
>   set root="http,192.168.2.100"
>   set isofile="gparted-live-0.19.0-beta1-3-i486.iso"
>   loopback loop0 ($root)$isofile
>   linux (loop0)/live/vmlinuz boot=live config noswap noprompt verbose noeject fetch=http://192.168.2.100/gparted-live-0.19.0-beta1-3-i486.iso
>   initrd (loop0)/live/initrd.img  }
> 
> I did not use these, since the ISO boots witout them: toram=filesystem.squashfs fromiso=gparted-live-0.19.0-beta1-3-i486.iso
> 
> Just to confirm I've got this in my head correctly: It's not possible to partially load a live-CD.iso with the PXE method, unless using NFS or other block device. In absence of NFS/cifs or such, the entire iso must be loaded into RAM. Am I correct with this statement?
> 
> Yet, A similar ISO (Debian based) with below config fails due to no netboot or nfsmount, and does not try to fetch the ISO from the http server like it does in the above case. This ISO also has its own grub menu. Would it be possible to fetch the ISO then chainload to the grub inside the ISO? I'm probably overlooking something when asking this question...
> 
You're overlooking a lot but it was all already explained by Andrey: how
Linux finds root is outside of GRUB or any bootloader scope. GRUB only
passes parameters through to it. "Chainloading" whatever you mean by it
will not help you. Only specialized initrd will. And it's all out of the
scope of GRUB or of this list.
> menuentry "Inquisitor 3.1B-amd64" {
>   set root="http,192.168.2.100"
>   set isofile="inq-live-3.1beta2-amd64-debian.iso"
>   loopback loop0 ($root)$path$isofile
>   linux (loop0)/live/vmlinuz-2.6.26-2-amd64 boot=live config noswap noprompt verbose noeject noautologin union=aufs fetch=http://192.168.2.100/pub/tftp/rescue/inq-live-3.1beta2-amd64-debian.iso toram=filesystem.squashfs
>   initrd (loop0)/live/initrd.img-2.6.26-2-amd64  }
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-16 15:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-15 19:37 Live-ISO's over PXE+HTTP using loopback Beeblebrox
2015-02-16  3:29 ` Andrei Borzenkov
2015-02-16  7:25   ` Beeblebrox
2015-02-16  7:54     ` Andrei Borzenkov
2015-02-16 13:15       ` Beeblebrox
2015-02-16 15:02         ` Vladimir 'φ-coder/phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.