Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-18 Thread Martin Langhoff
On Sun, Jan 16, 2011 at 9:21 PM, Anna  wrote:
> With the release of 10.1.3, I thought I'd revisit flashing an XO over the
> LAN.  Here are my notes, if anyone's interested.

Interesting!

For a full reflash, as James pointed out, NANDBlaster wins. But if you
have laptops out there with an earlier 10.1.x, the local XS can serve
incremental update images for olpc-update :-)

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-17 Thread James Cameron
On Mon, Jan 17, 2011 at 03:06:52PM -0600, Anna wrote:
> I looked into this a little more and found, per http://httpd.apache.org/docs/
> trunk/mod/mod_reqtimeout.html that module is for Apache 2.2.15 and later.  The
> Apache version on XS 0.6 is a bit long in the tooth.
> 
> [root@schoolserver ~]# httpd -v
> Server version: Apache/2.2.9 (Unix)
> Server built:   Jul 14 2008 15:36:56
> 
> Anyone have ideas for a workaround?

I suspect there is a timeout in Apache core for that version, and that
2.2.15 moved the feature into a module.  See the TimeOut directive:

http://httpd.apache.org/docs/2.0/mod/core.html#timeout

The default of five minutes seems quite sufficient.

You might also prove if it is a cause, using tcpdump to capture the port
80 TCP stream, then analyse it to see if the connection was closed
prematurely by the server.  Only then try changing the timeout.

If you see OpenFirmware's side of the packet stream misbehaving, let me
know.

-- 
James Cameron
http://quozl.linux.org.au/
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-17 Thread Anna
On Sun, Jan 16, 2011 at 9:43 PM, James Cameron  wrote:

> I don't know about the Apache version used on the XS, but on a desktop
> here the edit was in /etc/apache2/mods-available/reqtimeout.conf and
> changed
>
> RequestReadTimeout header=20-40,minrate=500
> RequestReadTimeout body=10,minrate=500
>
> to
>
> RequestReadTimeout header=20-40,minrate=50
> RequestReadTimeout body=20,minrate=50
>
>
I looked into this a little more and found, per
http://httpd.apache.org/docs/trunk/mod/mod_reqtimeout.html that module is
for Apache 2.2.15 and later.  The Apache version on XS 0.6 is a bit long in
the tooth.

[root@schoolserver ~]# httpd -v
Server version: Apache/2.2.9 (Unix)
Server built:   Jul 14 2008 15:36:56

Anyone have ideas for a workaround?

Anna Schoolfield
Birmingham
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-16 Thread Anna
On Sun, Jan 16, 2011 at 9:43 PM, James Cameron  wrote:

> On Sun, Jan 16, 2011 at 09:22:19PM -0600, Anna wrote:
> > I'm not familiar enough with Apache to know what to edit as far as the
> > maximum request duration.  Any tips there?
>
> I think I found evidence in Apache logs of a timeout, so I changed this.
>
> I don't know about the Apache version used on the XS, but on a desktop
> here the edit was in /etc/apache2/mods-available/reqtimeout.conf and
> changed
>
> RequestReadTimeout header=20-40,minrate=500
> RequestReadTimeout body=10,minrate=500
>
> to
>
> RequestReadTimeout header=20-40,minrate=50
> RequestReadTimeout body=20,minrate=50
>
> (This has consequences for a server available to the general public,
> since denial of service attacks become slightly easier.  But on a local
> server your risk will be lower.)
>
> --
> James Cameron
> http://quozl.linux.org.au/
>


I can't grep anything on XS 0.6 in /etc/httpd resembling that, so this is
probably going to be a question for Martin.
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-16 Thread James Cameron
On Sun, Jan 16, 2011 at 09:22:19PM -0600, Anna wrote:
> I'm not familiar enough with Apache to know what to edit as far as the
> maximum request duration.  Any tips there?

I think I found evidence in Apache logs of a timeout, so I changed this.

I don't know about the Apache version used on the XS, but on a desktop
here the edit was in /etc/apache2/mods-available/reqtimeout.conf and
changed

RequestReadTimeout header=20-40,minrate=500
RequestReadTimeout body=10,minrate=500

to

RequestReadTimeout header=20-40,minrate=50
RequestReadTimeout body=20,minrate=50

(This has consequences for a server available to the general public,
since denial of service attacks become slightly easier.  But on a local
server your risk will be lower.)

-- 
James Cameron
http://quozl.linux.org.au/
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-16 Thread Anna
On Sun, Jan 16, 2011 at 8:49 PM, James Cameron  wrote:

>
> Yes, the XO-1.5 firmware attempts NANDblaster.  However, you might
> override this by attempting fs-update over HTTP:
>
>ok fs-update http:\\server\os860-4g.zd
>
> I've just tried this here, and the green boxes cease on about the second
> line.  I remember I had to increase the maximum request duration on
> Apache last time I tested it.
>  
>

