|
Welcome to the Yargy Bot Familiar Backup Howto! Familiar Linux is a distribution of the famous operating system designed to run on HP/Compaq iPAQ handheld computers. This Howto describes how to create a copy of your Familiar Linux root filesystem as a JFFS2 image file. It then goes on to describe how to use this image file to create a minimally-sized and cleaned-up JFFS2 image that is more suitable for re-flashing. At the time of writing, I'm running Familiar 0.7 with a version 2.4.19-rmk6-pxa1-hh23 kernel on my iPAQ 3870, and Debian Sid with a custom version 2.4.20 kernel on my desktop machine. Creating a copy of your iPAQ's flash memory root partition (which
contains the root filesystem) is pretty straight-forward. You will need
to execute the commands below as the root user. The image file created by the above command is just a direct copy of everything in the root partition of the iPAQ's flash memory. This is not suitable for re-flashing to the iPAQ later, so it isn't actually much use as a backup. The reasons that it's no good for re-flashing are two-fold.
You need some non-standard kernel bits on your desktop (or laptop or whatever) for this, so if you're not into re-compiling your kernel, this is probably not for you. I think these bits can all be compiled as modules, so a "complete" kernel rebuild may not be required (ie. you might be able to get away with just building the modules). First, you need loopback device support. This is fairly common in "standard" kernels. Try step 2 below. If it works, you have loopback device support already. If you use menuconfig or xconfig to configure your kernel, you'll find the loopback device option under "Block devices". Next, you need Memory Technology Device (MTD) support. This is rarely used in desktop machines. MTD support has it's own section in menuconfig/xconfig. You need to have "Memory Technology Device (MTD) support" (obviously), "Caching block device access to MTD devices" (mtdblock module), and "MTD emulation using block device" (blkmtd), which is under "Self-contained MTD device drivers". This last one MUST be compiled as a module because you need to pass parameters to it later.You also need mkfs.jffs2 installed. Under Debian, this is in a package called mtd-tools. 1. Load up the kernel modules you need, if necessary. Some or all of
these might load automatically as you go along. 2. Set up a loopback device on your existing jffs2 file. You might
want to make a backup of the jffs2 file beforehand, just in case. 3. Emulate an MTD device on the loopback device 4. Mount the MTD device 5. Create a new (minimally-sized and cleaned-up) jffs2 filesystem
from the old one. Note that this should all be typed in as one line 6. Clean up after yourself If step 5 worked, you will now have a new jffs2 file, hopefully
smaller than your old one. If it's still not under 22MB in size, you
can try compressing it with gzip |