1
00:00:00,000 --> 00:00:17,920
Hey guys and welcome back. So in the previous nugget we had talked about the boot process

2
00:00:17,920 --> 00:00:24,560
with respect to our Linux system and we happened to mention the concept of boot loaders. Now

3
00:00:24,560 --> 00:00:29,000
I did say we had two different boot loaders, there actually are more we'll get to look

4
00:00:29,000 --> 00:00:34,759
at some more a little bit later on but the main ones we want to focus in on are Grubb

5
00:00:34,759 --> 00:00:41,079
and then after this nugget right here we'll talk about Grubb 2 which was the replacement

6
00:00:41,079 --> 00:00:48,439
but for now let's begin with Grubb itself. So Grubb like I say otherwise known as legacy Grubb

7
00:00:48,439 --> 00:00:56,519
since it has been ultimately replaced this stands for the grand unified bootloader GRUB.

8
00:00:56,520 --> 00:01:02,440
Now the Grubb bootloader ultimately replaced older systems such as Lilo which we will talk

9
00:01:02,440 --> 00:01:08,200
about very very shortly but eventually as good as Grubb was and as much of an improvement over

10
00:01:08,200 --> 00:01:15,079
Lilo that it was it did eventually run into some limitations. So as such you really are not going

11
00:01:15,079 --> 00:01:21,800
to see the original Grubb in use very much anymore and the reality is we just have to understand

12
00:01:21,799 --> 00:01:26,920
this information for both historical purposes and really for the purposes of the examination

13
00:01:26,920 --> 00:01:34,439
because this is still a subject whereby you may receive questions on. Now with respect to legacy

14
00:01:34,439 --> 00:01:39,159
Grubb what we want to understand are some key components the first thing which I want to talk

15
00:01:39,159 --> 00:01:47,719
to you about is the Grubb legacy configuration file. Now this is going to be at a particular location

16
00:01:47,719 --> 00:01:54,599
and that location is going to be in the boot directory and then within this the Grubb directory

17
00:01:54,599 --> 00:02:01,239
and then the file will be called grubb.con so really try to remember the name of this file here.

18
00:02:01,239 --> 00:02:08,280
Now like I say because we have the updated version of Grubb Grubb too now it really isn't quite so

19
00:02:08,280 --> 00:02:14,199
easy to be able to get your hands on an old configuration file but for the purposes of letting

20
00:02:14,199 --> 00:02:20,359
you see what one may look like I have created my own right here. So this is not a complete

21
00:02:20,359 --> 00:02:25,399
configuration file most of the information has actually been removed but what we actually want

22
00:02:25,399 --> 00:02:32,519
to know for the purposes of the examination I have included. So when we look at this configuration file

23
00:02:32,519 --> 00:02:37,639
we have some particular settings we can see these on the left here things like the default setting

24
00:02:37,639 --> 00:02:44,120
or the timeout setting or the splash menu or the hidden menu so on so forth. We want to understand

25
00:02:44,519 --> 00:02:50,519
what these settings actually are and what they're doing. Now with respect to the very first setting

26
00:02:50,519 --> 00:02:54,439
the default setting let's talk about that for a moment. So let me show you what I mean when I

27
00:02:54,439 --> 00:02:59,959
say this. All I'll do here is search for Grubb menu and you can kind of get an idea what I'm talking

28
00:02:59,959 --> 00:03:06,039
about here. So we can see this little menu here okay now the one at the very top here this is the

29
00:03:06,039 --> 00:03:10,439
operating system with the particular kernel we're going to be loading into. Now what we're looking

30
00:03:10,439 --> 00:03:16,520
at here are all these different titles okay. Now if you don't actually change the title i.e. what we

31
00:03:16,520 --> 00:03:22,840
have selected to maybe be another option say for example this one here and you can do this by using

32
00:03:22,840 --> 00:03:29,079
your arrow keys to arrow down to the option you want to choose. If a particular title is not

33
00:03:29,079 --> 00:03:35,639
selected before a particular timeout value has exhausted itself the one that is going to be

34
00:03:35,639 --> 00:03:43,000
selected is the one at the very top. Now this is going to be assigned a value of zero whereas the

35
00:03:43,000 --> 00:03:49,639
second title the one below that would be assigned the value one. So if we happen to change this value

36
00:03:49,639 --> 00:03:57,479
here to maybe be the value one if we go back and we look at the menu option here the one which would

37
00:03:57,479 --> 00:04:04,679
load if we do not select anything by the time the timer exhaust itself will be option number one.

38
00:04:04,680 --> 00:04:10,840
So the very first one would be zero the next one would be one the next one would be two so one so

