Power Log Collector

From OLPC
Revision as of 05:14, 7 February 2011 by Quozl (talk | contribs)
Jump to: navigation, search

This Power Log Collector boots an XO-1 or XO-1.5 and copies the power logs to itself before shutting the laptop down.

Use

  • Download . and unpack onto a USB flash drive.
  • Shut down the XO
  • Insert the USB drive and turn on the XO
  • The XO will collect the power logs, print a message saying has done so and then shut down.

Theory of Operation

  • Based on Tiny Core Linux
  • An Open Firmware Boot Script selects the XO-1 or XO-1.5 kernel.
  • The initial ramdisk mounts /dev/sda (which should be the first USB drive) and..
  • executes rc.local on that drive
  • rc.local does the collection

Modifying Tiny Core Linux

This will unpack the initial ramdisk to the current directory.

  1. gunzip <../initrd.gz | cpio -i
  2. Modify as needed
  3. find | sudo cpio -o -H newc --quiet | gzip -2 > ../initrd.gz

Note: will not work on secured laptops without signing.