Code: Alles auswählen
logger.notice("output type: {0}".format(type(output)))
for line in output:
logger.notice("{0}".format(line))
Mathias
Code: Alles auswählen
logger.notice("output type: {0}".format(type(output)))
for line in output:
logger.notice("{0}".format(line))
Code: Alles auswählen
def uefiGetActBootEntry():
bootManager = which("efibootmgr")
output = execute("{0} -v".format(bootManager))
logger.notice("output type: {0}".format(type(output)))
for line in output:
logger.notice("{0}".format(line))
firstEntry = getBootCurrent(output)[0]
if firstEntry:
info = getInfoFromLine(firstEntry, output)
return info
else:
return None
Code: Alles auswählen
[7] [Mai 25 16:58:49] Exit code: 0 (Posix.py|1010)
[7] [Mai 25 16:58:49] Command 'efibootmgr' found at: '/bin/efibootmgr' (Posix.py|867)
[6] [Mai 25 16:58:49] Executing: /bin/efibootmgr -v (Posix.py|926)
[6] [Mai 25 16:58:49] Using encoding 'ANSI_X3.4-1968' (Posix.py|959)
[7] [Mai 25 16:58:49] >>> No BootOrder is set; firmware will attempt recovery (Posix.py|1003)
[7] [Mai 25 16:58:49] Exit code: 0 (Posix.py|1010)
[5] [Mai 25 16:58:49] output type: <type 'list'> (<string>|747)
[5] [Mai 25 16:58:49] No BootOrder is set; firmware will attempt recovery (<string>|749)
[2] [Mai 25 16:58:50] Traceback: (Logger.py|798)
[2] [Mai 25 16:58:50] File "/usr/local/bin/master.py", line 1656, in <module>
execfile(actionScript)
(Logger.py|798)
[2] [Mai 25 16:58:50] File "/tmp/setup.py", line 1744, in <module>
currentbootentry = uefiGetActBootEntry()
(Logger.py|798)
[2] [Mai 25 16:58:50] File "<string>", line 750, in uefiGetActBootEntry
(Logger.py|798)
[2] [Mai 25 16:58:50] ==>>> 'NoneType' object has no attribute '__getitem__' (master.py|1708)
[7] [Mai 25 16:58:50] Backend: <JSONRPCBackend(host=u'10.10.2.100', compression=True)> (master.py|1711)
[7] [Mai 25 16:58:50] ProductId: win10-x64 (master.py|1712)
[7] [Mai 25 16:58:50] ClientId: nb1000880.afb.lan (master.py|1713)
[7] [Mai 25 16:58:50] ProductOnClient: <ProductOnClient(clientId=u'nb1000880.afb.lan', productId=u'win10-x64', installationStatus=u'unknown', actionRequest=u'none')> (master.py|1714)
[7] [Mai 25 16:58:50] Executing jsonrpc method 'productOnClient_updateObjects' on host u'10.10.2.100' (JSONRPC.py|116)
[7] [Mai 25 16:58:50] Posting request... (JSONRPC.py|708)
[7] [Mai 25 16:58:50] Starting new HTTPS connection (1) to 10.10.2.100:4447 (HTTP.py|607)
[7] [Mai 25 16:58:50] Connection established to: 10.10.2.100 (HTTP.py|609)
[7] [Mai 25 16:58:50] Closing connection: <httplib.HTTPSConnection instance at 0x7fb9f9ace9e0> (HTTP.py|527)
[7] [Mai 25 16:58:50] Expecting gzip'ed data from server (JSONRPC.py|743)
[5] [Mai 25 16:58:50] Writing log to service (master.py|1737)
Code: Alles auswählen
efibootmgr -v
Code: Alles auswählen
[5] [Mai 25 16:58:49] No BootOrder is set; firmware will attempt recovery (<string>|749)
Code: Alles auswählen
firstEntry = getBootCurrent(output)[0]
Code: Alles auswählen
try:
firstEntry = getBootCurrent(output)[0]
except Exception:
pass
Code: Alles auswählen
Local variable "firstEntry" referenced before assignment
Code: Alles auswählen
[root@afb-app-ins-001 win10-x64]# diff opsisetuplib.py.safe opsisetuplib.py
747c747,753
< firstEntry = getBootCurrent(output)[0]
---
> logger.notice("output type: {0}".format(type(output)))
> for line in output:
> logger.notice("{0}".format(line))
> try:
> firstEntry = getBootCurrent(output)[0]
> except Exception:
> pass
Code: Alles auswählen
(15681) [5] [Mai 31 08:48:28] output type: <type 'list'> (<string>|747)
(15682) [5] [Mai 31 08:48:28] No BootOrder is set; firmware will attempt recovery (<string>|749)
(15683) [2] [Mai 31 08:48:29] Traceback: (Logger.py|798)
(15684) [2] [Mai 31 08:48:29] File "/usr/local/bin/master.py", line 1656, in <module>
(15685) execfile(actionScript)
(15686) (Logger.py|798)
(15687) [2] [Mai 31 08:48:29] File "/tmp/setup.py", line 1744, in <module>
(15688) currentbootentry = uefiGetActBootEntry()
(15689) (Logger.py|798)
(15690) [2] [Mai 31 08:48:29] File "<string>", line 754, in uefiGetActBootEntry
(15691) (Logger.py|798)
(15692) [2] [Mai 31 08:48:29] ==>>> local variable 'firstEntry' referenced before assignment (master.py|1708)
(15703) [5] [Mai 31 08:48:29] Writing log to service (master.py|1737)
Code: Alles auswählen
[root@afb-app-ins-001 win10-x64]# diff opsisetuplib.py.safe opsisetuplib.py
747c747,754
< firstEntry = getBootCurrent(output)[0]
---
> logger.notice("output type: {0}".format(type(output)))
> for line in output:
> logger.notice("{0}".format(line))
> firstEntry = None
> try:
> firstEntry = getBootCurrent(output)[0]
> except Exception:
> pass
Code: Alles auswählen
6] [Okt 12 18:21:09] Executing: /bin/cat '/mnt/hd/opsi/diskpart.txt' (Posix.py|926)
[6] [Okt 12 18:21:09] Using encoding 'ANSI_X3.4-1968' (Posix.py|959)
[7] [Okt 12 18:21:09] >>> list disk^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> select disk 0^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> list partition^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> list volume^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> select partition 4^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> delete partition noerr override^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> select partition 3^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> extend^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> list volume^M (Posix.py|1003)
[7] [Okt 12 18:21:09] >>> exit^M (Posix.py|1003)
[7] [Okt 12 18:21:09] Exit code: 0 (Posix.py|1010)
[7] [Okt 12 18:21:09] Command 'efibootmgr' found at: '/bin/efibootmgr' (Posix.py|867)
[6] [Okt 12 18:21:09] Executing: /bin/efibootmgr -v (Posix.py|926)
[6] [Okt 12 18:21:09] Using encoding 'ANSI_X3.4-1968' (Posix.py|959)
[7] [Okt 12 18:21:09] >>> No BootOrder is set; firmware will attempt recovery (Posix.py|1003)
[7] [Okt 12 18:21:09] Exit code: 0 (Posix.py|1010)
[2] [Okt 12 18:21:10] Traceback: (Logger.py|798)
[2] [Okt 12 18:21:10] File "/usr/local/bin/master.py", line 1670, in <module>
execfile(actionScript)
(Logger.py|798)
[2] [Okt 12 18:21:10] File "/tmp/setup.py", line 1749, in <module>
currentbootentry = uefiGetActBootEntry()
(Logger.py|798)
[2] [Okt 12 18:21:10] File "<string>", line 747, in uefiGetActBootEntry
(Logger.py|798)
[2] [Okt 12 18:21:10] ==>>> 'NoneType' object has no attribute '__getitem__' (master.py|1722)
[7] [Okt 12 18:21:10] Backend: <JSONRPCBackend(host=u'192.168.192.51', compression=True)> (master.py|1725)
[7] [Okt 12 18:21:10] ProductId: win10-x64 (master.py|1726)
[7] [Okt 12 18:21:10] ClientId: nh20h2b3.kmf.lan (master.py|1727)
[7] [Okt 12 18:21:10] ProductOnClient: <ProductOnClient(clientId=u'nh20h2b3.kmf.lan', productId=u'win10-x64', installationStatus=u'unknown', actionRequest=u'none')> (master.py|1728)
[7] [Okt 12 18:21:10] Executing jsonrpc method 'productOnClient_updateObjects' on host u'192.168.192.51' (JSONRPC.py|116)
[7] [Okt 12 18:21:10] Posting request... (JSONRPC.py|708)
Code: Alles auswählen
logger.notice("output type: {0}".format(type(output)))
for line in output:
logger.notice("{0}".format(line))
Code: Alles auswählen
bootManager = which("efibootmgr")
output = execute("{0} -v".format(bootManager))
logger.notice("output type: {0}".format(type(output)))
for line in output:
logger.notice("{0}".format(line))
try:
firstEntry = getBootCurrent(output)[0]
except Exception:
pass
if firstEntry:
info = getInfoFromLine(firstEntry, output)
return info
else:
return None
Code: Alles auswählen
File "/usr/local/bin/master.py", line 1670, in <module>
execfile(actionScript)
(Logger.py|798)
[2] [Okt 12 21:28:07] File "/tmp/setup.py", line 49, in <module>
exec(open('/tmp/opsisetuplib.py').read())
(Logger.py|798)
[2] [Okt 12 21:28:07] ==>>> expected an indented block (<string>, line 753) (master.py|1722)
Code: Alles auswählen
def uefiGetActBootEntry():
bootManager = which("efibootmgr")
output = execute("{0} -v".format(bootManager))
logger.notice("output type: {0}".format(type(output)))
for line in output:
logger.notice("{0}".format(line))
firstEntry = None
try:
firstEntry = getBootCurrent(output)[0]
except Exception:
pass
if firstEntry:
info = getInfoFromLine(firstEntry, output)
return info
else:
return None
Code: Alles auswählen
[5] [Okt 19 12:29:37] setting winpe to the top of winpe boot order (setup.py|1764)
[6] [Okt 19 12:29:37] Executing: /bin/efibootmgr -c --disk /dev/nvme0n1 --part 4 -L opsitempwinpe --loader \\EFI\\boot\\bootx64.efi (Posix.py|926)
[6] [Okt 19 12:29:37] Using encoding 'ANSI_X3.4-1968' (Posix.py|959)
[7] [Okt 19 12:29:37] >>> Could not prepare Boot variable: Input/output error (Posix.py|1003)
[7] [Okt 19 12:29:37] Exit code: 5 (Posix.py|1010)
[2] [Okt 19 12:29:38] Traceback: (Logger.py|798)
[2] [Okt 19 12:29:38] File "/usr/local/bin/master.py", line 1670, in <module>
execfile(actionScript)
(Logger.py|798)
[2] [Okt 19 12:29:38] File "/tmp/setup.py", line 1780, in <module>
execute('/bin/efibootmgr -c --disk %s --part %s -L opsitempwinpe --loader \\\\EFI\\\\boot\\\\bootx64.efi' % (disk.device, winpePartitionNumber))
(Logger.py|798)
[2] [Okt 19 12:29:38] File "/usr/lib/python2.7/dist-packages/OPSI/System/Posix.py", line 1017, in execute
raise RuntimeError(u"Command '%s' failed (%s):\n%s" % (cmd, exitCode, u'\n'.join(result)))
(Logger.py|798)
[2] [Okt 19 12:29:38] ==>>> Command '/bin/efibootmgr -c --disk /dev/nvme0n1 --part 4 -L opsitempwinpe --loader \\EFI\\boot\\bootx64.efi' failed (5):
Could not prepare Boot variable: Input/output error (master.py|1722)