Grub2 LUA API?
Hi,
I have been playing a bit with osdetect.lua file. I have seen many
calls to grub.addmenu, grub.file_exist and so on.
I am now interested in making a table where to store all the uuid
associated to each one of the kernel that I find (I mean kernel's filesystem's uuid).
As long as I suppose there is no documentation written about it I would
like to know where should I look into the grub2 source code in order to know which grub.WHATEVER calls I can make, what are their arguments/options , their outputs and so on.
So where should I look into in the source code?
Thank you very much!
adrian15
Signature · 1 line
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
Hi,
You can use grub.enum_device, which pass the uuid to the callback function, then you can store the device->uuid mapping in a table.
If you're looking for source code, check out script/lua/grub_lib.c
Quoted 30 lines · On Sun, Aug 23, 2009 at 2:57 AM, adrian15<[email protected]> wrote:
Hi,
I have been playing a bit with osdetect.lua file. I have seen many calls to grub.addmenu, grub.file_exist and so on.
I am now interested in making a table where to store all the uuid associated to each one of the kernel that I find (I mean kernel's filesystem's uuid).
As long as I suppose there is no documentation written about it I would like to know where should I look into the grub2 source code in order to know which grub.WHATEVER calls I can make, what are their arguments/options , their outputs and so on.
So where should I look into in the source code?
Thank you very much!
adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/
Quoted 4 lines · Bean
Hi,
You can use grub.enum_device, which pass the uuid to the callback function, then you can store the
device->uuidmapping in a table.
Thank you. I will check your advice.
Quoted 2 lines
If you're looking for source code, check out
script/lua/grub_lib.c
I would have prefered documentation but source code is ok.
I will, of course, report back with more improvements/doubts on this subject.
Thank you again.
adrian15
Signature · 1 line
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10