WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Opsi Linux Client  (Read 2569 times)

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Opsi Linux Client
« on: May 17, 2022, 02:52:33 AM »
Hi There,

i am trying to install opsi on TinyCore 13.x/x86_64
Documentation (https://download.uib.de/4.2/documentation/opsi-linux-client-manual-en.pdf)

So When i run the installer.sh i get the following:

Code: [Select]
sudo bash opsi-linux-client-agent-installer.sh
Starting opsi linux client agent installer 4.2.0.22-1, please wait ...
tar: invalid magic
tar: short read
opsi-linux-client-agent-installer.sh: line 8: cd: opsi-linux-client-agent: File or directory not found
opsi-linux-client-agent-installer.sh: line 9: ./oca-installation-helper: File or directory not found

And i can't see anything in the Installer because it's encoded :/

Anyone has an Idea ?

Thank you very much

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Opsi Linux Client
« Reply #1 on: May 17, 2022, 03:35:04 AM »
The problem is "tar: short read" - most likely your download is corrupted or you ran out of ram.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Opsi Linux Client
« Reply #2 on: May 17, 2022, 04:51:31 AM »
The script de-compress the file using busybox tar command, that you have to specify what compression the tar use.

You can try modify the script to add the correct command line argument to busybox tar.

Or you can try to add install gnu tar command, that automatically getting the correct compression, via the magic.

See the following link to see what command line argument to busybox you need to add.
https://stackoverflow.com/questions/66017619/tarinvalid-magic-tarshort-read
« Last Edit: May 17, 2022, 04:54:29 AM by patrikg »

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Opsi Linux Client
« Reply #3 on: May 17, 2022, 10:32:11 AM »
Hi Juanito,

The problem is "tar: short read" - most likely your download is corrupted or you ran out of ram.

I just installed the same File on an Ubuntu VM with the same Hardware as my TinyCore Machine an it started without problems

Thats mean that the File is not corrupted and the Ram 4GB is enough

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Opsi Linux Client
« Reply #4 on: May 17, 2022, 10:35:44 AM »
The script de-compress the file using busybox tar command, that you have to specify what compression the tar use.

You can try modify the script to add the correct command line argument to busybox tar.

Or you can try to add install gnu tar command, that automatically getting the correct compression, via the magic.

See the following link to see what command line argument to busybox you need to add.
https://stackoverflow.com/questions/66017619/tarinvalid-magic-tarshort-read

Hi patrikg,

i cant edit the file because it's an encoded installer.

you can try yourself and tell me if i am missing something. (https://easyupload.io/lubh3s)


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: Opsi Linux Client
« Reply #5 on: May 17, 2022, 01:19:19 PM »
Hi Rabie
... i cant edit the file because it's an encoded installer. ...
Sure you can. It's just a script.

Run this command to see the beginning of the script:
Code: [Select]
tc@E310:~$ head -c 200 Downloads/opsi-linux-client-agent-installer.shThe echo command in line 7:
Code: [Select]
echo "QlpoOTechoes 125 megabytes of base64 encoded data

This is the end of the script:
Code: [Select]
tc@E310:~$ tail -c 115 Downloads/opsi-linux-client-agent-installer.sh
JtpZg=" | base64 -d | tar xj
cd opsi-linux-client-agent
./oca-installation-helper $@
 ----- Snip -----
The result of the echo command is piped through  base64  and then piped through  tar  xj.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Opsi Linux Client
« Reply #6 on: May 17, 2022, 02:06:23 PM »
You can test to extract the bzip2 tar file of the script by doing this juggling.
Kind like take the steps for your self.


Code: (bash) [Select]
dd ibs=194 skip=1 if=opsi-linux-client-agent-installer.sh of=installer
truncate -s -109 installer
base64 -d installer > installer.tar
tar -xvjf installer.tar

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: Opsi Linux Client
« Reply #7 on: May 18, 2022, 04:47:41 AM »
Hi patrikg,
i just extracted the file like you said and got those files:
Code: [Select]
total 55728
drwxr-xr-x 3 root root       160 Jan  1 09:52 .
drwxr-sr-x 8 tc   staff      960 Jan  1 09:52 ..
drwxr-xr-x 9 root root       240 Jan  1 09:56 files
-rw-r--r-- 1 root root       991 Apr 21  2022 INSTALLATION.md
-rwxr-xr-x 1 root root  26394984 Apr 21  2022 oca-installation-helper
-rwxr-xr-x 1 root root  30629944 Apr 21  2022 opsi-deploy-client-agent
-rw-r--r-- 1 root root       193 Apr 21  2022 service_setup.sh
-rw-r--r-- 1 root root     21951 Apr 21  2022 setup.opsiscript

i tried to run "service_setup.sh" but then got:
Code: [Select]
Starting oca-installation-helper, please wait...
Fontconfig error: Cannot load default config file
service_setup.sh: line 9: 19835 memory access error ./oca-installation-helper

but i don't realy know how to act now to install the client  ;D


Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Opsi Linux Client
« Reply #8 on: May 18, 2022, 01:16:55 PM »
Have you tried to read the INSTALLATION.md file.
That says you can type
Code: (bash) [Select]
Please run `./opsi-deploy-client-agent --help` to see the supported options.

### As normal user with or without X
chmod -R ugo+x opsi-linux-client-agent/
zudo opsi-linux-client-agent/oca-installation-helper

Change z to s.