DSL - Memory run only


Forum: DSL Embedded
Topic: DSL - Memory run only
started by: mengesb

Posted by mengesb on June 18 2006,06:33
Ok, now before I get flamed, I've tried to search a bit before posting this request, so I hope that I brought my fire retardant smilies because I feel my stupidity getting to the best of me.

I want to run DSL completely within memory at boot time.  This system will have a /usr partition on a HD, but otherwise I want the system to run in memory.  I want to see a performance difference so I can try and run a gaming server within memory, referencing only user data on HD for local file installations.

So - how in the world do I do this - because it says I can but I just can't find the help documents.

So if you want to point me in the right direction, or link me some threads, just no middle fingers please.  I hope this explains enough:

AMD Athlon system
2gb memory - want to utilize this space only
20gb hd

Posted by kerry on June 18 2006,06:37
The cheat code is> dsl toram
You can press F2 and F3 to see the various cheat codes.

Posted by Zucca on June 18 2006,10:51
But that loads /usr to ram too...

To load everything all to ram except /usr you'll have to start with 'dsl toram' boot options and  (for example) mount your hd to /usr. (Add to /opt/bootlocal.sh?)
In that case you'll have all the DSL /usr contents in ram but all other /usr contents from your hd.

I hope this helps...

Posted by kerry on June 18 2006,11:53
How about> dsl toram usr=hd? ?
There some reference to something like that in the cheat codes.

Posted by tedmoore99 on June 18 2006,16:34
Kerry:
Using the cheat codes modifies the way your data is stored after you shutdown.  For example: mydsl=hda4, home=hda4, etc tells the bootloader that you want those directories stored on hda4.  However the toram cheatcode tells the system to copy the entire system into ram at boot time.  

There is the script "bootlocal.sh" which allows you to have some commands/scripts run at boot time which modifies this.  Entering the command: "mount /dev/hda3 /usr" in bootlocal.sh tells the system to mount the hd as a filesystem at the mount point during boot time.

Enjoy
--Ted

Posted by mengesb on June 18 2006,19:57
Quote (tedmoore99 @ June 18 2006,12:34)
Kerry:
Using the cheat codes modifies the way your data is stored after you shutdown.  For example: mydsl=hda4, home=hda4, etc tells the bootloader that you want those directories stored on hda4.  However the toram cheatcode tells the system to copy the entire system into ram at boot time.  

There is the script "bootlocal.sh" which allows you to have some commands/scripts run at boot time which modifies this.  Entering the command: "mount /dev/hda3 /usr" in bootlocal.sh tells the system to mount the hd as a filesystem at the mount point during boot time.

Enjoy
--Ted

so what I'm looking to do is first install the thing to HD... and use toram boot options?

Basically this will be a server environment; so reboots will be an occurance.

What I've had in previous linux distros was something in the rc.d to auto start my user games in their directories as their users (so they can control the process) - but what I'm trying to do with DSL is to run this system with minimal storage, and brunt of the sys in memory (toram).  During reboots, this data may need to be saved... but I should be able to reference things such as logs to the user's directory.

so here's a more detailed look.  The game will be installed in /etc/hlds (should be completely contained in memory ... approximately 1.6gb), the /usr directory will be in memory, but any /usr/<username> will be on hda?  What this means to me is I'll probably be solinking the game so the user can run the process , and logs will be created on the HD.

At reboot, the data that will need to be saved will be things such as the httpd files (hosting of stats), mysql databases, and logs (which should be already on the hd from what I can think of here)

I hope this helps me a little, but from what I get here, I need to install HD first, then use bootlocal.sh with 'toram' or is that something done at console?

Heh, kinda confused, but I may be looking for a noob installation at some point here.