39
00:04:10,840 --> 00:04:17,079
four so if we set the value to one as the default that means if we don't select anything it's going

40
00:04:17,079 --> 00:04:24,280
to be this one here that is going to automatically load you see that that will be our default option

41
00:04:24,280 --> 00:04:29,240
and like i say to start off with the default is going to be zero which will be the very top one

42
00:04:29,240 --> 00:04:35,480
right here so we can toggle that value. Now we just happen to mention the concept of a timeout

43
00:04:35,480 --> 00:04:41,879
whenever a timer runs out we will select by default a particular option. Now the value

44
00:04:41,879 --> 00:04:47,960
of how long we want to wait can be denoted right here so what we have right here and my little

45
00:04:47,960 --> 00:04:54,680
example here is the value of five this denotes five seconds that means that once we begin to load

46
00:04:54,759 --> 00:05:00,759
up we're going to have five seconds to choose a particular option and if we do not choose anything

47
00:05:00,759 --> 00:05:08,199
by default we will choose value number one so all this timeout here is ultimately a countdown

48
00:05:08,199 --> 00:05:14,280
and it's a countdown in seconds so you could if you so choose extend this to be much longer say

49
00:05:14,280 --> 00:05:19,639
for example 30 seconds or you could put it down to one second if you want this is ultimately up to

50
00:05:19,639 --> 00:05:27,560
you so now we move to our next option the splash menu all this is is the graphic displayed when

51
00:05:27,560 --> 00:05:32,360
you're going to see that grub but menu we just saw there now what we're looking at right here

52
00:05:32,360 --> 00:05:40,919
happens to be a particular image and it's going to require this particular extension xpm.gz

53
00:05:40,919 --> 00:05:48,120
with xpm actually denoting the graphic format in gz you may recall just means it is a compressed

54
00:05:48,120 --> 00:05:55,000
image now we also have this option here for a hidden menu one thing to note here is that this

55
00:05:55,000 --> 00:06:00,920
menu doesn't actually have a correlating value you see the way before we had this equal sign here

56
00:06:00,920 --> 00:06:06,519
and equals here and equals here to give each option a particular value in the case of default the

57
00:06:06,519 --> 00:06:12,439
value is one in the case of timeout the value is five so on so forth with hidden menu we do not have

58
00:06:12,439 --> 00:06:19,560
any equals sign we do not have a value to correlate simply puts if this option here happens to be

59
00:06:19,560 --> 00:06:25,000
present within the configuration file which in my case right here it is the grub menu is not going

60
00:06:25,000 --> 00:06:31,319
to be displayed instead the only thing you're going to see is that countdown timer so that means

61
00:06:31,319 --> 00:06:37,959
that if you happen to press a key on the keyboard before the timeout actually ends then you will

62
00:06:37,959 --> 00:06:45,239
actually see the graphic menu but otherwise it's going to be hidden away from view now the next thing

63
00:06:45,239 --> 00:06:50,199
we want to talk about is this portion right here and this really is i would say more of an important

64
00:06:50,199 --> 00:06:55,959
portion to focus in on because well the top part is still quite important it's ultimately window

65
00:06:55,959 --> 00:07:01,639
dressing so to speak but is this part here is definitely not the title okay so what is this

66
00:07:01,639 --> 00:07:07,000
part right here so the title is basically what is going to be the name that is going to be displayed

67
00:07:07,000 --> 00:07:13,399
in the grub menu when the actual boot process happens now typically you want to display the name

68
00:07:13,399 --> 00:07:20,279
of the distribution as well as the kernel version for that distribution so if we happen to go again

69
00:07:20,279 --> 00:07:26,519
and look at the example from the boot menu we can see here we have ubuntu on the left here

70
00:07:26,519 --> 00:07:33,160
which is the distro and we can see the linux kernel version that it's going to be using in this case

71
00:07:33,160 --> 00:07:38,280
here you kind of get the drift we want to be pretty descriptive about what it is that is actually going

72
00:07:38,280 --> 00:07:46,600
to be loaded up so really what we see here is ubuntu with linux 380-35 generic with this configuration

73
00:07:46,600 --> 00:07:53,480
file what you would see in the menu is sent os and then 2717 now it's important to note that you do

74
00:07:53,480 --> 00:07:59,480
not have to specify this particular format it just is kind of deemed good practice because it is

75
00:07:59,480 --> 00:08:05,160
pretty descriptive now the next thing we want to talk about is this setting right here the root

76
00:08:05,160 --> 00:08:10,360
setting okay now what this is going to do this is going to point to the device that actually has

