Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-15 Thread Nick Vinson
On 08/14/2016 07:58 PM, sken...@ou.edu wrote: > I think yours is in Linux user space while mine is grub boot time. I > sent a second concept patch based on feedback and suggestions for a > small change to grub probe command to set environment variable to guid > of partition. Gpt partition guid is a

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-15 Thread Nick Vinson
Steve, I'm not part of the mailing list and I only periodically check it. However, I was wondering if your request is the same as the code request that I made earlier this month (http://lists.gnu.org/archive/html/grub-devel/2016-08/msg00018.html). If not could you tell me how it's different? If t

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread skenton
I think yours is in Linux user space while mine is grub boot time. I sent a second concept patch based on feedback and suggestions for a small change to grub probe command to set environment variable to guid of partition. Gpt partition guid is array of 16 uchar which is a bother. Do you access i

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Thomas Schmitt
Hi, i riddled over UEFI appendix A: > > Do you mean that one has to interpret the statement of UEFI 2.4 > > "All EFI GUIDs (Globally Unique Identifiers) have the format described > >in RFC 4122 [...] > >It should also be noted that TimeLow, TimeMid, TimeHighAndVersion fields > >in th

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Andrei Borzenkov
14.08.2016 18:44, Thomas Schmitt пишет: > Hi, > > ... still trying to make sense of the specs. > > Andrei Borzenkov wrote: >> According to UEFI Appendix A it goes into 7-th byte (starting with 0) of >> binary representation of EFI GUID. > > Do you mean that one has to interpret the statement of

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Andrei Borzenkov
14.08.2016 16:55, Thomas Schmitt пишет: > Hi, > > i wrote: >>> i could not reliably determine where to put the version nibble. > > Andrei Borzenkov wrote: >> According to UEFI Appendix A it goes into 7-th byte (starting with 0) of >> binary representation of EFI GUID. > > And RFC 4122 with its b

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Thomas Schmitt
Hi, ... still trying to make sense of the specs. Andrei Borzenkov wrote: > According to UEFI Appendix A it goes into 7-th byte (starting with 0) of > binary representation of EFI GUID. Do you mean that one has to interpret the statement of UEFI 2.4 "All EFI GUIDs (Globally Unique Identifiers)

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Thomas Schmitt
Hi, i wrote: > > i could not reliably determine where to put the version nibble. Andrei Borzenkov wrote: > According to UEFI Appendix A it goes into 7-th byte (starting with 0) of > binary representation of EFI GUID. And RFC 4122 with its big-endian representation puts it into byte 6. > Curren

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Steve Kenton
Thank you for the pointers and encouragement. I knew there had to be a better way and I will do as you suggest using probe etc with current source. I was just experimenting with the source that was already available with my current Buildroot setup as a proof of concept. Steve Kenton On 08/1

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Andrei Borzenkov
14.08.2016 12:09, Thomas Schmitt пишет: > Hi, > > after having freshly re-read the specs of UEFI and RFC4122, > here is some nitpicking: > > Steve Kenton wrote: >>> 3F2504E0-4F89-41D3-9A0C-0305E82C3301 > > Andrei Borzenkov wrote: >> Usually GUIDs are displayed in lower case > > RFC4122 pres

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Thomas Schmitt
Hi, after having freshly re-read the specs of UEFI and RFC4122, here is some nitpicking: Steve Kenton wrote: > > 3F2504E0-4F89-41D3-9A0C-0305E82C3301 Andrei Borzenkov wrote: > Usually GUIDs are displayed in lower case RFC4122 prescribes to read them independently of case, but to produce the

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-14 Thread Andrei Borzenkov
13.08.2016 23:25, Steve Kenton пишет: > My thought is to add a new command "partuuid" which takes a We have "probe" command and if implemented it should be integrated there. > drive&partition string and sets an environment variable to the partition > uuid (grub "partuuid" by default). Since grub

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread Andrei Borzenkov
14.08.2016 07:12, Michael Zimmermann пишет: >> Not sure why, but whatever reply I chose Thunderbird and Gmail only > reply to list. > no idea about thunderbird but in GMail you have the small arrow beneath the > reply buttons, click it and select "Reply to all". > Should I repeat - "Whatever repl

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread Michael Zimmermann
> Not sure why, but whatever reply I chose Thunderbird and Gmail only reply to list. no idea about thunderbird but in GMail you have the small arrow beneath the reply buttons, click it and select "Reply to all". On Sat, Aug 13, 2016 at 8:40 PM, Andrei Borzenkov wrote: > 13.08.2016 20:30, adrian1

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread Steve Kenton
Embedded Linux on flash with no initramfs. I'm in the USA and recently had lots of "fun" trying to help a dealer in Australia with a unit that apparently had something plugged into the wrong slot. My goal is to always have our system at least boot and complain if physically possible no matter w

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread Steve Kenton
My thought is to add a new command "partuuid" which takes a drive&partition string and sets an environment variable to the partition uuid (grub "partuuid" by default). Since grub always calls the load drive "hd0" this can then be passed directly to the kernel as a command line for the rootfs in

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread Andrei Borzenkov
13.08.2016 20:30, adrian15 пишет: > What's your use case? > Well, this has been requested before and this is supported by Linux kernel. So as long as this does not increase core modules size (i.e. is done outside of partition probing core) I think it will be OK. > adrian15 > > El 12/08/16 a las

Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread adrian15
What's your use case? adrian15 El 12/08/16 a las 16:11, Steve Kenton escribió: As far as I can tell there is no search module that can be used to get the partuuid at boot time given a grub root device such as (hd0,gtp1). I think is would be a useful addition since the resulting partuuid could b

Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-12 Thread Steve Kenton
As far as I can tell there is no search module that can be used to get the partuuid at boot time given a grub root device such as (hd0,gtp1). I think is would be a useful addition since the resulting partuuid could be passed directly to the kernel as root=PARTUUID=xxx and it does not seem like