Possible to get a variable from Grub2?
Have setup a system (one linux OS) that can either be a command line or gui experience and would like to be able to select which version to run at the grub2 menu.
I have carried out a command line installation of Xubuntu 10.04 then added openbox. I use SLiM (Simple Login Manager), which has an entry in rc.local to run it.
Xubuntu offers no way of booting to the cli - that I can find, and SLiM seems to offer no way of turning it off.
So is there any way a bash script could pick up which menu entry in grub2 was selected to be run, to then select whether SLiM should be run or not? I am thinking if I have custom / bespoke menu entries then these would be easier to find.
Example script (in English!) to put in rc.local:
Or is there a better way?
menu=Collect name of grub2 entry selected << how to do this bit?
if $menu = SLiM then
( no, the "text" kernel option doesn't work with SLiM)
( I can't find a way to start up with runlevel 1 without invoking recovery mode or dropping to a root shell)
Happy to try just about anything (apart from working with animals or children) to solve this!
Last edited by Jose Catre-Vandis; April 7th, 2011 at 09:06 PM.
Reason: sppeling :)
No longer participating......