77
00:08:10,360 --> 00:08:18,840
the boot files so that would mean the kernel file and the init rd file now you might be noticing

78
00:08:18,840 --> 00:08:24,040
that below these are two settings we're going to see here this is exactly what we're talking about

79
00:08:24,040 --> 00:08:29,319
but with respect to this part right here all we are doing is trying to locate where about on the

80
00:08:29,399 --> 00:08:37,799
disk we can find such things now one thing here which is worth a note we see this value here hd0

81
00:08:38,679 --> 00:08:45,080
0 okay now the thing to note straight away is that with respect to grub we have no distinction

82
00:08:45,080 --> 00:08:53,080
between ide devices and sata devices so you may recall from the lpik one we saw things such as

83
00:08:53,080 --> 00:09:00,680
maybe hd a which would be our ide and we would also have sda which would be our sata disks notice

84
00:09:00,680 --> 00:09:06,520
here we're actually making no such distinction we actually can't tell if this is ide or sata it's

85
00:09:06,520 --> 00:09:14,280
just hd0 0 now the part which is pretty confusing and this is what actually is going to be a little

86
00:09:14,279 --> 00:09:26,839
bit different so when we see hd0 0 what this is actually pointing to is sda1 or if you wish hda1

87
00:09:26,839 --> 00:09:34,360
but the point i'm making here is that this value here denotes the very first disk and this value

88
00:09:34,360 --> 00:09:42,039
here denotes the very first partition so what i'm saying here is is that if we see the value 0 it

89
00:09:42,039 --> 00:09:47,399
actually means the first partition whereas we typically would be looking at something like say

90
00:09:47,399 --> 00:09:54,839
sda1 and the value 1 would mean the first partition not in this case here what we're seeing here is

91
00:09:54,839 --> 00:10:01,399
that the value 0 actually correlates to the first partition as well as the first disk so if we happen

92
00:10:01,399 --> 00:10:08,360
to have the value hd and then 0 1 for example well we would know this would be on the first disk so

93
00:10:08,360 --> 00:10:15,480
that would be something like say sda a being the first disk and the one would actually be the second

94
00:10:15,480 --> 00:10:21,560
partition which should be number two right here so this part sometimes catches people out because

95
00:10:21,560 --> 00:10:28,039
we are starting from the zero value and not the value one so ultimately this is where we're going

96
00:10:28,039 --> 00:10:35,560
to be able to find our kernel image and our initrd image i.e. what disk in what partition

97
00:10:35,559 --> 00:10:41,639
but the name of the kernel image we want to be using is going to be specified at this part here

98
00:10:41,639 --> 00:10:46,519
using the kernel keyword so the actual kernel we would be using would be in the boot directory

99
00:10:46,519 --> 00:10:54,119
and it would be called this right here in my case vmlinnus2717 our all would mean read only and then

100
00:10:54,119 --> 00:11:00,919
what we have to do in this part really is crucial we have to specify where we're going to mount the

101
00:11:00,919 --> 00:11:07,079
root file system now these two values we're going to see afterwards these actually relate to red hat

102
00:11:07,079 --> 00:11:14,360
based systems what rhgb actually stands for is the red hat graphical boot this is just simply a

103
00:11:14,360 --> 00:11:19,319
graphical user interface that is going to boot with most of the information hidden and this is

104
00:11:19,319 --> 00:11:25,319
what we're doing when we specify this quiet option we want to hide the majority of the boot messages

105
00:11:25,320 --> 00:11:34,600
now that is the kernel location the initrd again going to be within the boot directory on the first

106
00:11:34,600 --> 00:11:40,600
disk of the first partition of the hard drive and the name of the initrd image is going to be in this

107
00:11:40,600 --> 00:11:49,480
case here initrd2717 image now one thing we want to be aware of is that our initrd is going to

108
00:11:49,480 --> 00:11:55,480
reference a particular kernel number which we can see here and we absolutely want to make sure that

109
00:11:55,480 --> 00:12:01,399
that number matches what the kernel is we have here if we have a mismatch here then we're going to be

110
00:12:01,399 --> 00:12:06,279
in trouble we're not going to be able to get things to work correctly so that really is us for our

111
00:12:06,279 --> 00:12:12,039
little introduction into grub legacy like I say we are kind of limited as to what we can actually do

112
00:12:12,039 --> 00:12:18,120
because this is a legacy based system but what we have learned here is actually quite transferable

113
00:12:18,120 --> 00:12:22,759
to what we're going to see with respect to grub2 and that is what we're going to be looking at in

114
00:12:22,759 --> 00:12:28,120
the very next nuggets I hope this has been informative for you I'd like to thank you for viewing

