[SOLVED] efi stub kernel loading problem

Help with issues regarding installation of Debian

[SOLVED] efi stub kernel loading problem

Postby Bolo » 2018-06-20 19:15

Hello everyone.
I am trying to set 'efi stub' loading mode according to 'https://wiki.debian.org/EFIStub' however when I try to run the efibootmgr command it returns could not prepare Boot variable: no such file or directory.
Any advise?

Thanks in advance.
Last edited by Bolo on 2018-06-23 09:42, edited 1 time in total.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Head_on_a_Stick » 2018-06-20 19:39

You need to be booted in UEFI mode to make new NVRAM boot entries with efibootmgr.
Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-20 19:47

Head_on_a_Stick - thanks for reply
I am booted in UEFI mode I checked it with command "mount -t efivarfs efivarfs /sys/firmware/efi/efivars" and this returns that is already mounted or efivar -l = where are a listings.
I am trying to install debian with minimal install on nvme disk - is this matters? What is strange - after I did new efibootmgr entries when I run efibootmgr I can see these entries but in the BIOS there is no any.
My partitions are /dev/nvme0n1p1 /dev/nvme0n1p2 and so on.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Head_on_a_Stick » 2018-06-20 19:56

Bolo wrote:after I did new efibootmgr entries when I run efibootmgr I can see these entries but in the BIOS there is no any

Please post the exact command that you used and also the full output of
Code: Select all
# efibootmgr -v

Some motherboards are reluctant to accept new NVRAM entries, or "forget" them easily, it is tricky to use plain EFI_STUB booting with such hardware.
Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-20 20:13

When I run:
Code: Select all
 export UUID=$(blkid -s UUID -o value /dev/nvme0n1p2)
efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\vmlinuz' -u "root=UUID=$UUID ro quiet rootfstype=ext4 add_efi_memmap initrd=\\EFI\\debian\\initrd.img"

I have recieved listing saying "could not prepare Boot variable: no such file or directory".

Then I tried run:
Code: Select all
efibootmgr -c -d /dev/nvme0n1p2 -p 1 -L Debian (EFI stub) -l \EFI\debian\vmlinuz.efi

