You were right. In this case these variables will not be honored.
However, you can have a script to do that. I meant to put your variables in your scripts, then assign ocs_prerun to run your script. This is more flexable.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This would be fine, where do I have to put the file in my pen drive? Serahced for a while in the web (maybe with the wrong search..) and did not find anything enlightning.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For live USB flash drive, the root (/) directory is mounted as /run/live/medium/, hence you can put your script in the root (/) directory of USB flash drive, and when it's booted, assign it as something like ocs_prerun="bash /run/live/medium/myscript.sh"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The script hint was great, I used it since. A problem with variables in grub ist also, that variables are not accessible if you try to use them in submenues, eveything defined outside the submenu is inaccessible, because this menue is started in a new context. Discovered it recently as I tried to use variables for the parameters in once. If I use onyl a flat menue everthing runs smooth.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, can I set own variables in grub.cfg and use them in ocs_prerunXX? Tried a couple of thing, did not work and Google could not help.
Shalom
F. :-)
What were the variables you have used? Please show some examples so that people can judge for you.
Tried set variable="mount......"
Then using it in ocs_prerun="%variable%" and "$variable" and so.
You were right. In this case these variables will not be honored.
However, you can have a script to do that. I meant to put your variables in your scripts, then assign ocs_prerun to run your script. This is more flexable.
This would be fine, where do I have to put the file in my pen drive? Serahced for a while in the web (maybe with the wrong search..) and did not find anything enlightning.
For live USB flash drive, the root (/) directory is mounted as /run/live/medium/, hence you can put your script in the root (/) directory of USB flash drive, and when it's booted, assign it as something like ocs_prerun="bash /run/live/medium/myscript.sh"
sounds great, will test it. Thanks for the help.
The script hint was great, I used it since. A problem with variables in grub ist also, that variables are not accessible if you try to use them in submenues, eveything defined outside the submenu is inaccessible, because this menue is started in a new context. Discovered it recently as I tried to use variables for the parameters in once. If I use onyl a flat menue everthing runs smooth.