Hey guys and welcome back. So in the previous nugget we had talked about the boot process
with respect to our Linux system and we happened to mention the concept of boot loaders. Now
I did say we had two different boot loaders, there actually are more we'll get to look
at some more a little bit later on but the main ones we want to focus in on are Grubb
and then after this nugget right here we'll talk about Grubb 2 which was the replacement
but for now let's begin with Grubb itself. So Grubb like I say otherwise known as legacy Grubb
since it has been ultimately replaced this stands for the grand unified bootloader GRUB.
Now the Grubb bootloader ultimately replaced older systems such as Lilo which we will talk
about very very shortly but eventually as good as Grubb was and as much of an improvement over
Lilo that it was it did eventually run into some limitations. So as such you really are not going
to see the original Grubb in use very much anymore and the reality is we just have to understand
this information for both historical purposes and really for the purposes of the examination
because this is still a subject whereby you may receive questions on. Now with respect to legacy
Grubb what we want to understand are some key components the first thing which I want to talk
to you about is the Grubb legacy configuration file. Now this is going to be at a particular location
and that location is going to be in the boot directory and then within this the Grubb directory
and then the file will be called grubb.con so really try to remember the name of this file here.
Now like I say because we have the updated version of Grubb Grubb too now it really isn't quite so
easy to be able to get your hands on an old configuration file but for the purposes of letting
you see what one may look like I have created my own right here. So this is not a complete
configuration file most of the information has actually been removed but what we actually want
to know for the purposes of the examination I have included. So when we look at this configuration file
we have some particular settings we can see these on the left here things like the default setting
or the timeout setting or the splash menu or the hidden menu so on so forth. We want to understand
what these settings actually are and what they're doing. Now with respect to the very first setting
the default setting let's talk about that for a moment. So let me show you what I mean when I
say this. All I'll do here is search for Grubb menu and you can kind of get an idea what I'm talking
about here. So we can see this little menu here okay now the one at the very top here this is the
operating system with the particular kernel we're going to be loading into. Now what we're looking
at here are all these different titles okay. Now if you don't actually change the title i.e. what we
have selected to maybe be another option say for example this one here and you can do this by using
your arrow keys to arrow down to the option you want to choose. If a particular title is not
selected before a particular timeout value has exhausted itself the one that is going to be
selected is the one at the very top. Now this is going to be assigned a value of zero whereas the
second title the one below that would be assigned the value one. So if we happen to change this value
here to maybe be the value one if we go back and we look at the menu option here the one which would
load if we do not select anything by the time the timer exhaust itself will be option number one.
So the very first one would be zero the next one would be one the next one would be two so one so
four so if we set the value to one as the default that means if we don't select anything it's going
to be this one here that is going to automatically load you see that that will be our default option
and like i say to start off with the default is going to be zero which will be the very top one
right here so we can toggle that value. Now we just happen to mention the concept of a timeout
whenever a timer runs out we will select by default a particular option. Now the value
of how long we want to wait can be denoted right here so what we have right here and my little
example here is the value of five this denotes five seconds that means that once we begin to load
up we're going to have five seconds to choose a particular option and if we do not choose anything
by default we will choose value number one so all this timeout here is ultimately a countdown
and it's a countdown in seconds so you could if you so choose extend this to be much longer say
for example 30 seconds or you could put it down to one second if you want this is ultimately up to
you so now we move to our next option the splash menu all this is is the graphic displayed when
you're going to see that grub but menu we just saw there now what we're looking at right here
happens to be a particular image and it's going to require this particular extension xpm.gz
with xpm actually denoting the graphic format in gz you may recall just means it is a compressed
image now we also have this option here for a hidden menu one thing to note here is that this
menu doesn't actually have a correlating value you see the way before we had this equal sign here
and equals here and equals here to give each option a particular value in the case of default the
value is one in the case of timeout the value is five so on so forth with hidden menu we do not have
any equals sign we do not have a value to correlate simply puts if this option here happens to be
present within the configuration file which in my case right here it is the grub menu is not going
to be displayed instead the only thing you're going to see is that countdown timer so that means
that if you happen to press a key on the keyboard before the timeout actually ends then you will
actually see the graphic menu but otherwise it's going to be hidden away from view now the next thing
we want to talk about is this portion right here and this really is i would say more of an important
portion to focus in on because well the top part is still quite important it's ultimately window
dressing so to speak but is this part here is definitely not the title okay so what is this
part right here so the title is basically what is going to be the name that is going to be displayed
in the grub menu when the actual boot process happens now typically you want to display the name
of the distribution as well as the kernel version for that distribution so if we happen to go again
and look at the example from the boot menu we can see here we have ubuntu on the left here
which is the distro and we can see the linux kernel version that it's going to be using in this case
here you kind of get the drift we want to be pretty descriptive about what it is that is actually going
to be loaded up so really what we see here is ubuntu with linux 380-35 generic with this configuration
file what you would see in the menu is sent os and then 2717 now it's important to note that you do
not have to specify this particular format it just is kind of deemed good practice because it is
pretty descriptive now the next thing we want to talk about is this setting right here the root
setting okay now what this is going to do this is going to point to the device that actually has
the boot files so that would mean the kernel file and the init rd file now you might be noticing
that below these are two settings we're going to see here this is exactly what we're talking about
but with respect to this part right here all we are doing is trying to locate where about on the
disk we can find such things now one thing here which is worth a note we see this value here hd0
0 okay now the thing to note straight away is that with respect to grub we have no distinction
between ide devices and sata devices so you may recall from the lpik one we saw things such as
maybe hd a which would be our ide and we would also have sda which would be our sata disks notice
here we're actually making no such distinction we actually can't tell if this is ide or sata it's
just hd0 0 now the part which is pretty confusing and this is what actually is going to be a little
bit different so when we see hd0 0 what this is actually pointing to is sda1 or if you wish hda1
but the point i'm making here is that this value here denotes the very first disk and this value
here denotes the very first partition so what i'm saying here is is that if we see the value 0 it
actually means the first partition whereas we typically would be looking at something like say
sda1 and the value 1 would mean the first partition not in this case here what we're seeing here is
that the value 0 actually correlates to the first partition as well as the first disk so if we happen
to have the value hd and then 0 1 for example well we would know this would be on the first disk so
that would be something like say sda a being the first disk and the one would actually be the second
partition which should be number two right here so this part sometimes catches people out because
we are starting from the zero value and not the value one so ultimately this is where we're going
to be able to find our kernel image and our initrd image i.e. what disk in what partition
but the name of the kernel image we want to be using is going to be specified at this part here
using the kernel keyword so the actual kernel we would be using would be in the boot directory
and it would be called this right here in my case vmlinnus2717 our all would mean read only and then
what we have to do in this part really is crucial we have to specify where we're going to mount the
root file system now these two values we're going to see afterwards these actually relate to red hat
based systems what rhgb actually stands for is the red hat graphical boot this is just simply a
graphical user interface that is going to boot with most of the information hidden and this is
what we're doing when we specify this quiet option we want to hide the majority of the boot messages
now that is the kernel location the initrd again going to be within the boot directory on the first
disk of the first partition of the hard drive and the name of the initrd image is going to be in this
case here initrd2717 image now one thing we want to be aware of is that our initrd is going to
reference a particular kernel number which we can see here and we absolutely want to make sure that
that number matches what the kernel is we have here if we have a mismatch here then we're going to be
in trouble we're not going to be able to get things to work correctly so that really is us for our
little introduction into grub legacy like I say we are kind of limited as to what we can actually do
because this is a legacy based system but what we have learned here is actually quite transferable
to what we're going to see with respect to grub2 and that is what we're going to be looking at in
the very next nuggets I hope this has been informative for you I'd like to thank you for viewing