Discussion:
[ipxe-devel] HTTP SAN / ISO booting
Michael Brown
2011-06-27 18:44:15 UTC
Permalink
I think some people have wanted something like this for a while:

sanboot http://boot.ipxe.org/freedos/fdfullcd.iso

This is implemented, and works at a reasonable speed (even when booting over
the Internet). I still need to QA the code and check that it doesn't
introduce any regressions. Temporarily available at

http://git.ipxe.org/people/mcb30/ipxe.git/shortlog/refs/heads/httpsan

for anyone who wants to test it.

Michael
James A. Peltier
2011-07-28 18:05:15 UTC
Permalink
----- Original Message -----
| I think some people have wanted something like this for a while:
|
| sanboot http://boot.ipxe.org/freedos/fdfullcd.iso
|
| This is implemented, and works at a reasonable speed (even when
| booting over
| the Internet). I still need to QA the code and check that it doesn't
| introduce any regressions. Temporarily available at
|
| http://git.ipxe.org/people/mcb30/ipxe.git/shortlog/refs/heads/httpsan
|
| for anyone who wants to test it.
|
| Michael
| _______________________________________________
| ipxe-devel mailing list
| ipxe-devel at lists.ipxe.org
| https://lists.ipxe.org/mailman/listinfo/ipxe-devel

What are the plans for merging this into the iPXE proper code stream? Is this stable enough now to be used?
--
James A. Peltier
IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone : 778-782-6573
Fax : 778-782-3045
E-Mail : jpeltier at sfu.ca
Website : http://www.sfu.ca/itservices
http://blogs.sfu.ca/people/jpeltier
mwhelton
2011-07-28 22:34:30 UTC
Permalink
This is an exciting development.

OK, but as soon as I tried it, I get this:

http://www.ipxe.org/err/03852019

Here is my embedded boot script:

#!ipxe
dhcp net0
set keep-san 1
set initiator-iqn iqn.1998-01.com.vmware:ipxe.testlab.bv.ar.us.local
sanhook iscsi:192.168.65.2::::iqn.1991-05.com.microsoft:ipxe-target
sanboot http://192.168.65.3/Images/ISOs/myiso.iso

I have confirmed that the ISP is accessible with both wget and a browser.

Thanks,

MWH
Post by James A. Peltier
----- Original Message -----
|
| sanboot http://boot.ipxe.org/freedos/fdfullcd.iso
|
| This is implemented, and works at a reasonable speed (even when
| booting over
| the Internet). I still need to QA the code and check that it doesn't
| introduce any regressions. Temporarily available at
|
| http://git.ipxe.org/people/mcb30/ipxe.git/shortlog/refs/heads/httpsan
|
| for anyone who wants to test it.
|
| Michael
| _______________________________________________
| ipxe-devel mailing list
| ipxe-devel at lists.ipxe.org
| https://lists.ipxe.org/mailman/listinfo/ipxe-devel
What are the plans for merging this into the iPXE proper code stream? Is
this stable enough now to be used?
--
James A. Peltier
IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone : 778-782-6573
Fax : 778-782-3045
E-Mail : jpeltier at sfu.ca
Website : http://www.sfu.ca/itservices
http://blogs.sfu.ca/people/jpeltier
_______________________________________________
ipxe-devel mailing list
ipxe-devel at lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20110728/7022d7f8/attachment.html>
Andrew Bobulsky
2011-07-29 14:48:06 UTC
Permalink
Hello,

James, Michael merged his ISO SAN boot code into the mainline (master
branch?) iPXE just a few days after the commit referenced in that
original email. ?I'm not sure if that fact made the mailing list or
not... I think he mentioned it on IRC when I heard it.

MWH, with regard to the error you're experiencing, I'm fairly certain
that it is because you're trying to connect two SAN devices without
explicitly declaring which INT 13 device you'd like to map to. By
default, when no device is specified, iPXE will map a SAN target to
BIOS drive 0x80, regardless of whether or not it has done so already.
Your "sanhook" maps that iSCSI target as 0x80, and then the "sanboot"
tries to do the same, and fails.

Instead of the script you posted, try the following:

dhcp net0
set keep-san 1
set initiator-iqn iqn.1998-01.com.vmware:ipxe.testlab.bv.ar.us.local
sanhook iscsi:192.168.65.2::::iqn.1991-05.com.microsoft:ipxe-target
sanboot --drive 0x81 --no-describe http://192.168.65.3/Images/ISOs/myiso.iso


My syntax might not be perfect... not looking at the "help" text or
doc right now :)

With respect to the "--no-describe" parameter, I recall reading
something about iPXE's ibft support not being able to pass more than
one SAN device to the booted OS... haven't looked in to that yet :P

