UEFI booting [solved]

Antworten
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

UEFI booting [solved]

Beitrag von SisterOfMercy »

I'm messing around with a few new computers. Some of them work fine with NVMe drives and legacy bios boot. However, I've also encountered a few motherboards that need/want to boot in UEFI mode before wanting to boot from the NVMe drive.

I'm running into problems with the win7-x64 netboot product. I'm not on the newest version, but the setup.py hasn't changed much, and this looks simple. (it never is)

Code: Alles auswählen

[7] [Jan 20 20:59:19] Exit code: 0 (Posix.py|847)
[5] [Jan 20 20:59:24] /dev/nvme0n1p4 exists as device - fine (opsisetuplib.py|241)
[5] [Jan 20 20:59:24] /dev/nvme0n1p4 created and formated (opsisetuplib.py|275)
[5] [Jan 20 20:59:24] check efi boot order (setup.py|714)
[6] [Jan 20 20:59:24] Executing: /bin/efibootmgr (Posix.py|763)
[6] [Jan 20 20:59:24] Using encoding 'ANSI_X3.4-1968' (Posix.py|796)
[7] [Jan 20 20:59:24] >>> Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables. (Posix.py|840)
[7] [Jan 20 20:59:24] >>> Try 'modprobe efivars' as root. (Posix.py|840)
[7] [Jan 20 20:59:24] Exit code: 1 (Posix.py|847)
[2] [Jan 20 20:59:26] Traceback: (Logger.py|765)
[2] [Jan 20 20:59:26]      line 1461 in '<module>' in file '/usr/local/bin/master.py' (Logger.py|765)
[2] [Jan 20 20:59:26]      line 715 in '<module>' in file '/tmp/setup.py' (Logger.py|765)
[2] [Jan 20 20:59:26]      line 854 in 'execute' in file '/usr/lib/python2.7/dist-packages/OPSI/System/Posix.py' (Logger.py|765)
[2] [Jan 20 20:59:26]      ==>>> Command '/bin/efibootmgr' failed (1):
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root. (master.py|1509)
The bootimage wasn't booted in UEFI mode, so modprobe efivars doesn't work.

From setup.py (this part hasn't changed in the most recent version)

Code: Alles auswählen

	if not useGpt:
		# Write Master Boot Record
		disk.writeMasterBootRecord(system = 'vista')
	else:
		if inUefi:
			#execute('/sbin/modprobe efivars')
			logger.notice(u"check efi boot order")
			execute('/bin/efibootmgr')
	
	# Mount partition
https://bbs.archlinux.org/viewtopic.php ... 3#p1159933

Hmm, so do I have to boot the opsi bootimage in UEFI mode before this will work? Or am I missing something?
Zuletzt geändert von SisterOfMercy am 03 Feb 2017, 01:00, insgesamt 1-mal geändert.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: UEFI booting

Beitrag von m.radtke »

Hi

It would be my first guess to boot the Image in EFI Mode.

Alternatively try to uncomment the line you showed

Code: Alles auswählen

#execute('/sbin/modprobe efivars')
This will load the needed EFI Environment

Cheers
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: UEFI booting

Beitrag von SisterOfMercy »

m.radtke hat geschrieben:Alternatively try to uncomment the line you showed

Code: Alles auswählen

#execute('/sbin/modprobe efivars')
This will load the needed EFI Environment
I tried this afterwards in the shell, but that gave an error. This line was already commented out, and still is in the newer version.

But how should one boot in UEFI mode from the network? Syslinux 6 was the first that had UEFI boot capabilities, but gave a lot of problems, so you switched back. I have had iPXE working, but not the bootimage via iPXE.

I compiled iPXE with an embedded script, which makes the DHCP config a lot easier:

Code: Alles auswählen

option client-arch code 93 = array of unsigned integer 16;

if not exists client-arch {
       filename "linux/ipxe/undionly.kpxe";
} elsif substring (option client-arch,0,0) = option client-arch {
       filename "linux/ipxe/undionly.kpxe";
} elsif option client-arch = encode-int (0,16) {       # 0 x86 BIOS
       filename "linux/ipxe/undionly.kpxe";
} elsif option client-arch = encode-int (6,16) {       # 6 x86 UEFI
       filename "linux/ipxe/ipxe.efi";
} elsif option client-arch = encode-int (7,16) {       # 7 x64 UEFI
       filename "linux/ipxe/ipxe.efi";
} elsif option client-arch = encode-int (9,16) {       # 9 UEFI ByteCode
       filename "linux/ipxe/ipxe.efi";
}
Anyway, I'll try to boot in UEFI mode, but I really thought that wasn't possible because of SYSLINUX 4.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: UEFI booting

Beitrag von SisterOfMercy »

Whoops, I've just read opsi-extension-en.pdf, and it looks like you're using ELILO. That explains a lot. Thanks.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten