perstistence on usb stick directly?

Forum: USB booting
Topic: perstistence on usb stick directly?
started by: migube

Posted by migube on June 23 2007,12:03
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
< >
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 :)


Posted by lucky13 on June 23 2007,14:04
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).
Posted by fodder on June 28 2007,22:05

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.

Posted by migube on Aug. 15 2007,06:34
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.


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