You are not logged in.

#1 2020-11-18 17:43:32

ynikitenko
Member
Registered: 2020-11-15
Posts: 14

bcfg: invalid argument - option index

I tried to select a kernel for booting using bcfg from UEFI Shell from the most recent archiso, and had a problem. In https://wiki.archlinux.org/index.php/EFISTUB#bcfg they propose to pass options to the kernel like this:

Shell> bcfg boot -opt N FS1:\options.txt

(where N is the index of the boot entry). I created the boot entry as 0 (top priority), created the options file, but when I run this command, it complained

bcfg: invalid argument - option index

(I put this as the title for better search). I tried different N (0, 0000, Boot0000 - as it was shown in "bcfg boot dump -v), but nothing helped.

I fixed that with providing a different N: 1 and 5 worked. It seems that the issue is only with the number 0. So I added another boot entry, supplied options to that and then made that default (0).

I also found another variant of this command (partition number corrected) on https://wiki.archlinux.org/index.php/Un … rface#bcfg, which didn't work at all:

Shell> bcfg boot -opt N "root=/dev/sdX# initrd=\initramfs-linux.img"

1) Do I understand right that bcfg behaviour is defined in the UEFI specification? Is the options line outdated? Probably the wiki should be updated.
2) Where the bcfg from archiso comes from, and where should I report this bug (if this is a bug)?

Offline

#2 2020-11-18 21:52:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,168

Re: bcfg: invalid argument - option index

The options line is documented as it is written in the wiki and in the UEFI spec (... that is also linked there)

There are many UEFI implementations that are plain buggy, it's likely that these are issues specific to your particular implementation.

Offline

#3 2020-11-19 07:39:08

ynikitenko
Member
Registered: 2020-11-15
Posts: 14

Re: bcfg: invalid argument - option index

"these are issues specific to your particular implementation" - do you mean that this is the issue of my UEFI, not the bcfg command from archiso?

Offline

#4 2020-11-19 08:15:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,168

Re: bcfg: invalid argument - option index

Yes. Many vendors have very liberal definitions of "UEFI support". Many of them call it done when Windows boots, which doesn't require the ability to add parameters to the EFI executable to be executed and in quite extreme cases means they don't even allow storing custom NVRAM entrie (because they can just boot esp/BOOT/bootx64.efi, which will be populated by Windows).

Not saying this has to be the case here, but it's something one needs to keep in mind. Maybe you'll want to define a bit better what "doesn't work at all" means. Was no entry created or was the created entry faulty in some way? What error did you get if you got one?

Offline

#5 2020-11-19 08:19:36

ynikitenko
Member
Registered: 2020-11-15
Posts: 14

Re: bcfg: invalid argument - option index

No, the problem was with bcfg command line arguments.

Shell> bcfg boot -opt 0 FS1:\options.txt

gives this error:

bcfg: invalid argument - option index

Options are not applied. I wrote this in the original post. I think this is the bcfg issue, because that is its CLI.

Offline

#6 2020-11-19 08:40:11

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,020
Website

Re: bcfg: invalid argument - option index

I have no experience with bcfg, but the error message suggests, that the specified option index is invalid. Have you tried using another index, e.g. 1 instead of 0?
Maybe bcfg starts enumerating at 1 instead of 0.

Last edited by schard (2020-11-19 08:41:58)

Offline

#7 2020-11-19 14:07:54

ynikitenko
Member
Registered: 2020-11-15
Posts: 14

Re: bcfg: invalid argument - option index

As I wrote, "bcfg boot dump -v" starts from 0.

Offline

#8 2020-11-19 14:14:48

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 273

Re: bcfg: invalid argument - option index

ynikitenko wrote:

As I wrote, "bcfg boot dump -v" starts from 0.

Maybe you should provide actual output and commands that you've done (pasted in code blocks please), would make it infinitely easier for others to parse and try and help.

Perhaps only the default can be 0? And you can't actually create a 0 entry, but just have to assign a 1-XX entry to the default for it to be given a 0 index? (Pure conjecture on my part.)

You haven't even let us know what  manufacturer/board this is? Again please note as V1del already pointed out UEFI implementations vary widely by board/manufacturer.


"the wind-blown way, wanna win? don't play"

Offline

#9 2020-11-19 14:36:01

ynikitenko
Member
Registered: 2020-11-15
Posts: 14

Re: bcfg: invalid argument - option index

As I wrote, I used commands from https://wiki.archlinux.org/index.php/EFISTUB#bcfg.

"you can't actually create a 0 entry" - yes, I can. I did that and wrote about that in the post.

"You haven't even let us know what  manufacturer/board this is?" - I provided some information. Some people didn't read even that. About this no one asked, but my laptop is Acer Swift 5. Hope this helps.

"V1del already pointed out UEFI implementations vary widely " - yes, I understand. However, I think that ''bcfg'' came not from my UEFI, but from archiso UEFI Shell (which I load).

"Maybe you should provide actual output" - sorry, but this seems hard for me. The only useful output was what I wrote. I have no internet in UEFI shell, and don't know how to create logs there. My questions, however, were not what I should do (this sort of help), but where should I report the bug (I saw no proof that it is not a bug).

So probably let us leave only this question:

2) Where the bcfg from archiso comes from, and where should I report this bug?

Offline

#10 2020-11-19 14:47:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,168

Re: bcfg: invalid argument - option index

There's also no proof that it is a bug, which is why we ask for more general information. If the package list is anything to go by the shell is edk2-shell which has their repos here: https://github.com/tianocore/edk2

It could also be a documentation error in the wiki, which you should verify by checking whether supplying 1 actually manipulates the 0 entry or so.

FWIW Acer's definitely belong in the "weird" UEFI implementations category. Note some of the UEFI remarks mentioned in https://wiki.archlinux.org/index.php/Laptop/Acer

Last edited by V1del (2020-11-19 15:15:59)

Offline

#11 2020-11-19 15:06:23

ynikitenko
Member
Registered: 2020-11-15
Posts: 14

Re: bcfg: invalid argument - option index

Yes, it's not a very definite thing. Many thanks for your help!

I registered there and submitted a bug report (https://bugzilla.tianocore.org/show_bug.cgi?id=3080). However, in the case that is a wrong place or more details from Arch maintainers is needed, I'll continue this thread.

P.S. I'll try to write more clearly, but it's not easy for me at the moment to be both focused and comprehensive. So sorry if my post was not structured well enough and thanks for all the answers.

Offline

Board footer

Powered by FluxBB