Run program on another disk

I’ve tried a lot of options with no success. I didn’t even get far enough to see the java failure. My hdd has zulu java installed from Azul. The sdd has openjdk installed, which I believe is the basis of both zulu and Oracle. But I didn’t get that far yet. I tried to write a script to run the program from the ssd that is installed on the hdd.

#!/bin/bash
# run program from hdd
#/run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/home/prexy/program/program.sh


/run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/prexy/Desktop/program.sh



I’ve commented out the first version of this script that I tried. When it failed, I located the desktop file on the hdd that ran the program and I adjusted. It also failed. Each variation I made failed with the same message that the file didn’t exist. The file does exist because I can boot to the ssd, click on the desktop icon and it runs. Some variations I tried by drilling down to the actual program, not the desktop link, also without success. Here are just some of the variations I tried:

prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/prexy/sda7/home/prexy/program/program.sh: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/prexy/sda6/home/prexy/program/program.sh: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/sda6/home/prexy/program/program.sh: No such file or directory
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/sda6/home/prexy/program/program: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 5: /run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/prexy/Desktop/program: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 5: /run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/prexy/Desktop/program.sh: No such file or directory



The chmod you see is when I change a line in the script, I ran chmod again. As I said, I tried lots of variations of the script which I did not keep. Whenever I boot, I get a message to authorize the mount of a partition on the hdd. I varied sdaX to try to find the right one. None worked.Here is fstab on the ssd:

UUID=795d9510-a37b-422b-bfca-856cc4a68170  /                       btrfs  defaults                      0  0UUID=795d9510-a37b-422b-bfca-856cc4a68170  /var                    btrfs  subvol=/@/var                 0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /root                   btrfs  subvol=/@/root                0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /home                   btrfs  subvol=/@/home                0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=286def93-0f1c-44fb-8f95-31d65378248b  swap                    swap   defaults                      0  0
UUID=795d9510-a37b-422b-bfca-856cc4a68170  /.snapshots             btrfs  subvol=/@/.snapshots          0  0



Here is fstab on the hdd where the program resides:

UUID=286def93-0f1c-44fb-8f95-31d65378248b swap                 swap       defaults              0 0UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /                    btrfs      defaults              0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /boot/grub2/i386-pc  btrfs      subvol=@/boot/grub2/i386-pc 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /boot/grub2/x86_64-efi btrfs      subvol=@/boot/grub2/x86_64-efi 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /opt                 btrfs      subvol=@/opt          0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /srv                 btrfs      subvol=@/srv          0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /tmp                 btrfs      subvol=@/tmp          0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /usr/local           btrfs      subvol=@/usr/local    0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/cache           btrfs      subvol=@/var/cache    0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/crash           btrfs      subvol=@/var/crash    0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/libvirt/images btrfs      subvol=@/var/lib/libvirt/images 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/machines    btrfs      subvol=@/var/lib/machines 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/mailman     btrfs      subvol=@/var/lib/mailman 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/mariadb     btrfs      subvol=@/var/lib/mariadb 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/mysql       btrfs      subvol=@/var/lib/mysql 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/named       btrfs      subvol=@/var/lib/named 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/lib/pgsql       btrfs      subvol=@/var/lib/pgsql 0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/log             btrfs      subvol=@/var/log      0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/opt             btrfs      subvol=@/var/opt      0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/spool           btrfs      subvol=@/var/spool    0 0
UUID=50d1254f-cc8f-44dc-9a07-6d9df2324115 /var/tmp             btrfs      subvol=@/var/tmp      0 0
UUID=c9554cbb-f155-4e5b-aef5-51987573e0b1 /home                xfs        defaults              1 2



I hope someone can spot what I’m doing wrong.