Thanks to your suggestion about overcoming gPXE's non-recognition of
my Ethernet card, I'm using Netboot.me on a EeePC 901.
I've been trying out the Create Configuration option but have not yet
succeeded in creating anything that works so perhaps you can help me
understand a little more:
1. I have 1 GB of RAM on the EeePC. How limiting is this? I was able
to get Debian (a full-sized OS) working off of Boot.Kernel.Org
although it performed very slowly which may have been because of lack
of memory.
2. Download rates for the configuration I've created continue to be in
the 8-18 kB/s range which makes experimentation difficult. However, I
created one for Puppy Linux (109 MB) which started downloading fine
but then errored out after 62 MB and complained about inability to
fetch the files it had either just downloaded (boot file) or was in
the process of doing (Puppy iso). The final error was a Grub error 22.
The errors sound like I lost network connection. Is this a
possibility?
3. I've also tried to create a configuration for Haiku (available as a
zipped raw image). However, this will not boot without being first
unzipped and then made bootable with the BFS "makebootable" utility.
Is there any way to apply scripting to the download in order to
prepare it for booting or is this too ambitious at this stage?
Thanks for the reply.
The very low (8-18 kB/s) initial download rates I see with everything
I've tried in Netboot.me, including created configurations, is without
doubt the biggest drawback of this potentially marvelous facility.
Is this just the way it is or is there anything I can do to improve
it?
I think the problem here is the gPXE TCP window size. The windows size
is 4096 byte by default. This means that 4096 byte will be transmitted
by the server before it will wait for an ACK of that data. The server
won't send anything before it receives the ACK. The higher the
latency, the higher the speed impact will be. This is why this is not
an issue in a LAN.
One could increase the window size in gpxe/src/include/gpxe/tcp.h.
Here a second problems comes up: gPXE will drop any packets that were
received out-of-order. If an out-of-order packet arrives the whole TCP
window needs to be retransmitted. This is not a big problem with a
window size of 4kb, however it is a problem if the window size was
increased to, say 64kb. A single corrupted packet(of max. 1500 byte),
or a packet that arrives out of order, will trigger the retransmission
of all data in that window(in the worst case the whole 64kb). The
retransmitted 64kb would have to be lucky enough to arrive in the
right order and without packet corruption, or the same thing will
happen again. In some setups this could prevent booting over the net
completely if <TCP-window-size> bytes don't arrive in-order after a
few tries.(which could be possible in unstable connections).
The proper fix would be to make gPXE capable of storing and using
out-of-order packets and implement an algorithm to adjust the TCP
window size automatically.
The available memory in gPXE is very limited and code size should be
kept small for .rom images, which are probably one of the reasons why
this hasn't been done yet.
I really hope that someone capable of doing this will take on this
task, but I don't know when or if this will happen. Patches to the
etherboot-developers mailing list are always welcome :)
Workarounds could be decreasing the latency. This is only possible to
a limited extent, as latency over the internet is always rather high.
Another workaround that could work is to keep the file(s) downloaded
by gPXE as small as possible. A more advanced TCP/IP stack, like the
one of linux could download the rest. I believe this is already done
by one of the HDD partitioning tools in the netboot.me menu, where a
small initrd is loaded and the rest is downloaded by the gPXE booted
linux kernel. Possibly this could be done for other boot options too,
a very small initrd could load the real, bigger initrd.
Thomas
I think the problem here is the gPXE TCP window size. The windows size
On Mon, Sep 7, 2009 at 11:08 PM, PaulFXH<paulfx...@gmail.com> wrote:
>
> Thanks for the reply.
> The very low (8-18 kB/s) initial download rates I see with everything
> I've tried in Netboot.me, including created configurations, is without
> doubt the biggest drawback of this potentially marvelous facility.
> Is this just the way it is or is there anything I can do to improve
> it?
>
is 4096 byte by default. This means that 4096 byte will be transmitted
by the server before it will wait for an ACK of that data. The server
won't send anything before it receives the ACK. The higher the
latency, the higher the speed impact will be. This is why this is not
an issue in a LAN.
One could increase the window size in gpxe/src/include/gpxe/tcp.h.
Here a second problems comes up: gPXE will drop any packets that were
received out-of-order. If an out-of-order packet arrives the whole TCP
window needs to be retransmitted. This is not a big problem with a
window size of 4kb, however it is a problem if the window size was
increased to, say 64kb. A single corrupted packet(of max. 1500 byte),
or a packet that arrives out of order, will trigger the retransmission
of all data in that window(in the worst case the whole 64kb). The
retransmitted 64kb would have to be lucky enough to arrive in the
right order and without packet corruption, or the same thing will
happen again. In some setups this could prevent booting over the net
completely if <TCP-window-size> bytes don't arrive in-order after a
few tries.(which could be possible in unstable connections).
The proper fix would be to make gPXE capable of storing and using
out-of-order packets and implement an algorithm to adjust the TCP
window size automatically.
The available memory in gPXE is very limited and code size should be
kept small for .rom images, which are probably one of the reasons why
this hasn't been done yet.
I really hope that someone capable of doing this will take on this
task, but I don't know when or if this will happen. Patches to the
etherboot-developers mailing list are always welcome :)
Workarounds could be decreasing the latency. This is only possible to
a limited extent, as latency over the internet is always rather high.
Another workaround that could work is to keep the file(s) downloaded
by gPXE as small as possible. A more advanced TCP/IP stack, like the
one of linux could download the rest. I believe this is already done
by one of the HDD partitioning tools in the netboot.me menu, where a
small initrd is loaded and the rest is downloaded by the gPXE booted
linux kernel. Possibly this could be done for other boot options too,
a very small initrd could load the real, bigger initrd.
Thomas
This requires a source code change. If you have the gPXE source code,
open gpxe/src/include/gpxe/tcp.h. Find the line that says
#define TCP_MAX_WINDOW_SIZE 4096
It should be around line 290.
You can play around with the value, as long as you keep it below 65536.
I suggest using the gPXE source code from
http://github.com/Arachnid/netboot.me-gpxe/tree/netbootme-0.2.0
as all the patches used for the netboot.me build should be included there.
You can build a netboot.me undionly.kpxe if you cd into the gpxe/src
directory and do:
make bin/undionly.kpxe EMBEDDED_SCRIPT=scripts/netbootme.gpxe
You have to rebuild gPXE after every change you do to the code, and
you have to copy the file 'bin/undionly.kpxe' to your tftp server
after every rebuild.
@Nick: please correct me if I'm wrong with the build instructions,
I've never build the netboot.me version of gPXE.
good luck!
Thomas
good luck!
Thomas
Thanks for the replies.
I went ahead and tried what Thomas suggested (as far as I could
understand) and did the following:
1. Downloaded Arachnid-netboot.me-gpxe-
d62256757b2c6fe01a626382a3bd2b6055769b88.tar.gz from here (http://
github.com/Arachnid/netboot.me-gpxe/tree/netbootme-0.2.0)
2. Untarred with
tar -zxvf Arachnid-netboot.me-gpxe-
d62256757b2c6fe01a626382a3bd2b6055769b88.tar.gz
3. cd'ed to Arachnid-netboot.me-gpxe-
d62256757b2c6fe01a626382a3bd2b6055769b88
4. cd'ed to src/include/gpxe
5. Edited tcp.h to change the line suggested by Thomas to
#define TCP_MAX_WINDOW_SIZE 16384
6. cd'ed back to src (../..)
7. make
8. As far as I could see this went OK without error.
9. Now, I made a new bootable USB key with
cat bin/gpxe.usb > /dev/sdX
Now, I restarted the computer with the USB key inserted and it booted
fine but it brought me to a Netboot.me menu but (in the three times
that I tried this), the screen was frozen and I couldn't do anything
other than hit the power button to restart.
I did not do the "copy the file 'bin/undionly.kpxe' to your tftp
server" suggested by Thomas as, AFAIK, I don't operate a tftp server.
Would appreciate comments as this is not an area I'm very familiar
with.