Opsi UEFI Boot bei HP ZBook 14uG6

Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von m.radtke »

Füge mal in Zeile 747 der Datei opsisetuplib.py folgende Zeilen ein, starte das Produkt neu und Berichte mal vom Output

Code: Alles auswählen

    logger.notice("output type: {0}".format(type(output)))
    for line in output:
        logger.notice("{0}".format(line))
Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
fsauser
Beiträge: 15
Registriert: 19 Mai 2021, 16:07

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von fsauser »

Hallo Mathias,

habe es hier eingetragen:

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
Sehe aber keinen Unterschied im Log zu vorher

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)
Hab ich es falsch eingetragen?
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von m.radtke »

Moin,

nein du hast es genau richtig eingetragen

Code: Alles auswählen

efibootmgr -v
gibt hier

Code: Alles auswählen

[5] [Mai 25 16:58:49] No BootOrder is set; firmware will attempt recovery (<string>|749)
zurück und an eine Funktion weitergegeben die dann keinen Rückgabewert zurückgibt, da anderer Output erwartet wird.

Du könntest versuchen um die Zeile

Code: Alles auswählen

    firstEntry = getBootCurrent(output)[0]
sowas zu machen

Code: Alles auswählen

    try:
        firstEntry = getBootCurrent(output)[0]
    except Exception:
        pass
Damit sollte das abgefangen werden und die Installation dann weiterlaufen.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
fsauser
Beiträge: 15
Registriert: 19 Mai 2021, 16:07

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von fsauser »

Hallo Mathias,

habe es eingetragen. Nun kommt

Code: Alles auswählen

Local variable "firstEntry" referenced before assignment
Hie rnoch meine Änderungen:

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
Noch einen Vorschlag?

Danke

P.S. hier noch die vollstädige Meldung

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)
fsauser
Beiträge: 15
Registriert: 19 Mai 2021, 16:07

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von fsauser »

Hallo Mathias,

hast Du noch eine Idee für mich? Würden gerne das UEFI Modul final von Euch erwerben. Dies kann ich aber nur intern durchboxen,
wenn die Installation reibungslos verläuft.

Danke im Vorraus.
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von m.radtke »

Guten Morgen,

Du kannst die Variable auf None setzen, dann ist sie zwar Initialisiert, hat aber keinen Wert und dann sollt edie folgende if-else Abfrage auch nicht mehr stören.

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
Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
juergensb
Beiträge: 6
Registriert: 15 Nov 2017, 16:32

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von juergensb »

Hallo Leute,

ich schaffe es bei einem Dell Latitude 3320 (LAN über USB-Docking) nicht via PXE Windows 10 zu installieren -
bei allen anderen Rechner klappt es ohne Probleme.

Er kopiert wie immer die "win10-x64/winpe_uefi/* nach /mnt/hd" fügt danach die
"Additional Driver" hinzu. Danach sucht er noch nach ein paar Treibern und sagt dann schlussendlich
'NoneType' object has no attribute '__getitem__'

Ein "efibootmgr -v" hat folgende Wirkung: "No BootOrder is set; firmware will attempt recovery"

In der lokalen Log-Datei steht zu Schluss:

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)
Ich habe auch schon versucht bei "opsi-linux-bootimage.append = acpi=off, noapic" einzutragen - auch ohne Erfolg.

Ich habe dann in der Zeile 747 der Datei opsisetuplib.py folgendes eingefügt:

Code: Alles auswählen

 logger.notice("output type: {0}".format(type(output)))
    for line in output:
        logger.notice("{0}".format(line))
Der Log zeigte aber kein Unterschied an. Dann habe ich also noch den nächsten Tipp hinzugefügt,
sodass es jetzt so aussieht:

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
Jetzt kommt bei mir:

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)

Wenn ich trotzdem noch den letzten Tipp hinzufüge "firstEntry = None" aber wieder bekomme ich
die Meldung "==>>> expected an indented block (<string>, line 754) (master.py|1722)"

Ich habe leider keine Ahnung was ich jetzt noch machen könnte. Auf der anderen Seite soll ich noch
mehr von diesen Geräten bestellen. Wäre super, wenn ihr mir einen Tipp hättet.

Herzlichen Dank

Gruß Ben
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von m.radtke »

Hi Ben,

1. Der Fehler bei der Ausgabe vim efibootmgr ist wohl ein Firmware Bug, schau mal ob es ein UEFI update für das Gerät gibt.

2. Du hast mit Deiner Änderung einen Fehler in der Einrückung gemacht. In der setup.py wird mit einem Tab und nicht mit 4 Leerzeichen eingerückt.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
juergensb
Beiträge: 6
Registriert: 15 Nov 2017, 16:32

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von juergensb »

Hi Matthias,

herzlichen Dank für den Hinweis.

Zu 1.: Ich habe gestern das aktuellste Bios Update bereits eingespielt. Leider keine Änderung

Zu 2.: Ahhh - war anscheinend schon zu spät.

Ich habe irgendwann dann einfach den Fehler ignoriert und den Rechner dann einfach gleich danach
von der Disk booten lassen. Uns siehe da ich konnte weiter installieren. Er hat zwar nicht automatisch
die richtigen Pakete installiert aber manuell ließen sie sich nachinstallieren. Als Work-Around ging das dann.

Ich muss in einigen Tagen den nächsten dieser Rechner installieren - dann versuche ich es nochmals.
Danke nochmals fürs drüberschauen.

LG Ben
juergensb
Beiträge: 6
Registriert: 15 Nov 2017, 16:32

Re: Opsi UEFI Boot bei HP ZBook 14uG6

Beitrag von juergensb »

HI Matthias,

heute konnte ich mit dem neuen, baugleichen Gerät nochmals die PXE Installation testen.
Ich habe die Einrückungen entfernt. Der Code sieht jetzt so aus:

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
Leider bekomme ich jetzt folgende Fehlermeldung:

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

In der Logdatei steht folgendes:

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)
Als Antwort auf ein "efibootmgr -v" erhalte ich:
"No BootOrder is set; firmware will attempt recovery"

Glücklicherweise wird nach einem Neustart auf die NvmeSSD Windows installiert
Antworten