Cheers,
Andrew Bobulsky
Post by mwhelton
This is an exciting development.
http://www.ipxe.org/err/03852019
#!ipxe
dhcp net0
set keep-san 1
set initiator-iqn iqn.1998-01.com.vmware:ipxe.testlab.bv.ar.us.local
sanhook iscsi:192.168.65.2::::iqn.1991-05.com.microsoft:ipxe-target
sanboot http://192.168.65.3/Images/ISOs/myiso.iso
I have confirmed that the ISP is accessible with both wget and a browser.
Thanks,
MWH
Post by James A. Peltier
----- Original Message -----
|
| sanboot http://boot.ipxe.org/freedos/fdfullcd.iso
|
| This is implemented, and works at a reasonable speed (even when
| booting over
| the Internet). I still need to QA the code and check that it doesn't
| introduce any regressions. Temporarily available at
|
| http://git.ipxe.org/people/mcb30/ipxe.git/shortlog/refs/heads/httpsan
|
| for anyone who wants to test it.
|
| Michael
| _______________________________________________
| ipxe-devel mailing list
| ipxe-devel at lists.ipxe.org
| https://lists.ipxe.org/mailman/listinfo/ipxe-devel
What are the plans for merging this into the iPXE proper code stream? ?Is this stable enough now to be used?
--
James A. Peltier
IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone ? : 778-782-6573
Fax ? ? : 778-782-3045
E-Mail ?: jpeltier at sfu.ca
Website : http://www.sfu.ca/itservices
? ? ? ? ?http://blogs.sfu.ca/people/jpeltier
_______________________________________________
ipxe-devel mailing list
ipxe-devel at lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel
_______________________________________________
ipxe-devel mailing list
ipxe-devel at lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel
James A. Peltier
2011-07-29 17:32:46 UTC
Permalink
----- Original Message -----
| Hello,
|
| James, Michael merged his ISO SAN boot code into the mainline (master
| branch?) iPXE just a few days after the commit referenced in that
| original email. I'm not sure if that fact made the mailing list or
| not... I think he mentioned it on IRC when I heard it.

Ahh yes, I see that now. Don't know how I missed it!

Okay, so I tried it using a CentOS 6 Live CD ISO image and while it boots a KVM host fine if I use the raw image, when I use sanboot path to image, it boots to a certain point and then dies with an error and I'm not sure if this is an iPXE issue or a scripting issue. Booting FreeDOS as Michael described does work. Here is the error from the CentOS Live CD

No boot device found
Boot has failed, sleeping forever


Below is my iPXE script

#!ipxe
echo "Hi There! We will be booting from http://mirror.its.sfu.ca/ today."
echo "It is assumed that you have dhcp networking available."
:retry
dhcp || goto retry
set 210:string http://mirror.its.sfu.ca/mirror/CentOS/6/isos/x86_64
echo "Here we go!"
sanboot ${210:string}/CentOS-6.0-x86_64-LiveCD.iso || goto retry
--
James A. Peltier
IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone : 778-782-6573
Fax : 778-782-3045
E-Mail : jpeltier at sfu.ca
Website : http://www.sfu.ca/itservices
http://blogs.sfu.ca/people/jpeltier
Andrew Bobulsky
2011-07-29 17:53:45 UTC
Permalink
Most likely you're running into what is essentially a "Missing boot
device driver." Commonly a "7B" blue screen on Windows.

While iPXE can speak HTTP just fine and translate an ISO file as a
physical disk to BIOS, because HTTP-sourced SAN devices don't have a
BFT mechanism like iSCSI does (the iBFT), iPXE can't pass information
about what the "boot" device is or how to access it to the operating
system once it's online. Presumably, after the CentOS live CD you're
using loads the kernel and its drivers, it still needs to source more
files from that CD to finish the boot process. iPXE is non-functional
at that point, and since the OS can't find the disk, it crashes.

Any Live CD that boots *completely* into a RAM disk will work very,
very well with this boot method though. I use it to boot Windows PE
3, and on a moderately fast computer, it's online in 10 seconds or so.

Perhaps someone else on the list could suggest a Live CD for CentOS
that boots from a RAM disk device?

Best Regards,
Andrew Bobulsky
Post by James A. Peltier
----- Original Message -----
| Hello,
|
| James, Michael merged his ISO SAN boot code into the mainline (master
| branch?) iPXE just a few days after the commit referenced in that
| original email. I'm not sure if that fact made the mailing list or
| not... I think he mentioned it on IRC when I heard it.
Ahh yes, I see that now. ?Don't know how I missed it!
Okay, so I tried it using a CentOS 6 Live CD ISO image and while it boots a KVM host fine if I use the raw image, when I use sanboot path to image, it boots to a certain point and then dies with an error and I'm not sure if this is an iPXE issue or a scripting issue. ?Booting FreeDOS as Michael described does work. ?Here is the error from the CentOS Live CD
No boot device found
Boot has failed, sleeping forever
Below is my iPXE script
#!ipxe
echo "Hi There! ?We will be booting from http://mirror.its.sfu.ca/ today."
echo "It is assumed that you have dhcp networking available."
:retry
dhcp || goto retry
set 210:string http://mirror.its.sfu.ca/mirror/CentOS/6/isos/x86_64
echo "Here we go!"
sanboot ${210:string}/CentOS-6.0-x86_64-LiveCD.iso || goto retry
--
James A. Peltier
IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone ? : 778-782-6573
Fax ? ? : 778-782-3045
E-Mail ?: jpeltier at sfu.ca
Website : http://www.sfu.ca/itservices
? ? ? ? ?http://blogs.sfu.ca/people/jpeltier
_______________________________________________
ipxe-devel mailing list
ipxe-devel at lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel
James A. Peltier
2011-07-29 18:03:01 UTC
Permalink
----- Original Message -----
| Most likely you're running into what is essentially a "Missing boot
| device driver." Commonly a "7B" blue screen on Windows.
|
| While iPXE can speak HTTP just fine and translate an ISO file as a
| physical disk to BIOS, because HTTP-sourced SAN devices don't have a
| BFT mechanism like iSCSI does (the iBFT), iPXE can't pass information
| about what the "boot" device is or how to access it to the operating
| system once it's online. Presumably, after the CentOS live CD you're
| using loads the kernel and its drivers, it still needs to source more
| files from that CD to finish the boot process. iPXE is non-functional
| at that point, and since the OS can't find the disk, it crashes.
|
| Any Live CD that boots *completely* into a RAM disk will work very,
| very well with this boot method though. I use it to boot Windows PE
| 3, and on a moderately fast computer, it's online in 10 seconds or so.
|
| Perhaps someone else on the list could suggest a Live CD for CentOS
| that boots from a RAM disk device?
|
| Best Regards,
| Andrew Bobulsky

But, the raw ISO image does boot on a system with no hard disk indicating that it is booting into a full RAM disk. The only difference is that it's a CD drive attached to my KVM host. This would then seem to indicate that the sanboot of the ISO image is not presenting as a physical disk of any sort to the underlying operating system and thereby dying. Would this be correct?
--
James A. Peltier
IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone : 778-782-6573
Fax : 778-782-3045
E-Mail : jpeltier at sfu.ca
Website : http://www.sfu.ca/itservices
http://blogs.sfu.ca/people/jpeltier
Shao Miller
2011-08-01 19:27:59 UTC
Permalink
Post by James A. Peltier
But, the raw ISO image does boot on a system with no hard disk
indicating that it is booting into a full RAM disk. The only
difference is that it's a CD drive attached to my KVM host. This would
then seem to indicate that the sanboot of the ISO image is not
presenting as a physical disk of any sort to the underlying operating
system and thereby dying. Would this be correct?
Yes, you are correct. As Andrew described, there isn't a standard way
to tell an OS about an HTTP SAN disk, like the iBFT for iSCSI and the
aBFT for AoE.

Roughly speaking, you have pre-kernel and post-kernel times in your OS
booting process. Pre-kernel, iPXE hooks INTerrupt 0x13 and emulates the
disk/disc. But post-kernel, iPXE is gone, so the OS must re-establish
an HTTP SAN; there's no standard way to do this, as far as I know.

DOS uses INT 0x13 throughout, so will always have access to the SAN, via
iPXE's hook.

Also, that your VM works without an HDD doesn't exactly suggest that the
OS is all loaded to RAM... You have said that there's a virtual optical
disc drive for the VM, and you might find interesting results if you
were to detach that ODD at the precise moment that the kernel is booted;
that is essentially what happens when SAN-booting "live CDs" and if the
SAN connection disappears.

- Shao Miller

mwhelton
2011-07-30 06:33:50 UTC
Permalink
Progress...somewhat.

I pared down the boot script to just the CD image..

#!ipxe
dhcp net0
set keep-san 1
set initiator-iqn iqn.1998-01.com.vmware:ipxe.olympus.bv.ar.us.local
sanboot http://192.168.65.3/Images/ISOs/myiso.iso


The result is:

Could not open SAN device.

http://www.ipxe.org/err/3f122003

I'm going to try with the latest stable tree.

MWH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20110730/b15c8c05/attachment.html>
mwhelton
2011-07-30 06:47:09 UTC
Permalink
Success!

#!ipxe
dhcp net0
set keep-san 1
set initiator-iqn iqn.1998-01.com.vmware:ipxe.olympus.bv.ar.us.local
sanhook iscsi:192.168.65.2::::iqn.1991-05.com.microsoft:ipxe-target
sanboot --drive 0x81 --no-describe http://192.168.65.3/Images/ISOs/myiso.iso

MWH
Post by mwhelton
Progress...somewhat.
I pared down the boot script to just the CD image..
#!ipxe
dhcp net0
set keep-san 1
set initiator-iqn iqn.1998-01.com.vmware:ipxe.olympus.bv.ar.us.local
sanboot http://192.168.65.3/Images/ISOs/myiso.iso
Could not open SAN device.
http://www.ipxe.org/err/3f122003
I'm going to try with the latest stable tree.
MWH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20110730/08cc4ec7/attachment.html>
Loading...