Hey guys and welcome back. Now in the previous nugget we had talked about Grubb Legacy and
we did mention and I suppose the name will give you a little bit of a hint that Grubb
Legacy is Legacy and it's not the most updated version. We now have Grubb 2 and this is really
what we're going to be seeing on modern Linux based systems. Now the reason why is that it
does bring with it several improvements. One of the improvements it brings is the fact that it
has UUID support which makes things much much easier and it handles our Grubb configuration
file and the generation of that configuration file any more programmatic way. Simply put,
Grubb 2 just is easier to use and much better designed. Now with respect to Grubb 2 we do
have some particular locations that we do want to be aware of. Now the first location we want to
check out is in the Etsy directory and in the Grubb.D directory within that. What you're going to
find within this directory right here are a whole bunch of templates and another very important
file is also within the Etsy directory but it's going to be Etsy defaults forward slash Grubb. Now
one thing to note here is that see this file right here in conjunction with the templates and the
Etsy GrubbD directory. They are actually used together to generate a Grubb.Cfg file. So with the
Grubb legacy you would just go in and modify the Grubb.Cfg file directly. In this case here we do
not modify the Grubb.Cfg itself. If we want to make changes to what will ultimately be our Grubb
configuration file we want to do it via modification of those templates within the Etsy Grubb.D
directory or the Etsy default Grubb file which contains some very particular settings. So let
me actually show you the templates as well as our settings file that will be used to generate this
Grubb configuration file. Okay so if we go in to the Etsy directory and then into Grubb.D if we do
an LS we're actually going to see these configuration template files. Now we can actually go in and
look at these if we so choose. Let's go into maybe say Debian theme so 05 and hit enter and we can see
what we have in here. This is ultimately a long bash script. Okay so if we escape out notice we
have these custom templates. Now these are the files we would like to be editing. If we want to
create some custom menu entries remember we talked about the Grubb menu file earlier on and the
previous nuggets. If we want to generate new entries we could do so by amending to this custom
file right here this custom template so to speak. Now this is just one location that we have to
check like I say we also want to be looking at the default directory and within here we will have
this Grubb file. Okay so let me go in here so nano Grubb and we can see here this is a settings
file and like I say this is going to be used in conjunction with the templates we see in the
Etsy Grubb.D directory. Now what we are actually looking at here is not too dissimilar to what we
talked about in the previous nuggets. Remember we talked about a default value with respect to the
options within our Grubb menu. The 0 being the option at the very top and if we happen to change
this to the number 1 that would mean we were choosing the second from the top. This is the same
type of deal this time though for Grubb 2 so we use the Grubb underscore default option and if we
want to automatically select the option at the top once that timer has elapsed we would leave
that value at the value 0. However if we wanted to choose the second from the top by default once
the timer elapses we would change that to the value 1 so on so forth. Now the next value we
can see here is the Grubb timeout style we have the value hidden. This is similar to what we saw
before when we talked about the hidden menu option with respect to the Grubb legacy. When we have
the Grubb timeout style set to hidden the title menu is not going to be displayed during the actual
timeout countdown. Now the Grubb timeout we have right here again we can change this value if we
choose this is how many seconds should we wait before we actually boot to the default. Now right
now we have the value at 0 which means that we're not going to wait at all. If we wanted to modify
this we could change this to 5 which would be 5 seconds or 30 which would be 30 seconds or if we
so choose we could actually set the value to negative 1. Now what this would actually mean is
that we would wait forever we would actually not count down and then load in a default option instead
we would actually require that the user is explicit and chooses the option because quite simply we
would just wait and wait and wait until they did so. Now we can see some other options here we can
see Grubb command line Linux this is if we want to pass in additional parameters to the kernel
such as the RHGB option that we talked about in the previous nuggets which would be the red hat
graphical boots and if we wanted to use this with the quiet option we could also pass in the value
quiet and we can also see the Grubb command line Linux defaults and as we can see here we're passing
the values quiet and splash so quiet to suppress the output splash to actually get that splash menu.
Now like I say this settings file in conjunction with the templates found in our Grubb.d directory is
going to allow us to generate this Grubb.cfg.config file now as it stands right now if I just do
a clear and I go to my boot directory we do an LS I have this directory here called Grubb now some
distributions may actually have a directory called Grubb2 but on my Ubuntu machine or my
Zubuntu machine this directory is just called Grubb now within here this is where the Grubb.cfg
file is going to be located so if I actually go in and look at this file right here notice this
file looks much much different from the configuration file I talked about in the previous nuggets this
is much more programmatic and like I say it's going to be pulling from what we find within that Grubb.d
directory and the settings in our XA default Grubb file now what if we wanted to change this Grubb.cfg
file ie we wanted to modify some of the values within this directory here our configuration
templates or we wanted to modify the actual settings within this file right here how would we
actually generate that new file well let me show you what I can do here okay so like we can see
here we do have this Grubb configuration file if we wanted though to generate a new configuration
file from our templates and from our settings file how could we do such a thing well first we
would make a modification that we wanted to implement either within one of our template files right
here or alternatively we could go into our settings file right here so let's say I would change the
Grubb default value from 0 to 1 and maybe the timeout will change it to 5 seconds so I'll save
this and I'll push X so now what I will do is I will actually go to my boot menu so here we are
and I have a command that I can use to generate this configuration file now be careful this
command is actually different if you're using a Debian based system or a Red Hat based system if
we are using a Debian based system the command is going to be Grubb-MKconfig and if you're on a Red
Hat based system that would actually be Grubb2-MKconfig but like I say I happen to be on Ubuntu
which is derived from Debian so I will use Grubb-MKconfig and I'll just say dash 0 to specify
the output file that I'm going to generate and I'll just call this my new Grubb stuff touch CFG
and if I enter now nothing is going to happen because I have to run this as root of course so I'll
try this again and now we're going to generate this new configuration file if I do an LS we can see
here we have now generated this new file here again pulling from those two different locations so now
I could go in and have a look at this file that I have generated we can see all this programmatic
stuff has been automatically generated okay let's go back and what I would do is I would actually
move this file into the same directory as my Grubb configuration file which is in this directory
here this might be Grubb2 for you okay so I've moved it in I go into this directory now we can see
the Grubb configuration file and my newly generated one ultimately I would back this one up and I
would rename this one the new one Grubb.Cfg and if I wanted to install this I could use my Grubb
install command and then specify the location of where I want to install this now one thing I really
do want to get to though and what I'll do is I'll actually terminate my SSH session right here and
I'll just go directly to my virtual machine now what I'm going to do here is to restart my system
and I'm going to try to access the Grubb menu now depending on whatever system you're using the way
you do this may vary on my Windows machine the key the time going to press is the escape key you might
be on a system whereby you might have to press the shift key so if you're having trouble doing this
like I say there may be some variation you may have to do a little bit of googling to get the
correct key for your system so what I will do here is I'll press restart and I'll press restart and
I'll hit the escape key so now this brings me to this menu right here okay now what I'm going to do
is I'm actually going to choose advanced options for Ubuntu and click this now if I try to full
screen this it's not going to show the full screen unfortunately so I'm just going to change the view
to scaled mode so it might look a little bit pixelated I do apologize now down the bottom here
we can see we have these different options if I press the letter C this is going to bring me into
a command line interface and as we can see here this is a minimal bash like interface and this is
a prompt you may be presented with if you happen to have a severe issue on your machine now if I
do the command ls we're actually going to see information relating to our disk so I can see
HD 0 here that denotes the first disk ms-dOS 5 this is actually my partition information this is
going to be sda5 so to speak this happens to be where my file system is mounted and this part here
this is where my boot is mounted so if I actually happen to do ls and I select my root file system
so I'll do HD and I can select ms-dOS 5 but I can just select the value 5 okay if I hit enter here
it tells me the file system type ext we get the uuid as well as some basic partition information
now if I happen to choose the forward slash for the root file system watch what happens see this
this is just like what we see on our Linux base system here are all of our folders see this lost
and found boot swap file say for example home so if I arrow up and I choose home we can see the IPv0
folder so I can go into IPv0 we can see all my downloads and desktop folders so on so forth so
we can still navigate our file system now you may recall when we talked about our grub legacy
configuration file let me just bring this back up do you remember these settings here roots kernel
and knit rd well we want to ultimately do a similar thing right here but there is a little bit
of variation one thing to note here is that this option here kernel this is going to look a little
bit different when we're using grub 2 the value is going to be the word linux not the word kernel
so I'm going to say set root and give it a particular value but as opposed to saying set kernel I'm
going to say linux and then give the name of the kernel as well as where the root file system should
be mounted whereas the init rd value this is going to be the exact same so the only real variation
here is going to be this value here kernel will be instead the word linux so if we want to see what
our values are right now we can just type the command set and this will show everything that we have
already set so we can see here the roots right here is the hd0 ms dos 5 that is the disc and the
partition and if we actually want to be able to see this a little bit better I will just set the
pager value to 1 and I'll now say set now I can just spacebar down so we can see the very top and
hit spacebar to scroll down okay so let's actually type in these three values the root value the linux
value as well as the init rd value so I'll just say set roots equal to and I'll just say hd0 and I
can say ms dos 5 but I'll just leave it at 5 so if I hit enter that would be that value set now like
I say I'm actually not changing any particular values the values I have happen to be working I'm
just showing how you could actually change these values if you needed to now like I say we have to
specify where the kernel is and where we should mount the root file system we're not going to use
the command kernel instead we're going to use the command linux now whereabouts is the kernel image
found it's found within the boot directory and all the images are going to start with vm lin if I do
vm lim and hit tab we're going to see all the options the one that I'm going to choose is the one I'm
already using right now which is vm linux 5 13028 and I can tab this out and I have to specify where
the root file system is going to be I'm going to say root is equal to forward slash dev forward slash
sda5 so if I hit enter here that is going to set that value the third value is going to be the init
rd value now remember just like we talked about the version number here has to match okay so 5
13028 I have to use the same init rd image so I'll say init rd boot and the image will be init
rd and I can hit tab we can see I have 5 11 027 that is not the one I want I wanted to match
this one right here so 5 13028 which is this one right here so I will say 5 dot 13 I can
tab this out and to enter so that is my three values now set my root value my linux value and my
init rd value I will just hit boots and now it should begin booting up and if you just give it a
minute I'm now able to log in to my machine so I'll type in my username and then my password
and there we go so I can just log in and now I have full access back to my system
I can do a uname dash r we can see this is the kernel I had I didn't actually change anything
we're going to see debuts to an ls and we can see here this was the image I used for the kernel
and correspondingly this was the image I used for my init rd again notice that the numbers
happen to match 5 13028 and 5 13028 matching correctly so clearly I happen to force myself
into the grub menu but if you happen to find yourself in that unfortunate situation where
you try to boot up and it automatically loads in you know the settings that you can use to try
to boot back into your system you want to specify your linux value pointing to the correct kernel
image as well as the correct corresponding init rd image once you do that you can use the boot
command and hopefully if all is successful you should be able to boot back into your machine
okay dox I hope this has been informative for you and I'd like to thank you for viewing