View previous topic :: View next topic |
Author |
Message |
TheLexx Tux's lil' helper
Joined: 04 Dec 2005 Posts: 137 Location: Austin Tx
|
Posted: Wed Mar 22, 2017 10:17 pm Post subject: Grub script tester/simulator. |
|
|
I use grub2 and my own custom scripts. When modifying my scripts, I have found that it I make an error it can be quite tricky to hunt down the error. This is due to the fact that when the grub is running, the computer has very limited operation.
I have been wondering if there is a sort of grub script runner/simulater that goes through and evaluates the code like the running grub. I know it would have limitations because it wouldn't do loopback mounting and other similar things. But, It could evaluate the variables and follow branches. Then when it gets to the "linux" and the "initrd" lines it could report back the final values
I found a program called "grub2-script-check" but it has no documentation and it does not seam to do anything.
In the past it took me forever to find a simple valuable name problem. It seems that a simple emulator would have helped |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Fri Mar 24, 2017 12:51 am Post subject: |
|
|
I use the edit mode from grub2 to debug.
you could set up a pendrive with your custom grub2 script and use the edit mode for example. |
|
Back to top |
|
|
|