My FREESCO page | A FREESCO is born | Installing packages
This tutorial describes how to extend the functionality of a floppy based FREESCO by installing packages. While this feature is mostly used when running FREESCO from a HD, it can still be applied to a floppy installation. With a floppy installation, packages are loaded into a ramdisk. The size of the ramdisk limit the amount/size of packages you can install. Out of the box FREESCO can have a ramdisk with a maximum size of 16MB. To use the ramdisk feature you need to have at least 20MB RAM or the ramdisk will not be created. You enable the ramdisk by doing changes in the setup program and then reboot. The ramdisk must be enabled before packages can be installed on a floppy based FREESCO installation.
Packages are installed with the
pkg command which takes an URL as parameter. The URL tells the command where to download the package from. Most of the available packages can be downloaded and installed from FREESCOsoft, the FREESCO software library. When installing a package on a HD, the
pkg command is issued once. After installation, the package will remain on your HD even if you reboot your FREESCO. When installing a package to RAM, things are a bit different. As the package lives in RAM, it is removed from your machine when you shut it down. This means that you have to issue the
pkg command after each boot to download and re-install the package. If several FREESCO users were using this approach, the traffic from FREESCOsoft and its mirrors could be rather heavy. To reduce the traffic from the these sites, it is not possible to use them when installing packages to RAM. Instead, you have to download the package to your computer and then upload it to a web/ftp server that you have access to. When you finally issue the
pkg command on your FREESCO, you do not use the URL to any of the FREESCOsoft sites. Instead you use the URL to the server that you uploaded the package to. Usually your ISP provide some web/ftp space for you that you can use. Another option is to use e.g. http://www.freewebspace.net or http://www.free-webhosts.com to find free web space. You can also use a server inside your LAN if you want. The process look something like this:
+-------------+ +---------+ +----------------+ +---------+ | FREESCOsoft +-- 1. -->| Your PC +-- 2. -->| Web/FTP server +-- 3. -->| FREESCO | +-------------+ +---------+ +----------------+ +---------+
This page describes how to enable the ramdisk, how to find and download the package you want to install and how to install the package on your FREESCO. As a final step you can automatize the installation.
One thing to remember when installing packages to RAM is that the package will be lost in the next reboot (as it lives in RAM). Hence it is a bad idea to install packages which require extensive configuration as you will have to re-install and re-configure the package after each boot. In this tutorial I use a package called Top, used for list running processes. The package is suitable for installing to RAM as it requires little configuration and user interaction during installation.
Enabling the ramdisk is done with the setup program. Log in to your FREESCO as a super user and start the setup program. Select the Advanced Settings and from the Advanced Settings Menu select setting 19 (Extra ram drives):
If you have 20MB+ of RAM. Then a 4, 8, or 16MB RAM drive will be installed (depending upon system memory). 19 Install a RAM drive (y/n) [n]?
Enter a "y" to enable the ramdisk and hit Enter.
191 Manually control the ramdisk size (y/n) [n]?
Here you have the option to adjust the size of the ramdisk. Leave this setting as suggested and press Enter. Now you are back in the Advanced Settings Menu. Exit from the menu and save your changes. Reboot your FREESCO and when booting you should see information that a ramdisk is created (the size might vary between 4 and 16 MB depending on the amount of RAM you have in your machine):
Loading extra ramdisk.... Done 16MB /mnt/ram1
[ Top ]
Now it is time to download the package you want to install. The best way to find packages is to go to FREESCOsoft which hosts most available packages. From the main page of this site, select the mirror closest to your location. You are redirected to the mirror site and when the start page has loaded, you can start browsing and/or searching for packages. NB! Not all FREESCOsoft mirrors are searchable, so the search function may or may not work!
After browsing/searching and finally finding the Top-package, the information page for the package is shown. The page contains a link that should be used when installing the package. A FREESCO package is really two files: a script file (the "installer") and a compressed archive (the "application"). You must download both these file to your computer. The link points to the installer, so right click the link to save the file on your hard disk. Make sure you don't save it as a text document! To download the compressed archive, the easiest way is probably to left-click the link. The installation script will then open up in the browser. Now add ".tgz" to the URL and hit return. Now the browser should start downloading the application to your hard disk.
When browsing for packages, it is also a good idea to check the package release section of the FREESCO forums. In addition to that, Lightning and Dingetje have comprehensive package libraries.
The next step is to upload the package files to the server you want to use. Remember to upload both files to a public accessible directory on the server. Once the files are uploaded to your server, verify that they are accessible by entering their addresses in your browser. You should be able to view the install script and download the package from your server. If you fail to do this, something is wrong and you will not be able to install the package on your FREESCO. Please resolve this before continuing.
[ Top ]
Once you have uploaded the package to the server, you can install it to your FREESCO. This is done with the
pkg -r http://address.to.your/web/server/top_1.2_tiger
If you enter the correct address you should see some information from the installation program:
Installing... top_1.2_tiger top - There is no entries in inetd.conf by default. Checking versions... Pv0.3.0 Checking required temp space... Ok Checking required disk space... Ok Checking dependencies... Ok Checking if package is installed... Ok Checking for existing libraries... Ok http://bakskuru.se/fredrik/freesco/tmp/top_1.2_tiger.tgz (128K) /tmp/2512~/top_1.2_tiger [########################] 128K | 774.56K/s 131526 bytes transferred in 0.17 sec (771.14k/sec) Unpacking top_1.2_tiger.tgz .. Done Installing inetd Successfully installed... top_1.2_tiger [myR00t@Freesco]
By now the package is installed into your ramdisk and ready to run. Try it out by typing
and a list simliar to the one below should be presented to you:
8:32pm up 7 min, 1 user, load average: 0.00, 0.01, 0.00 16 processes: 15 sleeping, 1 running, 0 zombie, 0 stopped CPU states: 0.3% user, 3.8% system, 0.0% nice, 95.7% idle Mem: 29868K av, 17704K used, 12164K free, 3440K shrd, 11812K buff Swap: 0K av, 0K used, 0K free 1468K cached PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 1 myR00t 0 0 364 364 264 S 0 0.0 1.2 0:03 init 2 myR00t 0 0 0 0 0 SW 0 0.0 0.0 0:00 kflushd 3 myR00t -12 -12 0 0 0 SW< 0 0.0 0.0 0:00 kswapd 2280 myR00t 0 0 244 244 172 S 0 0.0 0.8 0:00 agetty 2281 myR00t 0 0 244 244 172 S 0 0.0 0.8 0:00 agetty 2282 myR00t 2 0 708 708 388 S 0 0.0 2.3 0:00 dropbear 272 myR00t 0 0 344 344 252 S 0 0.0 1.1 0:00 syslogd 407 myR00t 0 0 340 340 216 S 0 0.0 1.1 0:00 klogd 2266 myR00t 10 10 312 312 220 S N 0 0.0 1.0 0:00 logrotate 2283 myR00t 0 0 300 300 192 S 0 0.0 1.0 0:00 ile 893 myR00t 0 0 284 284 208 S 0 0.0 0.9 0:00 update 2313 myR00t 18 0 292 292 204 S 0 0.0 0.9 0:00 sh 2709 myR00t 18 0 584 584 392 R 0 0.0 1.9 0:00 top 1986 myR00t 0 0 392 392 304 S 0 0.0 1.3 0:00 dropbear 941 myR00t 0 0 312 312 232 S 0 0.0 1.0 0:00 dhcpcd 2050 nobody 0 0 404 404 248 S 0 0.0 1.3 0:00 dnsmasq
To get back to the prompt, just hit the 'q' key.
[ Top ]
As packages installed in the ramdisk are lost when you reboot your machine, you need to install them each time you restart your FREESCO. This installation can be done automatically by adding the installation command to one of the setup files of your FREESCO. When you start your FREESCO, a file named
rc_user is run once. Hence this is good place to put the install command.
Be careful when using this approach to install packages. If the package requires you to input data during the installation, your FREESCO will stall during the boot, awaiting your input. As the Top package doesn't require any user input, it is perfectly suitable for installing this way.
Log in to your FREESCO as super user and open the
rc_user file in an editor:
In the file you will see a
start)-section. On the line before the equal sign, add the install command (the same you used when you installed the package earlier) so the section look like this:
start) echo -s "Starting rc_user..." pkg -r http://address.to.your/web/server/top_1.2_tiger = ;;
Press F10 to save your changes and reboot your FREESCO. The next time FREESCO boots, it will start the installation of the package automatically. To verify the package installs as expected, reboot your FREESCO. During boot, the Top package should be installed autmatically. Once the system has booted, verify that the package is installed by typing
[root@Freesco] pkg -l
at the prompt. This lists all installed packages and you should see
top_1.2_tiger in the list.
[ Top ]
Last modified: Wed Apr 16 20:51:28 CEST 2008