Posted by tedmoore99 on June 19 2006,00:42
I can only address what I have done and see if it fits for you.  I installed dsl in what is called a "frugal" install.  This writes the boot image to a small partition (200MB).  Then when I boot I have the following line in the grub boot file "menu.lst":
"dsl toram mydsl=hda4 home=hda4 opt=hda4"  This installs the dsl program to ram, mounts the /home/dsl directory to /mnt/hda4/home/dsl, mounts the /opt directory to /mnt/hda4/opt.  I assume you could do whatever you needed to do this way.  dsl has a backup/restore program which can be set up to copy whatever files you want to be backed up.  The "/home/dsl/.filetool.lst" file controls what files get backed up.  Since I mount the whole /home directory from another drive, my .filetool.lst file is empty.
Enjoy
--Ted

Posted by mengesb on June 19 2006,07:01
Quote (tedmoore99 @ June 18 2006,20:42)
I can only address what I have done and see if it fits for you.  I installed dsl in what is called a "frugal" install.  This writes the boot image to a small partition (200MB).  Then when I boot I have the following line in the grub boot file "menu.lst":
"dsl toram mydsl=hda4 home=hda4 opt=hda4"  This installs the dsl program to ram, mounts the /home/dsl directory to /mnt/hda4/home/dsl, mounts the /opt directory to /mnt/hda4/opt.  I assume you could do whatever you needed to do this way.  dsl has a backup/restore program which can be set up to copy whatever files you want to be backed up.  The "/home/dsl/.filetool.lst" file controls what files get backed up.  Since I mount the whole /home directory from another drive, my .filetool.lst file is empty.
Enjoy
--Ted

so in your example, the installation will be completely done to RAM with the exception of pre-defined items... such as in your case
Quote
"dsl toram mydsl=hda4 home=hda4 opt=hda4"
means mydsl, home, and opt will be on the HD, everything else will be loaded to memory.

I would also ask the .filetool.lst - would I have to specify every file, or could I specify a directory, because with a game server installation that would be a lot of files that I would have to develop a script for to update when a file change occurs... that may take me a few days to figure out and parse.

something of a traditional application is this:

mysql server may be required - databases would have to be backed up
httpd server may be required - files backed up
game server installation - needs to be backed up - mounted /usr/game/*

Also just to keep straight, I'd be recommended to use DSL or DSL-N for this type of feature.  I am not in need of any gui interface, but just a console in these instances.  This is the only difficulty that I find regarding this distro.

Posted by pr0f3550r on June 19 2006,18:05
Why have you posted on the embedded forum. It's confusing, I might think you want to use within Windows
Posted by mengesb on June 19 2006,19:13
Quote (pr0f3550r @ June 19 2006,14:05)
Why have you posted on the embedded forum. It's confusing, I might think you want to use within Windows

Actually no - I don't want any windows installation present.  I want only DSL running, but I do have minimum requirements such as : NO X, no GUI, mysqld, httpd, ftpd, enough libs required for running an hlds installation - and at least the core OS and hlds to run completely contained within memory.  Files that will have to be saved will be the mysql databases, webserver files (which httpd process can run from memory, just grabbing the web directory from hda) and likewise for ftp files.  the hlds installation will also have to be backed up becaues the server files do update.  user customizations will be saved on HD, so any additional files that users add to the default game installation will be HD based - my only performance leak in this task.

I posted here, because it is more or less embedded, running from system ram, not a usb drive.  Also I wanted to see if it was feesable to run the 50mb version first instead of DSL-N, if I don't have to use the memory, then I'd rather not jumble up the space.

Posted by cbagger01 on June 20 2006,03:40
If I were to try, I would choose to boot with "toram" and a persistant /opt directory on the hard drive.  Then I would install the persistant files to the /opt directory instead of to /usr

You could boot to console text mode with:

dsl 2 toram opt=hda1

where your replace hda1 with the location on your hard drive for your persistant opt directory.

If you use the .filetool.lst for backup/restore of files that are normally loaded into the RAMDISK, you CAN specify a directory name and all files and subdirectories will be automatically saved during a controlled shutdown of the OS.  You can also execute the backup process manually at certain intervals without shutting down the OS, if you prefer.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.