So recently, I just created a persistent install of Crunchbang 9.04 to my flashdrive. And of course since it's based on the LiveCD, the /etc/fstab already has /tmp set up in a tmpfs, because there's no swap to speak of.
Flash drives are usually only good for about 100,000 writes per sector, and since this thing is running an entire OS, I'm worried I might go through that rather quickly. I noticed that when watching youtube videos, firefox was committing ~100-150MB to the drive, only to delete it upon closure. I'm sure firefox isn't the only program to dump to the filesystem, so I was wondering what else you might recommend I could add to a tmpfs to save on writes?
Also, if I were to commit something in /var to a tmpfs, I would need to set up a crontab to occasionally dump to the file system, right? Is there an easy way like /etc/init.d to do something on shutdown?
Sorry if any of these questions don't make sense, I'm kind of a linux newbie. Thanks for any help in advance!
[editline]02:50AM[/editline]
Oh, and on a completely unrelated note, everytime I shut down, it pops out the CD tray. Anybody have an idea of how to stop that?
[editline]02:58AM[/editline]
Also, given that I plan on hauling this thing around to multiple computers, is there a good way of scaling the maximum amount of usable RAM a tmpfs can use? Sorry, I'm done for tonight.
Instead of running the liveCD, create an actual installation on the USB drive (or even better, an external harddrive)
It is an actual installation, more or less. It keeps a copy of the original LiveCD, and a file in the root directory of the FAT32 partition that contains an ext3 partition of all the changes I make to it. That way I can still boot without the changes, if need be. I mean apart from that, the only real difference between persistent and a normal install is that there's no swap and by default, /tmp is mounted as a tmpfs.
[QUOTE=AesoSpadez;20359134]Also, given that I plan on hauling this thing around to multiple computers, is there a good way of scaling the maximum amount of usable RAM a tmpfs can use? Sorry, I'm done for tonight.[/QUOTE]
You can put "size=[i]n[/i]" in the options column in /etc/fstab, with either an absolute size (in bytes) or a percentage of the system's RAM (with a '%' character after the number). The default is 50%, so it'll adapt to different machines already, without needing to change anything.
Sorry, you need to Log In to post a reply to this thread.