System Layout

From OESF

Revision as of 18:51, 10 July 2007 by OuhYec (Talk | contribs)
Jump to: navigation, search

cheap lortab free samsung ringtones sonyericsson ringtones cyclobenzaprine online punk ringtones free qwest ringtones cheap vicodin qwest ringtones free kyocera ringtones order cyclobenzaprine free jazz ringtones clomid online cheap xanax tracfone ringtones online flexeril free midi ringtones but ultram sony ericsson ringtones free wwe ringtones free real ringtones nokia ringtones free punk ringtones free funny ringtones free cool ringtones free funny ringtones didrex online paxil online online lorazepam free mtv ringtones buy alprazolam pharmacy online online free sony ringtones free free ringtones cheap vigrx free polyphonic ringtones free mp3 ringtones polyphonic ringtones free polyphonic ringtones tramadol online cheap adipex cheap ultracet cheap viagra diazepam online zoloft online cheap vigrx cheap lisinopril cheap pharmacy online celexa online free sprint ringtones cheap clonazepam levitra cheap sildenafil vicodin online xanax cheap valium pharmacy online online sildenafil online cheap wellbutrin order adipex cheap vicodin wwe ringtones free alltel ringtones free verizon ringtones midi ringtones buy prozac but lipitor sony ericsson ringtones free sony ringtones albuterol online cheap viagra carisoprodol online sony ericsson ringtones propecia online nexium lorazepam online cheap flexeril free tracfone ringtones clomid online paxil online free motorola ringtones zyban online qwest ringtones nextel ringtones clonazepam online free music ringtones cheap tramadol soma online buy cyclobenzaprine tramadol online ativan online adipex online nexium online cheap clonazepam cheap hgh cheap tenuate zoloft midi ringtones order alprazolam ambien online free sony ericsson ringtones lisinopril online midi ringtones cheap carisoprodol free nokia ringtones free funny ringtones cheap didrex hgh online cheap didrex free sony ringtones ultram online hgh online ericsson ringtones online fioricet cialis order flexeril carisoprodol online free real ringtones hoodia online cheap ambien cheap lipitor online pharmacy free ringtones zanaflex online phentermine online buy diethylpropion buy soma sprint ringtones cheap diazepam free sharp ringtones hydrocodone online online adipex buy xanax clomid online free tracfone ringtones sharp ringtones online lisinopril cheap wellbutrin kyocera ringtones motorola ringtones cheap phentermine zoloft online carisoprodol online alprazolam online diethylpropion online nokia ringtones cheap albuterol funny ringtones valium online tramadol online online fioricet viagra online free samsung ringtones free mtv ringtones order norco free music ringtones buy ativan tenuate online lipitor online free ericsson ringtones cheap soma ambien online rivotril online online cialis tramadol online ericsson ringtones mtv ringtones cheap propecia free jazz ringtones kyocera ringtones viagra online but norco alltel ringtones zanaflex online free motorola ringtones viagra online lortab online music ringtones mp3 ringtones albuterol online buy clonazepam cheap ambien order xenical real ringtones cheap nexium wellbutrin online free sonyericsson ringtones celexa online diazepam online nextel ringtones cheap soma free mp3 ringtones hoodia free nextel ringtones vicodin online sagem ringtones punk ringtones order propecia mono ringtones polyphonic ringtones levitra online ==Overview==

This document describes the filesystem and directory layout of the Sharp Zaurus 5500, to help everyone understand better what happens when new software is installed, creating user accounts, and so on. It's not really a HOWTO in the sense that it doesn't explain "how to" do anything beyond understand the location of files and directories, and how these correspond to the ROM and RAM on the Z, and why.

Robert P. J. Day <rpjday at mindspring.com>

The memory layout

The memory on the 5500 is divided into ROM: 16M RAM: 64M, further divided into:

memory
32M for processes/buffers/cache
storage: 32M for additional file/directory storage

You can see the current usage of RAM by clicking on "Applications/System Info".

In addition to the above, their might also have additional memory on either a CF card or SD card, whose size and usage would also be displayed by clicking the same icon.

Superficially, all of the above storage/memory corresponds to the following locations or mount points by default:

/ ROM
/home RAM
/mnt/cf CF card
/mnt/card SD card

and in a terminal shell it will correspond with either of:

  1. mount
  2. df

While this is a fair approximation of how memory and directories are associated, it's actually quite a bit more complicated.

The directory structure

Again, simplistically, think of the two major mounts points as:

/ ROM
/home RAM

Initially, this suggests that all of the system directories like /bin, /usr, /etc and so on are read-only, but clearly this is impossible since there would be no way to do basic administration like adding a new user, installing new software and so on.

In fact, modifying system files is supported by the fact that there are about a gazillion links from the alleged system directories and files into corresponding directories and files under /home, which makes them changeable. For example,

/etc -> /home/etc
/tmp -> /home/tmp
/var -> /home/system/var

which makes everything in /etc, /tmp and /var read-write. So far, so good.

In addition, command and software management is also supported by carefully chosen symbolic links. Consider, as an example, just the /usr/bin directory:

/usr/bin -> /home/root/usr/bin

This implies that new software being installed under /usr/bin is actually going into the writable RAM, which is a good thing. But it gets more interesting.

If the contents of /home/root/usr/bin are examined, most of the contents are symbolic links back to files in /usr/bin.rom. This means that both the standard, built-in ROM commands appear to be in /home/root/usr/bin, even though they're really back in the read-only directory /usr/bin.rom. And any new software will go in /home/root/usr/bin. The same situation holds for the other directories /usr/sbin, /usr/lib, /usr/local, /usr/share and /usr/etc, which means there is access the pre-loaded ROM files while still being able to add new files.

This same technique is used for additional installation directories:

/opt/!QtPalmtop -> /home/!QtPalmtop
/opt/Qtopia -> /home/!QtPalmtop

Given the above, it's easy to see that the main software install directories are going to be:

/usr/bin
/usr/local/bin
/opt/{!QtPalmtop,Qtopia}

all of which, due to symbolic links, actually reside under /home somewhere.

The initial system directories

One final point. The initial contents of a number of the critical directories can be found as hidden tar files in the ROM-based /root directory:

  1. cd /root
  2. ls -a
.dev_default.tar
.home_default.tar
.var_default.tar

These tarballs are the initial contents of /dev, /home, and /var (which is really a symlink to /home/system/var). Doing a hard reset reloads all of /dev, /home and /var from these tar files.

When building a custom ROM the initial contents of any of these directories can be changed, by (as root on your Linux box) untar the appropriate tarball, make the changes, then tar it back up. You have to do it as root so that root is the owner of the files in the tarball. (fakeroot should work here, if you're familiar with that.)

Personal tools