USB booting :: Permanent java apps on a USB stick



You should add opt=/dev/sdb2 to your boot line to have opt there too :)
If you're using persistent dirs, you should use .tar.gz extensions for /opt as they will be permanent (or else use the mydsl autoload mechanism, or copy them over if you're using uci's).  Having said that, afaik you should avoid using a persistent home, since that is usually where many writes occur.
I think I have done it. I feel like I'm on top of the Everest... After all those trials. Many thanks for the answers posted above. But there are still a few irritants. Here is what I did:

1- After installing Damnsmall on the USB drive (I changed for the 4.2.5 version), I booted with the CD with the following codes:
dsl fromhd=/dev/sdb2 mydsl=sdb2 keyb=cf
so when I install jre1_5_0 it goes directly on the mydsl directory of the stick.

2- I enabled APT and changed the repository for:
http://mirrors.usc.edu/pub/linux/distributions/ debian oldstable main contrib non-free
where the GRASS GIS and QGIS apps are available.

3- sudo apt-get update

4- sudo apt-get install grass grass-doc qgis. That command will put all the used deb files in /var/cache/apt/archives.

5- Copy all the .deb files of /var/cache/apt/archives in /mnt/sdb2/mydsl so they become persistant.

6- sudo beaver /opt/bootlocal.sh for editing. I added the command lines dpkg -i /mnt/sdb2/mydsl/debpackage.deb for all the deb files available in the directory. There were 41 of them...

7- Install jre1_5_0.tar.gz from the MyDSL Extension Tool.

8- Download OJ_ViatorisLinuxInstaller.jar in /home/dsl/softwares.

9- In a shell, go to /home/dsl/softwares and type:
PATH="$PATH:/mnt/sdb2/opt/jre1_5_0/bin" (I booted with mydsl=sdb2).

10- Install the jar file with: java -jar OJ_ViatorisLinuxInstaller.jar. To make the installation persistent, I chose the /mnt/sdb2/OpenJUMP directory.

11- In a shell, I typed:

sudo mkdir /mnt/sdb2/opt
sudo cp -arv /ramdisk/opt /mnt/sdb2/opt
sudo mkdir /mnt/sdb2/home
sudo cp -arv /ramdisk/home/dsl /mnt/sdb2/home

12- Setting up sdb2 for Backup/Restore in the DSL Control panel.

13- Reboot with the following codes:

fromhd=/dev/sdb2
home=/dev/sdb2
opt=/dev/sdb2
restore=sdb2
mydsl=sdb2
keyb=cf

That's it! I got an error message, though after trying to open up QGIS:

qgis: error while loading shared libraries: libXrandr.so.2: cannot open shared object file: No such file or directory.

I don't know what that means, but I'll try to find out. Also, I am not able to make: PATH="$PATH:/mnt/sdb2/opt/jre1_5_0/bin" persistent, so I have to type the line everytime I want to use my java apps. I wrote the line in bootlocal.sh, but it didn't work.

I tried to convert the .deb files with the deb2dsl script, but I got a deb file again. I think the compression worked, but I don't know why I still got debs. What if I rename the extension for dsl?

Many thanks again.

Chamane :laugh:

To make the PATH change persistent, modify /etc/bashrc and /etc/profile (and add them to .filetool.lst)

QGIS: hmm. libXrandr.so.2 is in /usr/lib. What do you get from ldd (on qgis)?

I think libXrandr is not included in DSL... iirc it can be found in gnu-utils (mydsl)

For PATH, you could also just drop in symlinks to /opt/bin instead
or just modify ~/.bash_profile ~/.bashrc if you're just using 1 user.. so that it will avoid extra backup/restore files

Also, since it seems you decided to use persistent dirs (despite my warning), there should be no need to use the backup/restore feature.

Next Page...
original here.