Removing Familiar Linux from an iPaq
Part 1: Preparing the images
To remove Familiar Linux from your iPaq 5450 or 3970, you will need to download the appropriate ROM image from HP and extract the data portion of the file before copying it to the iPaq. You can obtain the latest ROMs for these two models below.
- iPaq 3970: Version 2.10
- iPaq 5450: Version 1.11.19
Download the ROM installer to your computer, run it, and install it. The installer will create a C:\IPAQ directory. The ROM file itself will be located in the C:\IPAQ\SP24093 directory for the 5450 and C:\IPAQ\SP23497 for the 3970. The file you need is 48MB and has a .nbf extension. Copy this file to a computer that has the DD command, such as Abacus or Sliderule (if you have enough quota), or a computer running a UNIX-like OS. You can also download a version of DD for Windows from here.
Next, you need to remove the file header using DD. This header is 32 bytes on the 3970 and 64 bytes on the 5450. This will create an output file named ce.img.
- iPaq 3970:
> dd bs="32" skip="1" if="NK_Windsor21010WWE.nbf" of="ce.img" - iPaq 5450:
> dd bs="64" skip="1" if="KERNEL_PPC02_1_11_10.nbf" of="ce.img"
Next, we need to extract the 32MB to be placed back on the iPaq. Note that we also skip the first 256KB of the file because that is where the boot loader is located, which we will get to later. Therefore, the total file size will be 32,512KB and will be named ce32.img. We don't need the last 16MB of the file because the "Compaq File Store" is located in this region, and the boot loader will only address the first 32MB of the ROM. Therefore, the last 16MB can't be restored anyway.
- Both models:
> dd bs="1024" skip="256" count="32512" if="ce.img" of="ce32.img"
After extracting 32MB from the ROM downloaded from HP, it needs to be compressed. This, while not absolutely necessary, will cut the time required to copy the image to the iPaq in half.
- Both models:
> gzip -9 ce32.img
You will also need a copy of the boot loader for your model of iPaq. For the 3970, this is easy. It is included in the ROM you downloaded earlier. For the 5450, this is not so easy. It is not included in the ROM. If you followed all the directions for installing Familiar Linux, then you should have a gzipped copy. If not, you can follow those directions to extract it from an iPaq 5450 that still has Windows CE on it. Note that you cannot use the boot loader from the 3970 or other model on the 5450. It must be the 5450 boot loader. Failure to use the correct boot loader will render your iPaq useless. You can extract the boot loader from the 3970 ROM by running the commands below.
- iPaq 3970:
> dd bs="1024" count="256" if="ce.img" of="bootldr.img"
> gzip -9 bootldr.img
Part 2: Copying WinCE to the iPaq
Next, you will copy the ce32.img.gz file to the iPaq. First, you will need to connect your docking cradle to the serial port on your computer. Open a Hyperterminal session to that serial port using 115200 N81, no flow control. Reset the iPaq using the soft reset button on the bottom (the iPaq should vibrate) and quickly place it in the cradle. Press the space bar and enter key a few times until the boot loader help scrolls by. You should now be at a boot> prompt. Type the following to restore the WinCE image to your iPaq. Note that it will take about 30 minutes.
- Both models:
boot> load root
It will prompt you to initiate the YMODEM session. In Hyperterminal, click the Transfer menu and click Send File. Browse to the ce32.img.gz file and click Send. After a few seconds, the transfer will start. After it is complete you will see messages about erasing the ROM and writing data to it. You should get a verified message at the end before it returns to the boot prompt. Next, boot into WinCE.
- Both models:
boot> boot wince
After a few seconds, the iPaq should boot into Windows CE. You may get an error message at startup. Also, it will not save your settings at this point. You will also notice that the iPaq file store is unavailable. These errors will all be fixed later. For now, the boot loader needs to be restored so that the original HP ROM can be restored. So, reset the iPaq and at the HP logo screen, hold down the Joy Pad and press the reset button. The iPaq should vibrate again. Quickly place it in the cradle and press the space bar and enter key repeatedly until the boot> prompt appears.
Now you will restore the boot loader. Make sure you have the correct boot loader for your iPaq, either from the backup you made when installing Linux, or the one extracted from the ROM (3970 only). Type the following at the boot> prompt. This will only take a few seconds.
- Both models:
boot> load bootldr
As before, it will prompt you to initiate the YMODEM session. In Hyperterminal, click the Transfer menu and click Send File. Browse to the bootldr.img.gz file and click Send. After a few seconds, the transfer will start. After it is complete you will see messages about erasing the ROM and writing data to it. You should get a verified message at the end before it returns to the boot> prompt.
After the boot> prompt returns, reset your iPaq and WinCE will boot. All vestiges of Linux have been removed. However you will notice that the features mentioned before still do not work. You will have to restore the original HP ROM to correct this.
Part 3: Restoring the Original ROM
Now that you have restored WinCE and the HP boot loader, you can reinstall the original ROM from HP. You should have already downloaded this earlier. First you will need to connect the cradle to the USB port on your computer. When you place the iPaq in the cradle, you should be able to establish a Guest ActiveSync session. The ROM installer itself will be located in the C:\IPAQ\SP24093 directory for the 5450 and C:\IPAQ\SP23497 for the 3970. Run RUU.exe and follow the directions. When it is complete, you should have a fully functional iPaq again.
