OpieTipsAndTricks

= Moving /root to an SD or CF card = Due to the way Linux handles symbolic links (aka as symlinks) it doesn't really make any difference to common applications if they are accessing a symlink (be it a file or a directory) or a real file. We can use this ability to move single files or whole directories to another place in the filesystem. However, we have to make sure that we provide a symlink from the new location of the file or directory back to the old one. This is done using the ln command (ln as in link).

If we want to move our /root directory (which contains all of Opies preferences) to an SD or CF card we have to do so litteraly with the mv command (mv as in move).

Moving /root to an SD card: mv /root /mnt/card

Moving /root to an CF card: mv /root /mnt/cf

Now we have to create a new symlink pointing from our relocated /root directory back to its original place.

Linking from an SD card: ln -s /mnt/card/root /root

Linking from an CF card: ln -s /mnt/cf/root /root

That's it! Reboot your PDA and grin smugly.

= Restoring a relocated /root directory after a reinstall = We have to move the old root directory out of our way first. mv /root /root.orig

Now we link our old directory back.

Linking from an SD card: ln -s /mnt/card/root /root

Linking from an CF card: ln -s /mnt/cf/root /root

Easy huh?

= Problems unmounting your CF card =

You probably need to kill the processes accessing the CF card fuser -k

For example, on my SL5500 with OZ 3.2, I would use: fuser -k /mnt/cf

Who said it? Read below...

Transcript from #handhelds.org on 2004-09-15 around 16:25 EST:

 grr I can't umount my cf card - it keeps saying it's busy. Is there anyway to figure out what's keeping it busy? a mirror ? fuser -mvvv  Servo888: If you install lsof, that's the easiest thing... There's another way of doing it as well, but I can't remember off-hand  koen: ok thanks - looks like kdeinit is accessing it Servo888: fuser -k  kills it :)  koen: oh man that's SO cool! I've always had problems 	with kde and unmounting You can use that on any file, the -m switch is used for mountpoints