Linux Notes 1
Processor: Intel XScale-IXP425, 133MHz (266MHz with de-underclock)

Architecture: armeb

Memory: 32MB RAM, 8MB Flash


webmin to administer from web
http://www.webmin.com/deb.html
Using the Webmin APT repository

If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system and add the line : deb http://download.webmin.com/download/repository sarge contrib You should also fetch and install my GPG key with which the repository is signed, with the commands : cd /root

wget http://www.webmin.com/jcameron-key.asc

apt-key add jcameron-key.asc You will now be able to install with the commands : apt-get update

apt-get install webmin All dependencies should be resolved automatically.


To change the SSH port number login as root, and edit /etc/ssh/sshd_config

Find the line that says Port 22 and change 22 to any number between 1024->65535 (above 30000 is best) and save the file.

Once done, run:

/etc/init.d/sshd restart

Now start a new SSH session (don’t close your existing one), to make sure that you can get in.


rdiff-backup
http://www.nongnu.org/rdiff-backup/examples.html
rdiff-backup /var/www 192.168.0.51::/home/backup52/www

apt-get install sg3-utils
/usr/bin/sg_start --stop /dev/sda


New Key Layout Ubuntu
sudo dpkg-reconfigure -plow console-setup


ln - make symbolic links

A symbolic link is a "file" pointing to another file.

To make a symbolic link :

ln /original/file /new/link

This makes /original/file and /new/link the same file - edit one and the other will change. The file will not be gone until both /original/file and /new/link are deleted.

You can only do this with files. For folders, you must make a "soft" link.

To make a soft symbolic link :

ln -s /original/file /new/link

Example:

ln -s /usr/local/apache/htdocs /var/www/htdocs

Note that -s makes an "empty" file pointing to the original file/folder. So if you delete the folder a symlink points to, you will be stuck with a dead symlink (just rm it).


What kernal? - - uname -a
Slug52local:~# cat /proc/cpuinfo
Processor : XScale-IXP42x Family rev 1 (v5l)
BogoMIPS : 266.24

apt-get update

I2C Slave is implemented in hardware on an 18F819/819.

mkdir /var/www/ramdisk
mount -o size=2M -t tmpfs tmpfs /var/www/ramdisk


nano /etc/inittab
Change the line:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
to:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now
('-r' means reboot, '-h' means 'halt')

apt-get install lm-sensors
$festival --tts filename.txt


screen /dev/tty.usbserial-FTDMZU2G 115200
http://espeak.sourceforge.net/
To uncompress - tar zxvf bob.tgz - tar xvf bob.tar - tar xvjf bob.tar.bz2 - tar xvzf bob.tar.gz
date
free
df -h
mkdr - - - make directory
dmesg
locate - - - find files


Install from source
apt-get install g++ - - - also gets gcc
apt-get install make
# tar xvzf package.tar.gz (or tar xvjf package.tar.bz2)
# cd package
# ./configure
# make
# make install


upslug2 --image="image_name.bin"


Save Slug contents to .bin
cat /dev/mtdblock* > image.bin

Set Slug for upgrade - hold reset and power switch on
count to 10 - see Ready status flashing between 2 colours

load lighttpd
-------------
apt-get remove apache
apt-get install lighttpd
* Configuration files can be found in /etc/lighttpd. Please read /etc/lighttpd/conf-available/README file.
* The DocumentRoot, which is the directory under which all your HTML files should exist, is set to /var/www.
* CGI scripts are looked for in /usr/lib/cgi-bin, which is where Debian packages will place their scripts.
You can enable cgi module by using command "lighty-enable-mod cgi".
* Log files are placed in /var/log/lighttpd, and will be rotated weekly.
The frequency of rotation can be easily changed by editing /etc/logrotate.d/lighttpd.
* The default directory index is index.html, meaning that requests for a directory /foo/bar/
will give the contents of the file /var/www/foo/bar/index.html if it exists (assuming that /var/www is your DocumentRoot).
* You can enable user directories by using command "lighty-enable-mod userdir"


add PHP scripting
-----------------
apt-get install php5
apt-get install php5-cgi

Edit the file /etc/lighttpd/lighttpd.conf to include ------------------------------------------------------
"mod_fastcgi",

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
)))
--------------------------------------------------------
No need to do lighty etc etc - this is enough for php use - put php scripts in
/var/www/cgi-bin
e.g. phpinfo.php containing just
[?php phpinfo(); ?] - - - replace [ ] with greater-than/less-than tags

Blassic
-------
./configure --disable-graphics --disable-curses

Beep - echo -e "\007" >/dev/tty10

sound
apt-get install madplay
apt-get install alsa-utils
apt-get install alsa-base
madplay soundfile.mp3


espeak flite http://www.digipedia.pl/man/flite.1.html

apt-get install libncurses5-dev


2.5" notebook install sg3-utils ("apt-get install sg3-utils")
then you can spin down the drives when not in use.
This makes then absolutely silent, and saves power too.
Issue the command "sg-start /dev/sda 0" to spin down (or /dev/sdb or sdc, etc..)
put this command in cron to run every half hour or so to re-spin down.

Setting Up Swap Space
Normally, there are only two steps to setting up swap space, creating the partition and adding it to /etc/fstab. A typical fstab entry for a swap partition at /dev/hda6 would look like this: /dev/hda6 swap swap defaults 0 0

The next time you reboot, the initialization scripts will activate it automatically and there's nothing more to be done.

However, if you want to make use of it right away, you'll need to activate it maually. As root, type:
mkswap -f /dev/hda6
swapon /dev/hda6

Swap Files
There might be times when you've run out of swap space and it is not practical to repartition a drive or add a new one. In this case, you can use a regular file in an ordinary partition. All you have to do is create a file of the size you want
dd if=/dev/zero of=/var/my_swap bs=1024 count=131072
and activate it
mkswap -f /var/my_swap
swapon /var/my_swap

This invocation creates a file called my_swap in /var. It is 128 Mb long (128 x 1024 = 131072). Initially, it is filled with zeros. However, mkswap marks it as swap space and swapon tells the kernel to start using it as swap space. When you are done with it,
swapoff /var/my_swap
rm /var/my_swap


/etc/ipkg.conf
src release http://downloads.openwrt.org/kamikaze/7.09/ixp4xx-2.6/packages
src packages http://downloads.openwrt.org/kamikaze/packages/armeb
src nslu2 http://ipkg.nslu2-linux.org/feeds/openwrt/kamikaze-7.09
src optware http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable
dest root /
dest ram /tmp