3

How to start vmlinuz-linux from efi shell ? I jump into the ESP and type vmlinuz-linux (vmlinuz-linux is in the ESP) but it says vmlinuz-linux isn't recognized as an internal or external command, operable program, or batch file, why do I have to start a boot loader first I don't get it.

4 Answers 4

4

Just had to type /vmlinuz-linux root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 initrd=/initramfs-linux.img from this https://wiki.archlinux.org/index.php/EFISTUB#Booting_EFISTUB but had to remove the forward slash / before vmlinuz-linux to get it to work.

1

Whether you need a boot loader or not depends on whether your particular version of the Linux kernel supports EFI BOOT STUB.

See the following for more information: https://www.kernel.org/doc/Documentation/efi-stub.txt

1

IIRC, the EFI shell won't launch files as programs if their names don't end in .efi. Thus, you must first rename the kernel file so that its name ends in .efi.

If you can't rename the kernel file, you can still launch a kernel using the EFI stub loader via another boot manager program, such as gummiboot/systemd-boot or rEFInd. These tools don't care about the filename extension -- at least, not as much as the shell does. (rEFInd's auto-scanning feature matches to *.efi, vmlinuz*, bzImage*, and kernel*, but manual boot configuration for both programs will work with any filename.)

Also, as fpmurphy1 says, the kernel must be compiled with EFI stub support. Most distributions have included this support in their 3.3.0 and later kernels, but this may not be 100% universal, particularly if you compile your kernel yourself. (The last I checked, EFI stub support was not part of the default kernel configuration for kernel source obtained from kernel.org.)

0

The best description is in Documentation/efi-stub.txt with this example:

fs0:> bzImage.efi console=ttyS0 root=/dev/sda4

It does not elaborate on that fs0:> prompt, neither mentions (U)EFI Shell for replacing a "conventional" boot loader. In my case, after booting into Uefi Shell, I get Shell> prompt and first have to choose a ESP/FAT filesystem. (You can have more than one ESP even per drive)

Second point is adding ".efi" extension to bzImage. I don't have to do that (AMI 2.7). So it can be reduced to:

fsX:> bzImage root=/dev/sda4 [initrd=...] [...]

Another confusion can be the DOS style slashes and the need for absolute paths in .nsh scripts. With the images in a own folder "distro", the line looks like this:

distro\bzImage initrd=distro\initrd root=/dev/sdaX

Note that the root parameter has forward slashes; it is used by the kernel, not the Uefi Shell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .