USB booting :: perstistence on usb stick directly?



hi guys,


first time user, hence maybe dumb question, but cold not find a solution on google...

I've succesfully installed dls embedded on an USB key, & I can boot from it.

I'd like to have the /opt & /home dirs persistent on the /dev/sda1.
I tried
http://www.damnsmalllinux.org/wiki/index.php/Persistence
to mount /mnt/sda1 & copying the files, but I have to be root to make a directory in it.
dsl user with chown isn't working either.

I tried to reboot with the cheat code dsl home=sda1 without success.

Any idea how to get those everytime dsl boots (without cheat code as well) ?

At the moment I'm stuck :)

thx
migube

Presumably, you're already booting from sda1 (that's the first mount point assigned to USB devices by hotplug). You'll need at least a second partition for a persistent /home. The partition holding the DSL ISO needs only to be 50-55 MB (a little safety room in the rare case things go a little over 50). The rest can be set on another partition for /home (and /opt).
migube,

It's not a dumb question at all, try this:

If you are formatting as USB-HDD and have a large enough USB key, then you can just use the backup tool (right-click on the desktop, System, Backup/Restore) and save to sda1.  Then use the cheatcode: restore=sda1

If you are formatting as USB-ZIP then a second partition (sda2) was already created for you.  Do the same as above except backup to sda2 and use the cheatcode: restore=sda2

You can also add the cheatcode: mydsl=sdaX (where X is the appropriate partition) to make your downloaded extensions persistent. (Just be sure to download them to the appropriate partition instead of /tmp)

A couple thoughts:
Keep in mind that this process is more like booting off a LiveCD and using the USB key for backup storage than a Frugal install.  I.E., when you boot DSL, your /opt/ and /home/ dirs will be copied back into memory (to the RAM disk) and when you shut the PC down, whatever changes you made in your /ramdisk/home/dsl/ dir will be automatically backed up to the USB key and will over-write the old backup file.

My understanding is that using the home=sdaX cheatcode will actually create your home dir on the USB key - in that case it does not have to be copied into memory at each boot, but accessing it will be slower (based on the speed of your USB key) and will also decrease the life of your USB key faster due to constant read/write cycles.

My preference is to use the following cheatcodes: dsl toram restore=sda2 mydsl=sda2
That way my USB key is only accessed on boot up and shut down and my computer runs entirely from memory - I.E. FAST!
However, you need to have enough RAM for this to work.  :)
A secondary benefit to doing it this way is if you make a change to your system that didn't work or you don't like, just make sure that all drives are unmounted (using the mount tool at the bottom right hand corner of your screen) and then turn the power off to the computer (don't do a shutdown sequence.)  Then when you boot back up, you are back to where you started, without the changes that you don't like because your backup file was never changed.

thx guys, will try that & update the wiki with my findings :)

ps: for the flash wear-out, is there no special Filesystem like jffs2 or others that help with this?
Remember reading things on openwrt forums, but can't find it back.

thx


original here.