#pod2html --css=style.css --noindex index.pod > index.html pod2advent smoke.pod --noadvent --css=smoke.css > index.html rm smoke/*.ERR pod2advent="perl -I/kunden/homepages/12/d93966548/htdocs/www/sandbox/Pod-Advent-0.16/lib /kunden/homepages/12/d93966548/htdocs/www/sandbox/Pod-Advent-0.16/bin/pod2advent" $pod2advent smoke.pod --noadvent --css=smoke.css > index.html ; rm smoke/*.ERR =pod =for advent_title Pen Drive Smoker HOWTO =head1 Overview This is a brief how-to, with support scripts, for running M from a machine without a hard drive (i.e. no risk of loosing data), booted from an out-of-the-box liveCDN, using a pen drive for persistent data (configuration, reports log). Great use for that spare laptopN! I =head2 Preparation A live CD or other means of booting a system with perl & compiler tools. Something (usb pendrive, external harddrive, nfs mount, samba mount, etc) that's read-write mountable. The A archive extracted onto whatever media. Then B the following files in the resulting F directory:
  • F - Tweak the CPAN settings to your likely -- most notably the C setting for your closest/fastest/newest mirror.
  • F<.cpanreporter/config.ini> - Put your M entries in here, most notably C and C.
  • F - This controls what modules get skipped (for whatever reason).
You can B the files here: A =head2 Execution =head3 Boot & mount Boot (preferably into runlevel 3 -- to save resources). Mount your media of choice (C may be helpful in finding it), and B to the F directory. =begin pre cat /etc/fstab mount /media/sda1 # e.g. a USB stick cd /media/sda1/smoke =end pre =head3 Setting Up At this point, the only item of information needed for setup is a filename of a B to use, and its desired size (in MB). This will be a ext2 filesystem file -- this is done for flexibility, e.g. for using VFAT formatted USB pen drives or samba-mounted drives. Size over 500MB is probably fine; 1GB is pretty safe. Can go lower (e.g. 250MB), but going to need occaissional restarts after the space fills up. This file can be on the main system (e.g. the ramdisk if this is a liveCD), a local hardrive, the current (F) directory, a second usb drive, a remote nfs/samba mount, or whereever. Some examples: =begin pre # Simplest -- using the F directory (i.e. same piece of media): ./smoke-setup smoke.fs 1000 # Using a second USB stick: mount /media/sdb1 ./smoke-setup /media/sdb1/smoke.fs 1000 # Using a LAN samba share: mkdir /mnt/smb mount -t smbfs -o rw,lfs,workgroup=WORKGROUP,username=Administrator,password= //192.168.1.101/_smb /mnt/smb ./smoke-setup /mnt/smb/smoke.fs 1000 =end pre Whereever it goes, it's best to reuse the same one later (but not required -- will just have slower startup times while it reinstalls the toolchain). =head3 Running Now, to get things going, simply do: =begin pre ./smoke-start =end pre And you're off! =head3 Monitoring These are all useful monitoring commands: =begin pre # Watch it all spew by: tail -f /tmp/smoke.out # Watch the reports being sent out: tail -f .cpanreporter/reports-sent.db # Dashboard of free disk, memory, smoker status, reports counts and listings. watch -n30 ./smoke-status =end pre =head1 CAVEATS I However, this is a very safe and easy approach if you're using a live CD, no hard disk, and a cheap usb pen drive w/no other data on it. You will just want to B the F directory to another system since, in theory, something being smoke-tested could destroy it. Copying the F file is optional (and you probably don't want to bother with the size) -- it can always just be re-generated. =head1 INTERNALS The basic concept here is to keep just the M & M config files on a writeable media (i.e. usb drive), and kick off M and sit back and watch. There are two main needs, though, which is where the F filesystem file comes in. First, need to have the newest versions of M, M, toolchain modules, and deps installed. For this, the CPAN config file sets the PREFIX to be on the F mount, and the first things that C does is update/install those modules. Second, need room for CPAN to put the build and sources directories -- this is what takes up the bulk of the F mount, and again is specified in the CPAN config file. C takes care of creating and mounting the F mount, and also creates symlinks to all the F from the main system, so that any updates (most importantly to F<.cpanreports/reports-sent.db> are preserved, since it's the one persistent RW location. =sourcedcode smoke/smoke-setup C updates/installs the prereqs, then kicks off M =sourcedcode smoke/smoke-start C is useful to leave up (can switch terminals between it and C), and is (hopefully) self-documenting. =sourcedcode smoke/smoke-status =head1 CONTACT David Westbrook (CPAN: davidrw), C<< >> =head1 SEE ALSO L et al M M, M M, M, M
=begin footnote livecd Others I tried we're suitable because they either did not have a full perl install, or would not boot on my laptop. The distro i'm using is C. =end footnote =begin footnote laptop My testing was done on a T43 IBM Thinkpad. =end footnote =cut