>![]() |
Installing or maintaining a Linux card-installation using Ramdisk Rescue
- Warning
- Introduction
- Get the required files
- Copy the files to your flash card
- Start Ramdisk Rescue
- Install Linux
- Start Linux on your handheld!
- Problems
- Known bugs
- Examples
- Developer Information
- Feedback and appreciation
1. Warning
|
This procedure WILL blank the RAM of your handheld computer. As PPC200x/WM5 stores a lot of information (data and applications) in RAM, you WILL need to hard-reset your handheld after running Linux on it! You WILL lose so make a BACKUP before attempting to run Ramdisk Rescue. |
2. Introduction
2.1. What is Ramdisk Rescue?
-
Ramdisk Rescue allows Linux to be installed to a flash card (SD, MMC or CF) using a handheld, without requiring a separate computer to format the card. In other words, Ramdisk Rescue is an automated installer for
In addition to installing Linux, Ramdisk Rescue can function as a rescue system, allowing a malfunctioning Linux installation to be diagnosed and repaired.
Ramdisk Rescue runs from a FAT (Windows) partition on a flash card using a WinCE/PocketPC application called HaRET to load and execute. It can install a Linux system on another flash card, or the same flash card from which it runs, by shrinking the FAT partition to make room for an ext2 (Linux) partition. For those unfamiliar with partitioning, this is basically a trick to make a single card appear to contain two disks (one of which Windows can't see;).
2.2. What features does Ramdisk Rescue have?
-
Features include:
-
-
view detailed machine information.
-
test audio, leds and check filesystems.
-
remove Linux, wipe or format a flash card.
-
install Linux to a flash card
-
the existing partition is resized without data loss .
-
partitioning and formatting errors introduced by PPC2003 and/or cameras should be corrected.
-
a new HaRET startup.txt file is created to suit the install.
-
a labrun file is placed on the Linux filesystem to enable booting of the card from a LAB-enabled handheld.
-
the fstab file is modified to suit the card (decreases boot time by minutes).
-
install size and IP addresses can be determined before boot (custom.txt).
-
SSH access (user:root, password: toor).
-
serial debug info (no login). Serial cable required.
-
additional package installation is possible (ipkg).
-
No warranty of course!
This is a convenience measure to save you from the need to repartition a card manually.
2.3. How does Ramdisk Rescue work?
-
Those unfamiliar with Linux, perhaps even experienced users, may not understand the basics of how an operating system (OS) works. This section is an attempt to explain the theory behind Ramdisk Rescue so that you may understand how it works, what is required, and what to expect.
An operating system consists of many different levels of smaller programmes, some dealing with devices, others dealing with proces scheduling ... and so on. At the core of all this, is a main programme ... the kernel ... which controls all the programmes in a consistent way. The kernel is always architecture dependent (eg. ARM vs i386), and in our case model dependent too (h2200, h4000, hx4700). So, when a machine is booted, the kernel is the first programme loaded and executed. It is told very little about what to do next, but the most important specification is that of the root disk. The root disk is where the OS lives, and usually this is physical device like a hard disk or a flash card. This is where Ramdisk Rescue differs: it uses a root disk which exists in memory! This type of root disk is called an initial ramdisk (initrd) and is basically a compressed filesystem with a mini-OS ready to run.
So how does the kernel and initrd get loaded and executed? On most computers, this is taken care of in two steps. The BIOS (stored in a ROM on the motherboard) looks at the beginning of the machine's boot disk for a small programme called a bootloader. When found, it is loaded and executed and it, in turn, loads the kernel and initrd into memory and then executes the kernel. Ramdisk Rescue however, works differently. In our case, there is already an OS running (WinCE/PocketPC/Windows-Mobile), so we use HaRET to do the job of the bootloader. Once HaRET has loaded the kernel and initrd successfully, execution of the kernel occurs, taking over operation of the handheld from Windows, and using the memory that Windows once used (including volatile information like "My Documents" and touchscreen calibration data,
depending on the version of Windows you have.)
Ramdisk Rescue then starts like real Linux, initialising devices like the LCD and buttons, and presents you with a menu system that you can use to perform many tasks. The primary of these being the installation of Linux on your flash card, so that you can use exactly the technique just described to boot Familiar or Ångström instead of Ramdisk Rescue.
What does this mean for you? You should be aware that there are two kernels being used here. The first is the Ramdisk Rescue kernel, which has been reduced in size and features, but includes the ability to read initial ramdisks and control devices like flash cards. The second is the kernel distributed inside the Familiar image (see below) which has most of the required device drivers built as modules that can be loaded and unloaded as required. Normally you will not need to concern yourself with it, as Ramdisk Rescue automatically extracts this kernel and places it in a convenient place for you. You should be aware, however, that some kernels for particular models (eg. hx4700) distributed by Familiar do not currently support the ability to boot (directly) from a flash card. In the case of the hx4700, a custom card-booting kernel has been prepared, and is presented in the Download Matrix below.
3. Get the required files
-
To install one of the distro + GUI environment combinations to your card using Ramdisk Rescue you need to have a number of files organised in a certain way. The files are sorted into directories depending on their purpose:
-
linux - this directory is root of Ramdisk Rescue installation and will contain the files necessary to boot Linux after Ramdisk Rescue has completed successfully.
-
rescue - (a sub-directory of linux) contains the files necessary to boot Ramdisk Rescue.
-
image - (a sub-directory of rescue) contains distro installation images: either the Familiar installation tarball, or the root filesystem + kernel to be installed.
-
Download Matrix
| Directories | Files for each handheld model | Purpose of file | |||||||
| h2200 | h4000 | h4300 | hx4700 | ||||||
| linux | files for booting Linux *WILL* be installed here when RR is complete | ||||||||
| rescue | files for booting RR *MUST* be downloaded to this directory | ||||||||
|
|
RR initrd | ||||||||
|
|
|
|
|
RR settings | |||||
|
|
|
|
RR kernel | ||||||
|
|
HaRET | ||||||||
|
|
|
|
HaRET settings | ||||||
| image |
images *NEED* to go here. Choose one of - GPE - or - |
||||||||
|
|
|
GPE | |||||||
|
|
|
||||||||
-
Directory Structure
When all the files have been downloaded and organised, the resulting directory structure should look something like one of these pictures:
-
NOTES:
-
The target card being used
MUST HAVE A PARTITION TABLE !
-
There are known issues with some methods of formatting cards smaller than 512MB. If you strike problems with your small card please try another method of formatting your card before using Ramdisk Rescue.
-
This is standard behaviour for all known card-related devices. If you're clever enough to create a partion-less card, think harder before using Ramdisk Rescue.
4. Copy the files to your flash card
-
This can be achieved by using:
-
-
A card reader on a Windows or Linux host.
-
ActiveSync on a Windows host (
see example).
-
Internet Explorer (PocketIE),
Webby Mobile or
Minimo to download the files directly to the card (to be verified).
-
synce (synce-pcp) on a Linux host.
5. Start Ramdisk Rescue
-
Execute haret.
-
-
-
the picture above was made during an early stage of Ramdisk Rescue.
-
wrap-haret is no longer used, just execute haret. The picture will be updated soon.
-
the initrd is no longer named initrd. It is now called ramdisk-rescue-x.y.z-rNNN.rootfs.ext2.gz where "x.y.x" represents the version number, and "-rNNN" specifies the SVN revision it was built from (if it's a development version).
-
kernel (zImage) names now also include machine names and build dates.
-
NOTES:
-
One of the following should then occur:
6. Install Linux
-
Install Linux using Ramdisk Rescue.
| Main Menu | Help Screen | Install Menu |
|
|
|
|
See the complete |
||
7. Start Linux on your handheld!
-
Reboot into WinCE (simply, hard reset the device).
Start File Manager, change to the directory "linux" on your memory card and execute "haret-0.3.8.exe".
The bloodshot penguin should disappear and be replaced by a black screen (possibly, with Linux boot log messages, depending on the kernel configuration), then by the bootsplash.
| HaRET starts | Bloodshot eyes | Blank ~30secs | GPE Splash ~1 min |
|
|
|
|
|
see |
|||
8. Problems
-
If the boot procedure does not work for you, please report the exact procedure that you used to appropriate mailing list:
| Handheld model | Mailing list | Wiki |
| HP iPaq 2210,2213,2215 |
|
HpIpaqH2200 |
| HP iPaq 4150,4350 |
|
HpIpaqH4100 |
| HP iPaq hx4700 |
|
HpIpaqHx4700 |
-
NOTE: To receive help from the members of these lists, send DETAILED INFORMATION about:
-
your problem, and ALL of the events leading up to it ( not including what you had for breakfast
)
-
handheld device model/type
-
card(s) size/type/contents
-
download method (operating system, browser, downloader)
-
version numbers of HaRET and Ramdisk Rescue
-
version of Windows on the handheld in question
... etc. -
RR-syslog.gz is a REALLY GOOD THING TO ATTACH TO YOUR POST.
-
"Detailed" does NOT mean "more words" ... it means MORE FACTS !!!
Users not providing enough detail MAY BE ASKED FOR THE CONTENTS OF A CERTAIN PARAGRAPH ON THIS PAGE.
9. Known bugs
-
-
Application buttons do not work properly on hx4700 or h4000 handhelds.
-
Page scrolling and goto functions in VIEW SYSLOG have problems on the hx4700.
-
No audio on the hx4700.
-
No USBnet on the hx4700.
-
Various problems with cards smaller than 512MB.
-
This is not directly a Ramdisk Rescue bug, but a kernel issue that is currently under development. When the kernels are upgraded to the standard that the h2200 follows, these machines will automatically be supported. It is not seen as a release-stopper as the majority of functions can still be performed using the joypad/navpoint to navigate. The problem is only significant if the joypad/navpoint does not function correctly, or if pagination/goto is required during VIEW SYSLOG.
-
Assumed to be related to the previous bug, or due to an unsupported screen size for less/fbconsole. Will be worked on in development revisions for the next release.
-
Using the Ramdisk Rescue kernel for the hx4700, or Marcus' card-boot kernel, audio does not function. Cause is unknown. There is a delay of a few seconds and an error message when an attempt to play audio is made. Will be worked on in development revisions for the next release.
-
Cause unknown. Possibly related to the audio issue, or a problem with HaRET.
-
Functions such as REMOVE LINUX (and others) have problems trying to resize the FAT16 partition (which contains a FAT32 filesystem?) after the Linux partition has been deleted. The exact cause for this is unknown, however discussions are currently underway with
10. Examples
-
Examples of the use of Ramdisk Rescue:
11. Developer Information
-
The source for Ramdisk Rescue is hosted in
-
For hints on modifying or customising Ramdisk Rescue for your purpose, take a look at the latest:
-
Other information:
-
Familiar download tarball structure example:
-
compressed jffs2 filesystem image for installation to internal FLASH memory.
-
tar.bz2 archive for extraction to an ext2 filesystem.
-
LAB kernel with HTC headers for booting Linux natively.
-
normal kernel suitable for use with HaRET.
-
Familiar tarballs consist of four elements within a single subdirectory:
12. Feedback and appreciation
-
The maintainers of Ramdisk Rescue use their own equipment, time and resources to provide this useful application to the open-source handheld community.
Feedback (
ramdisk-rescue-users@lists.sourceforge.net) of your experience with Ramdisk Rescue provides valuable information on usage and problems, and helps to improve future versions.
Appreciation in the form of donations go toward improving the available resources for testing and development.
-
eg. support for new machines, flash cards, materials and tools.
-
If you have a preference, feel welcome to include a message with your donation specifying what you would like the money to go towards.
-
eg.
-
"I would like you to improve support for using Ramdisk Rescue on machine X using Windows Version Y and a Z GB SD card."
or
"Ramdisk Rescue has brought sunshine to my world. Please take a day off, and spend some time in the
-
Alternative methods of showing your support include:
-
donation of old machines or parts (even damaged ones!)
-
loan of equipment for the purpose of improving support.
-
a postcard from your location.
-
a personal email that does not mention bugs
.
-
It is hoped that donors will be added to the Credits within Ramdisk Rescue, unless instructed otherwise.
Please note that donations of any kind are not expected or required for the author(s) to be glad that you are using Ramdisk Rescue, however, your continued support does help to keep this project alive and ViBrAnT, so feel welcome to consider a
small donation if Ramdisk Rescue has helped you.












