JohnS
Group: Members
Posts: 23
Joined: Dec. 2004 |
|
Posted: Dec. 31 2004,16:20 |
|
Hi guys, I've been experimenting with something similar, I have some large apps that take up way more memory than I have when installed in ramdrive, what I have been doing is putting them, fully expanded, on the pendrive and run them directly from the pendrive.
What I did was partition the pendrive into two partitions (using sfdisk), one a 64 meg type 6 (FAT16) partition which was loaded with the usual menu item install to pendrive. The other partition has the rest and is set to be an ext2 type (which is the default for sfdisk). The second partition was formatted under DSL with mk2fs (no special options). To use this under DSL mount it then chmod it to everybody, put these in bootlocal.sh so it happens automatically:
mount /dev/sda2 chmod 777 /mnt/sda2
I then put the big apps on sda2. I do this by booting DSL without toram (so I have as much ramdisk as possible), loading the app to wherever it wants to go, then copying it over to /mnt/sda2. Depending on the app and how you invoke it you might need to add where its now located to your path in the .bashrc file or any other configuration files. If the app has its own configuration files which specify where to put files, read them etc. these will need to be modified to point to /mnt/sda2 as well.
You can also put any .dsl files you need loaded at boot time in sda2 as well (for example I put the ALSA drivers there) . When you boot just make sure you specidy sda2 as the mydsl drive and the restore drive as well, then it will backup and restore there and load any .dsl files as well. When you go to run the apps on sda2 they run directly off the pendrive, no expansion to ramdisk first.
The only problem you might have is if the app creates temp files that it reads and writes very frequently, this could cause prolems with flashdrives. If this is the case, the best thing to do is configure the app so it puts the temp files on the ramdisk (if you have room for them there). Most apps give you the option of where to put temp files.
If your pendrive is USB 2.0 and the computer supports 2.0 you should not see hardly any degradation in performance from running directly off the pen drive. If you just have USB 1.1 you might see some performance slip, it depends on the app.
I know that doesn't help olliraa too much, yours is going to be more difficult. You COULD copy the whole thing to the pendrive and use syslinux to make it bootable (I'm not quite sure how to do that, but it should be possible), BUT you then wind up with the writing a lot to the pendrive issue, flash memory has a limited number of times you can WRITE to it, you can easily exceed this for certain files if the flash is just used as a direct replacement for a hard drive. The usual solution is the load compressed image from flash to ramdisk and run off there.
Not everything needs to be in ramdrive though. My GUESS is that the swap file and var need to be in ram and probably everything else could go on the pendrive. To do that you would have to do a remaster so just the parts you want in ram get in the compressed image and everything else just gets coppied over onto the pendrive. Thats something I haven't done yet so I can't help with how to do that. Thats going to take some experts. I hope that gives a hint as to what needs to be done for this.
John S.
|