[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57496] [PATCH 1/2] gnu: bootloader: Extend `<menu-entry>' for chain
From: |
tiantian |
Subject: |
[bug#57496] [PATCH 1/2] gnu: bootloader: Extend `<menu-entry>' for chain-loader. |
Date: |
Thu, 01 Sep 2022 10:33:51 +0800 |
User-agent: |
mu4e 1.8.9; emacs 28.1 |
Hi,
Julien Lepiller <julien@lepiller.eu> writes:
> Le Thu, 1 Sep 2022 01:55:34 +0800,
> tiantian <typ22@foxmail.com> a écrit :
>
>> Dear Mr/Ms Lepiller,
>>
>> I'm sorry. I didn't notice the wrong sender name.
>
> You don't have to apologize. I received your email and I didn't even
> notice the sender name :)
>
Thank you for your generosity.
>
> Let's try something like this:
>
> @item @code{chain-loader} (default: @code{#f})
> A string that can be accepted by @code{grub}'s @code{chainloader}
> directive. This has no effect if either @code{linux} or
> @code{linux-multiboot} fields are specified. The following is an
> example of chainloading a different GNU/Linux system.
>
Thank you for your help. I will change it in next patch.
But I have a little doubt. 'linux-multiboot' has never appeared in the
documentation. Will it be difficult to understand the document? I don't
know much about multiboot. I haven't seen the "linux-" prefix in
multiboot before. Does multiboot only support linux?
>
> OK, I see now. I don't really understand why they were separate, but
> let's keep them separate for now.
>
OK, I will keep them separate.
>
> I prefer this variant where the pattern is explicit.
>
> As with what we have today, if the user specifies more than one of
> linux, linux-multiboot and chainloader, they get an unhelpful "no
> matching pattern" error.
>
> This could be done later if you don't have time, but I would suggest to
> fix it by adding a default case that matches all incorrect cases, like
> so:
>
> (_ (raise (condition (&message (message (G_ "Your error message
> here"))))))
>
> Have a look at other "&message" conditions for inspiration.
>
> Also I noticed that if all of linux, linux-multiboot and chainloader
> are #f, then the first pattern matches and will lead to a different
> error message. I haven't tested so I'm not sure what we get, but it
> might be interresting to match on all of them being #f, and print a
> different message. Again, this can be done later.
>
Thank you for your suggestions. I will use in the pattern to specify all
fields of <menu-entry> in next patch.
I didn't know how to throw an error message before. I may need to spend
time reading code and learning. If possible, I will implement it in v3
patch.
>> It can also use device to specify the disk partition. The following is
>> the menu-entry that I am using.
>>
>> --- >8 ---
>>
>> (menu-entries
>> (list
>> (menu-entry
>> (label "ArchLinux")
>> (device (uuid "1C31-A17C" 'fat))
>> (chain-loader "/EFI/ArchLinux/grubx64.efi"))))
>>
>> --- <8 ---
>>
>> The examples in the document were written before the bug#57307 was
>> fixed. At that time, only this example passed the test on my
>> computer. I didn't take into account that the example was bad. I'm
>> sorry.
>
> This new example is perfect. Could you add it to your next patch?
>
No problem.
In order to avoid the possible controversy over the Linux distribution,
I will change ArchLinux to GNU/Linux.
>
> Could you send a v2 with the changes we discussed so far?
>
> Thanks,
> Julien
>
No problem. I will finish v2 patch as soon as possible.
The mail server seems to have rejected my last mail, which is not
displayed in the mail list. I hope this email can be displayed normally.
Thanks,
tiantian