I only got about 3/4 of one green line before it pooped out.

fs-update http:\\172.18.0.1\os860-4g.zd

After many, many minutes it complains about "Short read of zdata file"

And then "WARNING: The file specified 29489 chunks but wrote only 280
chunks"

I'm not familiar enough with Apache to know what to edit as far as the
maximum request duration.  Any tips there?

Anna Schoolfield
Birmingham
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Notes on Flashing the NAND over the LAN

2011-01-16 Thread James Cameron
On Sun, Jan 16, 2011 at 08:21:02PM -0600, Anna wrote:
> Trying disk:\fs.zip
> Trying ext:\fs.zip
> Trying NANDblaster
> Boot device: /dropin-fs:nb15_rx Arguments:  ssid:OLPC-NANDblaster
> Scan for: OLPC-NANDblaster found
> Associate with: OLPC-NANDblaster
> Waiting for server

Yes, the XO-1.5 firmware attempts NANDblaster.  However, you might
override this by attempting fs-update over HTTP:

ok fs-update http:\\server\os860-4g.zd

I've just tried this here, and the green boxes cease on about the second
line.  I remember I had to increase the maximum request duration on
Apache last time I tested it.

-- 
James Cameron
http://quozl.linux.org.au/
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


[Server-devel] Notes on Flashing the NAND over the LAN

2011-01-16 Thread Anna
With the release of 10.1.3, I thought I'd revisit flashing an XO over the
LAN.  Here are my notes, if anyone's interested.

First off, if your AP is really old and only does B, you might run into
trouble.  The layout in my house is the XS in the front room with eth1
connected to a router.  The router goes to an AP sitting next to the XS and
a wall jack to the sleeping porch (it's a 1913 bungalow) with another AP
back there.  I call it my "winter lab" because there's a heater.  The front
room with the XS has been getting down to 40F, which is a bit chilly.

My two APs are different Linksys models.  The older one, which I picked up
from a thrift store for $5, only does B and usually works for most things.
The newer one does B/G.  I did have the older one in my "winter lab" but
swapped it out for the newer one, as you'll see.

I started off by using wget to download these two files in /var/www/html on
the XS:

http://build.laptop.org/10.1.3/xo-1/os860/os860.img
http://build.laptop.org/10.1.3/xo-1/os860/os860.img.fs.zip

I copied os860.img.fs.zip to fs.zip.  Then I set both my APs to the SSID of
OLPCOFW.  Since it was getting kind of cold, I went to my "winter lab" with
the B only AP (and the heater).  Plugged in an XO-1, held down all four game
keys, and powered on.  It saw the AP, associated to OLPCOFW, got an IP from
the XS, erased the nand, and then tried to flash it.  When I say try, it got
about 5 green blocks in before completely stalling.

Figuring the old AP was the problem, I swapped it out for the newer B/G AP
from the front room.  That AP worked.  Flashing the XO-1 over the LAN took
about half an hour, but it completed, rebooted itself, and was good to go.
For mass updates, this would probably be highly inefficient and you're
better off with USB drives or an XO set up to NAND Blast.  But it's a nice
option to have for the occasional reflashing.

I had other trouble with the B only AP, like when I put this in
/etc/sysconfig/network-scripts/ifcfg-eth0 on an XO:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Wireless
MODE=Managed
ESSID=OLPCOFW

Trying to associate with the B only AP in single user mode with ifup eth0
fails.  It works with the B/G AP, though.

So now that I've verified flashing the XO-1 over the LAN works with the B/G
AP, I'm curious to see if the XO 1.5 can do that as well.  Short answer -
no, I couldn't get it to work.

I used wget to download these two files into /var/www/html on the XS.

http://build.laptop.org/10.1.3/xo-1.5/os860/os860-4g.zd
http://build.laptop.org/10.1.3/xo-1.5/os860/os860-4g.zsp.fs.zip

I deleted the XO-1 fs.zip file and copied os860-4g.zsp.fs.zip to fs.zip.
Following the same procedure as the XO-1 LAN flashing, the XO 1.5 said it
was looking for ssid:OLPC-NANDblaster.  I renamed the AP to OLPC-NANDblaster
and this is all I got:

Trying disk:\fs.zip
Trying ext:\fs.zip
Trying NANDblaster
Boot device: /dropin-fs:nb15_rx Arguments:  ssid:OLPC-NANDblaster
Scan for: OLPC-NANDblaster found
Associate with: OLPC-NANDblaster
Waiting for server

And then it just sits there.  Oh, well, it would have probably taken a
couple of hours to flash over the LAN anyway.

Tip:  I like to include the IP addresses of my APs and the router in
/etc/motd.  Then I need only login to the XS to see where I put them so I
know where to go for their web interfaces.

cat /etc/motd

The Router is on 172.18.126.2
The B/G AP is on 172.18.126.3
The Salvation Army AP is on 172.18.126.4

Anna Schoolfield
Birmingham
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel