Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub script tester/simulator.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
TheLexx
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2005
Posts: 137
Location: Austin Tx

PostPosted: Wed Mar 22, 2017 10:17 pm    Post subject: Grub script tester/simulator. Reply with quote

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
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Fri Mar 24, 2017 12:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum