Mac Linux Testing

From FreekiWiki
Revision as of 14:14, 28 December 2012 by Scellef (talk | contribs) (Initial dump on memory testing. Need to add Rember steps next.)
Jump to navigation Jump to search

Towards building a set of Linux testing tools for MacLand, braindump for tests and projects in progress

Needed
  • Memory test procedure
  • Battery test procedure
  • When OSX is needed to update firmware, see also OSX Bless Testing

Memory Testing

Intel

Intel Macs can run our standard memory testing utility (Memtest86+) through a couple of different methods. The most straightforward is to use a Memtest86+ ISO image and burn it to disc. You can then boot the Mac off the CD (hold down either c, or option while POSTing).

Alternatively, we can have the Mac PXE boot to our internal network and load Memtest86+ from there. As Intel Mac firmware utilize a different boot protocol, in order to perform a PXE boot we'll use a utility known as iPXE. Similarly to Memtest86+, the most straightforward method is to burn an ISO to disc and boot the Mac from CD.

Unfortunately, not all Intel Macs will be able to successfully boot from CD, and even then some models (or firmware revisions) will load iPXE but stall during the network bootstrap. When this is the case, memory testing will have to be conducted inside of an OS: memtester in Linux, or Rember in OSX. See the PowerPC section for more information.

As of December 2012, testing is being conducted to see whether iPXE can be chainloaded from a standard Apple network boot.

PowerPC

Unfortunately, Memtest86+ is not built for the PowerPC architecture, and no bootable alternative is available. This means memory testing has to occur within an OS (memtester in Linux, or Rember in OSX).

By default, memtester isn't included in our Linux images, but it is available in the repositories:

 sudo apt-get install memtester

An important thing to note: Memory testing utilities are only able to test unused system memory. When testing memory inside of an OS, a significant portion is used by the operating system, thereby preventing a fully comprehensive test. This reason in particular is why bootable memory diagnostic utilities are preferable.

To remedy this issue, we boot into single-user mode mode; a limited console environment that utilizes much less of the system memory (typically by a factor of about 10). Follow these steps:

  • When booting a PPC Mac with Linux installed, hit Esc when the Yaboot prompt shows.
  • This will drop you at a prompt. (Note: you can see which images are available to boot by pressing Tab.)
  • Enter the following and press Enter:
 Linux recovery
  • You'll arrive at the standard Recovery mode menu. Choose the root shell option.
  • memtester's syntax looks like this:
 memtester [size of memory to test] [number of passes]
  • Unfortunately, memtester doesn't automatically work up to the available of RAM, so you'll have to manually specify how much you want tested. In order to see how much free memory is available, run free -m and use the number shown the free column and the Mem: row, and specify 2 passes. For example:
 memtester 1005 2
  • memtester will immediately lock all of the memory specified. If an error is returned, try running it with less memory.