My FREESCO page | A FREESCO is born | Running from RAM
FREESCO comes with a nice feature that makes the system run completely from RAM. With this option turned on, the system is read from the boot media (floppy/HD/etc.) to RAM during bootup and then the media is unmounted. This has several advantages. First, you do not need to worry about corrupted files if you shut down the machine incorrectly. As the boot media is unmounted after loading the system, no files can be damaged. Secondly, you will get a silent system as there is no disk activity.
Both floppy and HD installations can be configured to run from RAM. With a HD installation you can install packages to your HD and configure them as you like. After enabling the ramdisk and configuring the system to run from RAM, the whole system - including packages - will run from RAM after a reboot! Be aware that you only have 16MB (or less, depending on your total amount of RAM) available in the ramdisk. This means that you must be sure that the packages you install fit in the ramdisk. If your system is too large it will not fit in the ramdisk and errors will be reported during boot. You can use the
free command to find out how large your system is before you try to load it into the ramdisk (reference).
It is possible to create a ramdisk larger than 16MB. Since 038 support for larger ramdisks is built in to FREESCO and at the end of the page I show how to use this feature. For older systems you can follow the instruction in the old forums.
In my opinion there is only one drawback with using this mode: you have to reboot your system in setup mode before you can do any permanent changes to it (reference). Setup mode can only be entered when you physically sit in front of your machine so remote administration is not possible. As the machine has to be rebooted before any changes can be done, this mode is not suitable for those who frequently changes their system. For those that seldom (or never) modify their system I see no reason to not use this mode.
Enabling this mode is very easy. Just log in to your FREESCO as a super user, then start the setup program and select the advanced settings. From the Advanced Settings Menu select setting 10 ('Read disk only once'):
If you have 20MB+ of ram and you have enabled RAM drives. This can run on floppy or hard drive installs as long as the install is LESS than the loaded ramdisk (16MB max). Warning: This feature can only be turned off by starting Freesco in "setup" mode. 10 Enable read disk only once (y/n) [n]?
By default this option is turned off. Type 'y' and press Enter to enable it. After changing the setting you will be back in the menu. Now the ramdisk must be enabled and this is done using setting 19 ('Extra RAM drives'):
If you have 20MB+ RAM. Then a 4,8, or 16MB RAM drive will be installed (depending upon system memory). 19 Do you want to install a ramdrive (y/n) [n]?
Type 'y' to enable the ramdisk, then hit Enter.
191 Manually control the ramdisk size (y/n) [n]?
You are given the option to restrict the size of the ramdisk but you should not use this feature. Just press Enter to continue. You are back in the menu again. Exit from the menu and save your changes. When you are back at the prompt, take a look at the mount points using the
mount command. On a floppy installation it should look something like this:
/dev/ram0 on / type ext2 (rw) /proc on /proc type proc (rw) /dev/fd0 on /mnt/bootdev type umsdos (rw)
Now reboot your FREESCO. During the next boot you should see the text below:
Loading extra ramdisk... Done 16MB /mnt/ram1 Copying fd to the ram drive..... Done Remounting boot device..... Done ram1
The content of the floppy is copied to the ramdisk and then mount point is moved. Now login and issue the
mount command again:
/dev/ram0 on / type ext2 (rw) /proc on /proc type proc (rw) /dev/ram1 on /mnt/bootdev type ext2 (rw)
/mnt/bootdev no longer is mounted on
/dev/fd0 (the floppy) but
/dev/ram1 (the ramdisk). Your system is now running from RAM.
[ Top ]
If you have a large HD install, a 16MB ramdisk might not be enough for your system. If you have a lot of RAM you can add a ramdisk of virtually any size. Here I describe how to add a 64MB ramdisk.
If you have followed the instructions above, your system is now running from RAM. This means that no changes to the configuration are saved. In order to make permanent changes you have to reboot your FREESCO and enter the setup mode. Once in setup mode, disable setting 10 and reboot your system once again. When the system finally comes up, it is running in 'normal' mode and you can start modifying the system.
On the FREESCO download page, there is a zip archive named
addons-038.zip. Among other things, that archive contains a bunch of pre-made ramdisks and a README file. Download and unzip that archive to your computer. To get more detailed information on how to install the ramdisks, go ahead and read the REAME file. In short, what you need to do is to copy the ramdisk you want to use to your floppy, modify a configuration file and modify the setup. So let's do that.
a:\routerdirectory on the floppy.
a:\syslinux.cfgand modify the size of the ramdisk. Replace all occurences of '16384' with the size of your ramdisk. In my case I enter '65536'.
IMPORTANT NOTE: When enabling this option there are NO safety checks. You can enable a 4, 8, 16MB ramdisk which are build into the system, or a custom sized ramdisk IF you have installed one from the addons-0.3.8.zip AND you have followed ALL of directions in the README.txt located in the 'ramdisks' directory of the addons zip file. 192 Ramdisk size in MB (4/8/16/??)) ?
When your FREESCO is booting, you should see information about the new ramdisk beeing used:
Loading extra ramdisk... Done 64MB /mnt/ram1
After booting you can verify that the new ramdisk is in use with the command
[myR00t@Freesco] df Filesystem 1k-blocks Used Available Use% Mounted on /dev/ram0 3096 1993 1103 64% / /dev/fd0 1435 1430 5 100% /mnt/bootdev /dev/ram1 63454 4 60174 0% /mnt/ram1 [myR00t@Freesco]
/dev/ram1 has a size of 63454 blocks, which roughly means 64MB.
[ Top ]
Last modified: Wed Apr 16 20:53:21 CEST 2008