Seite 1 von 1

Need help restoring win10-x64 directory

Verfasst: 27 Dez 2017, 17:39
von ttblum
Hello,

Instead of copying my DVD into /var/lib/opsi/depot/win10-x64/installfiles , I accidentally copied and overwrote the contents of /var/lib/opsi/depot/win10-x64 .

My /var/lib/opsi/depot/win10-x64 directory now looks like this:

adminuser@opsiserver:/var/lib/opsi/depot/win10-x64$ ls
autorun.inf boot bootmgr bootmgr.efi efi setup.exe sources support

How can I restore the needed python scripts and subdirectories?

Re: Need help restoring win10-x64 directory

Verfasst: 28 Dez 2017, 21:11
von ttblum
Hello,

I copied in the files and folders from a previous VM's /var/lib/opsi/depot/win10-x64 to /var/lib/opsi/depot/win10-x64 on this server.

I then issued:
sudo apt update && sudo apt upgrade
sudo opsi-product-updater -i -vv

and got:

Code: Alles auswählen

=================================================================================================
Installing package file '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi' on depot 'opsiserver.mbsnetinc.com'
Getting meta data from package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi'
Creating product in backend
Locking product 'win81-captured' on depot 'opsiserver.mbsnetinc.com'
Failed to set rights for path '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini': [Errno 1] Operation not permitted: '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini'
Checking package dependencies
Running preinst script
Running package script 'preinst'
Unpacking package files
Extracting data from package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi'
Setting product property states in backend
Failed to set rights for path '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini': [Errno 1] Operation not permitted: '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini'
Failed to set rights for path '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini': [Errno 1] Operation not permitted: '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini'
Failed to set rights for path '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini': [Errno 1] Operation not permitted: '/var/lib/opsi/config/depots/opsiserver.mbsnetinc.com.ini'
...
Running postinst script
Running package script 'postinst'
Creating package content file
Setting access rights of client-data files
Traceback:
  File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Depotserver.py", line 428, in installPackage
    raise installingPackageError

     ==>>> Failed to set access rights of client-data files of package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi': Failed to change owner of '/var/lib/opsi/depot/win81-captured/custom' to '-1:992': [Errno 1] Operation not permitted: '/var/lib/opsi/depot/win81-captured/custom'
Traceback:
  File "/usr/bin/opsi-product-updater", line 1194, in <module>
    main()

  File "/usr/bin/opsi-product-updater", line 1187, in main
    opu.processUpdates()

  File "/usr/bin/opsi-product-updater", line 685, in processUpdates
    self.getConfigBackend().depot_installPackage(filename=packageFile, force=True, propertyDefaultValues=propertyDefaultValues, tempDir=self.config.get('tempdir', '/tmp'))

  File "<string>", line 1, in depot_installPackage

  File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
    return meth(**kwargs)

  File "<string>", line 1, in depot_installPackage

  File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
    return meth(**kwargs)

  File "<string>", line 1, in depot_installPackage

  File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
    return meth(**kwargs)

  File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Depotserver.py", line 106, in depot_installPackage
    suppressPackageContentFileGeneration=suppressPackageContentFileGeneration

  File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Depotserver.py", line 431, in installPackage
    raise BackendError(u"Failed to install package '%s' on depot '%s': %s" % (filename, depotId, e))

     ==>>> Backend error: Failed to install package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi' on depot 'opsiserver.mbsnetinc.com': Failed to set access rights of client-data files of package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi': Failed to change owner of '/var/lib/opsi/depot/win81-captured/custom' to '-1:992': [Errno 1] Operation not permitted: '/var/lib/opsi/depot/win81-captured/custom'
ERROR: Backend error: Failed to install package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi' on depot 'opsiserver.mbsnetinc.com': Failed to set access rights of client-data files of package '/var/lib/opsi/repository/win81-captured_4.0.7.1-10.opsi': Failed to change owner of '/var/lib/opsi/depot/win81-captured/custom' to '-1:992': [Errno 1] Operation not permitted: '/var/lib/opsi/depot/win81-captured/custom'


I tried running opsi-set-rights but I'm still getting the above errors.

I'm now seeing the all red letters on the Netboot tab for computers with Windows 10:

Bild

I also notice that the /var/lib/opsi/depot/win10-x64 directory no longer exists, there's only a win10-x64.tmp directory there now.

When I try to run an unattended install I get on the client:

Code: Alles auswählen

Failed to mount '//opsiserver/opsi_depot': Command 'bin/mount -t cifs -o "iocharset=utf8,domain,credentials=/tmp/.cifs-credentials.opsiserver" //opsiserver/opsi_depot /mnt/opsi' failed (32): mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Re: Need help restoring win10-x64 directory

Verfasst: 02 Jan 2018, 11:30
von n.wenselowski
Hi,

what user are you using for the installation?
Looks like the rights on the files are not appropriate.

Try running opsi-setup --set-rights as root and then installing again.

Re: Need help restoring win10-x64 directory

Verfasst: 02 Jan 2018, 16:24
von ttblum
Yes, thank you, 'opsi-product-updater -i -vv' now installs OK.

I've forgotten the difference between 'opsi-set-rights' and 'opsi --set-rights'.

I'm still missing a win10-x64 directory though:

Code: Alles auswählen

adminuser@opsiserver:/var/lib/opsi/depot$ ls win10-x64
ls: cannot access 'win10-x64': No such file or directory

adminuser@opsiserver:/var/lib/opsi/depot$ ls win10-x64.tmp
custom  drivers  installfiles  opsi  winpe  winpe_uefi

adminuser@opsiserver:/var/lib/opsi/depot$ ls
activate-win
centos70
config-win10
config-win81-desktop
config-win-base
debian
debian7
debian8
debian9
hwaudit
hwinvent
javavm
jedit
l-desktop
l-hwaudit
l-jedit
l-opsi-server
l-os-postinst
l-ssh-root-login
l-system-update
l-virtualbox
memtest86
networklocation
opensuse13-2
opensusel42-1
opensusel42-2
opensusel42-3
opsi-client-agent
opsi-clonezilla
opsi-configed
opsi-linux-client-agent
opsi-logviewer
opsi_nfs_share
opsi-script-test
opsi-setup-detector
opsi-set-win-uac
opsi-template
opsi-template-with-admin
opsi-uefi-netboot
opsi-wan-config-off
opsi-wan-config-on
opsi-wim-capture
opsi-wim-delete
opsi-wim-info
opsi-winpe
opsi-winst
redhat70
shutdownwanted
sles11sp4
sles12
sles12sp1
sles12sp2
sles12sp3
swaudit
ubuntu
ubuntu14-04
ubuntu16-04
ubuntu17-04
ubuntu17-10
ucs41
ucs42
win10
win10-captured
win10-x64-captured
win10-x64.tmp
win2008-r2
win2012
win2012-r2
win2016
win7
win7-captured
win7-x64
win7-x64-captured
win81
win81-captured
win81-x64
win81-x64-captured
windomain
windows10-upgrade
wipedisk

Re: Need help restoring win10-x64 directory

Verfasst: 04 Jan 2018, 10:06
von n.wenselowski
Hi,

please check if the .opsi-File of win10-x64 is present in /var/lib/opsi/repository/.
If this is the case try reinstalling with:

Code: Alles auswählen

opsi-package-manager --install /var/lib/opsi/repository/win10-x64...opsi

(Of course you have to give the correct filename but you probably have already thought of that)


Kind regards

Niko