and the efibootmgr -v output is:
Code: Select all
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0009,0008,0006,0001,0005,0000,0007,0003,0002,0004
Boot0000* debian   HD(1,GPT,d1fb6ae7-19f5-4ad4-9833-5b7b438ca6c1,0x800,0x144000)/File(\EFI\debian\grubx64.efi)
Boot0001* Linux Boot Manager   HD(1,GPT,d1fb6ae7-19f5-4ad4-9833-5b7b438ca6c1,0x800,0x144000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0002* Debian (EFI stub)   VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0003* Debian (EFI stub)   VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0004* DEB   VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* UEFI OS   HD(2,GPT,30cc2ef6-6813-4880-a61e-74b7894f2def,0xfa000,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0006* Windows Boot Manager   HD(2,GPT,30cc2ef6-6813-4880-a61e-74b7894f2def,0xfa000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...r................
Boot0007* UEFI: Generic Flash Disk PMAP   PciRoot(0x0)/Pci(0x14,0x0)/USB(9,0)/USB(3,0)..BO
Boot0008* Debian (EFI stub)   HD(1,0,00000000000000000000000000000000,0x0,0x0)/File(\EFI\debian\vmlinuz.efi)
Boot0009* Debian (EFI stub)   HD(1,0,00000000000000000000000000000000,0x0,0x0)/File(\EFI\debian\vmlinuz.efi)echo

Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Head_on_a_Stick » 2018-06-20 20:40

Try
Code: Select all
# efibootmgr -c -d /dev/nvme0n1p2 -p 1 -L 'Debian (EFI_STUB)' -l '/EFI/debian/vmlinuz' -u 'root=UUID=$uuid ro quiet rootfstype=ext4 add_efi_memmap initrd=/EFI/debian/initrd.img'

But be sure to replace $uuid with the actual UUID of the root partition.

It may also be worth checking the EFI system partition for /EFI/debian/{vmlinuz,initrd.img}, just in case.

You may want to remove your abortive earlier attempts with
Code: Select all
# efibootmgr -b xxxx -B

and replace xxxx with the bootnumber of the entry you want removed.
Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-20 20:56

Thank you Head_on_a_Stick.
I will do so and tomorrow let you know the outcome.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-20 21:11

I did as you advised and this returns:
Code: Select all
GUID Partition Table Header signature is wrong: 0 != 5452415020494645
GUID Partition Table Header signature is wrong: 0 != 5452415020494645
GUID Partition Table Header signature is wrong: 0 != 5452415020494645
GUID Partition Table Header signature is wrong: 0 != 5452415020494645
GUID Partition Table Header signature is wrong: 0 != 5452415020494645
GUID Partition Table Header signature is wrong: 0 != 5452415020494645

I can see it when I run efibootmgr but in UEFI/BIOS there is no entry.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Head_on_a_Stick » 2018-06-20 21:19

Please post the full output of
Code: Select all
# parted --list

^ That command can be run from a "live" distribution.

I will be afk for ~8 hrs.
Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: efi stub kernel loading problem

Postby milomak » 2018-06-20 22:14

Bolo wrote:Hello everyone.
I am trying to set 'efi stub' loading mode according to 'https://wiki.debian.org/EFIStub' however when I try to run the efibootmgr command it returns could not prepare Boot variable: no such file or directory.
Any advise?

Thanks in advance.

so i run sid both on an imac (external hdd) and also on a win10 laptop (partitioned drive)

i didn't go this route on either

iirc i created the vfat boot partition and from there it was all good
iMac - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop (64-bit) - Debian Sid, Win10,
Kodi Box - Debian Sid
milomak
 
Posts: 1708
Joined: 2009-06-09 22:20

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-21 05:10

@milomak - thanks for reply.
During the installation I created the boot partition 680 MB and I choosed a format option as ESP partition. Maybe before installation I should have formated this partition using gparted as a fat32 and then put the flag of esp on it?
However as far as I remember I tried to do so and then Debian installer would not be able to recognized this partition unless I erased this and then create this partition from the begining.
Last edited by Bolo on 2018-06-21 05:19, edited 2 times in total.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-21 05:12

@Head_on_a_Stick,
Currently I am at work and I will be able to investigate as you advise after next 10 hours. I will let you know the outcome your code.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby p.H » 2018-06-21 13:17

Bolo wrote:efibootmgr -c -d /dev/nvme0n1p2 -p 1 -L Debian (EFI stub) -l \EFI\debian\vmlinuz.efi


- The drive containing the EFI files must be specified with -d (--disk) if different from /dev/sda.
/dev/nvme0n1p2 seems to be a partition. The drive is /dev/nvme0n1.

- Quotes missing around the label string.

- Kernel parameters missing. Even if you can get this entry to boot, without the proper parameters all you will get is a kernel panic due to the inability to mount a root filesystem.

Bolo wrote:GUID Partition Table Header signature is wrong: 0 != 5452415020494645

I have seen this message when specifying a disk with a DOS/MBR partition table. It seems bogus and harmless (unless the boot disk is GPT and you get this message because you specified the wrong disk).
p.H
 
Posts: 402
Joined: 2017-09-17 07:12

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-21 13:48

Hello Guys,
here is the output of the command parted --list
Code: Select all
Model: ATA Corsair Force LS (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  524MB   523MB   ntfs         Basic data partition          hidden, diag
 2      524MB   629MB   105MB   fat32        EFI system partition          boot, esp
 3      629MB   646MB   16,8MB               Microsoft reserved partition  msftres
 4      646MB   62,9GB  62,3GB  ntfs         Basic data partition          msftdata
 5      62,9GB  199GB   136GB                Basic data partition          msftdata
 6      199GB   240GB   40,8GB               Basic data partition          msftdata


Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 4173MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0,00B  4173MB  4173MB  fat32


Model: Unknown (unknown)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name      Flags
 1      1049kB  681MB   679MB   fat32                     boot, esp
 2      681MB   41,7GB  41,0GB  ext4            System
 3      41,7GB  47,7GB  6000MB  linux-swap(v1)
 4      47,7GB  256GB   208GB   ext4            Komputer

What is more grub is launching the system properly but I would like to remove grub and use only efi stub mode.
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Re: efi stub kernel loading problem

Postby Bolo » 2018-06-21 13:56

@p.H - thanks for reply.
As I have been advised I wiped out these abortive entries as well this one which you quoted and this is not the case anymore. I mean that was my ..... yes abortive try and lets forget about it :)
Bolo
 
Posts: 21
Joined: 2018-06-20 19:02

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable