WEBVTT - This file was automatically generated by VIMEO

0
00:00:04.500 --> 00:00:07.800
Hello everyone and

1
00:00:07.800 --> 00:00:08.800
 welcome to this video.

2
00:00:09.600 --> 00:00:12.600
So in this video we are going to see the Linux boot

3
00:00:12.600 --> 00:00:15.300
 process. Now every one of you must

4
00:00:15.300 --> 00:00:18.400
 be knowing that whenever we press the power

5
00:00:18.400 --> 00:00:22.000
 button our computer gets started, but what

6
00:00:21.900 --> 00:00:25.000
 actually happening behind the

7
00:00:24.400 --> 00:00:27.400
 hood in the background is very

8
00:00:27.400 --> 00:00:29.200
 important to know and understand.

9
00:00:30.400 --> 00:00:33.900
There is the reason we are going to understand the Linux

10
00:00:33.900 --> 00:00:36.700
 boot process and how a system

11
00:00:36.700 --> 00:00:40.300
 actually starts. So it

12
00:00:39.300 --> 00:00:42.600
 follows six high level

13
00:00:42.600 --> 00:00:45.800
 steps in the boot process and we

14
00:00:45.800 --> 00:00:48.300
 are going to understand each one of

15
00:00:48.300 --> 00:00:50.400
 them one by one in depth

16
00:00:51.100 --> 00:00:54.800
So let's begin with the first one which is bios.

17
00:00:55.400 --> 00:00:59.000
So bios stands for basic input

18
00:00:58.700 --> 00:01:02.200
 output system, which execute the

19
00:01:01.200 --> 00:01:02.700
 MBR?

20
00:01:03.600 --> 00:01:07.000
The second one is MBR which stands

21
00:01:06.200 --> 00:01:09.600
 for master boot record, which

22
00:01:09.600 --> 00:01:12.300
 then executes the grub.

23
00:01:13.500 --> 00:01:16.900
The full form of grub is Grand unified

24
00:01:16.900 --> 00:01:19.900
 bootloader which then in

25
00:01:19.900 --> 00:01:21.800
 turn execute the kernel.

26
00:01:23.200 --> 00:01:26.700
Next is the kernel which is also known as the

27
00:01:26.700 --> 00:01:30.000
 heart of the computer which executes the

28
00:01:29.800 --> 00:01:32.200
 sin and the init programs.

29
00:01:33.200 --> 00:01:36.700
Next is in it, which is also known as

30
00:01:36.700 --> 00:01:40.200
 initialization which executes the

31
00:01:39.200 --> 00:01:42.700
 Run level programs into the Linux system.

32
00:01:43.800 --> 00:01:46.600
The next one is the Run levels now

33
00:01:46.600 --> 00:01:49.400
 run level are the programs which are

34
00:01:49.400 --> 00:01:52.200
 executed from this directory, which is

35
00:01:52.200 --> 00:01:55.400
 slash Etc. / RC dot d

36
00:01:55.400 --> 00:01:59.200
 slash rc1.d RC

37
00:01:58.200 --> 00:02:01.700
 2 dot d, which has been demonstrated here

38
00:02:01.700 --> 00:02:03.800
 with rcstar.d.

39
00:02:04.500 --> 00:02:07.600
Now run levels are those levels in

40
00:02:07.600 --> 00:02:10.500
 which the Linux system will boot.

41
00:02:10.500 --> 00:02:13.600
 For example, there are multiple run levels

42
00:02:13.600 --> 00:02:16.300
 which start from run level 0 to run level

43
00:02:16.300 --> 00:02:19.300
 6, which we are going to understand in the later

44
00:02:19.300 --> 00:02:20.500
 part of the lesson.

45
00:02:23.500 --> 00:02:26.600
Now, let's quickly understand. What is bios

46
00:02:26.600 --> 00:02:29.500
 as we have learned. The full

47
00:02:29.500 --> 00:02:32.800
 form of BIOS is basic input output

48
00:02:32.800 --> 00:02:33.400
 system.

49
00:02:34.500 --> 00:02:37.500
Now what does actually the BIOS does

50
00:02:37.500 --> 00:02:40.400
 it performs the Integrity checks,

51
00:02:40.400 --> 00:02:43.200
 it also searches loads and

52
00:02:43.200 --> 00:02:45.200
 executes the bootloader program.

53
00:02:45.900 --> 00:02:49.600
Now whenever you start your computer bios quickly

54
00:02:49.600 --> 00:02:53.200
 checks for all the CD DVDs SD

55
00:02:52.200 --> 00:02:55.400
 cards and the hardest drives which have

56
00:02:55.400 --> 00:02:57.000
 been attached to your computer.

57
00:02:58.200 --> 00:03:01.500
It also checks the boot sequence now. If you

58
00:03:01.500 --> 00:03:04.400
 want to modify the boot sequence, you can press the keys

59
00:03:04.400 --> 00:03:07.400
 which is F12 or F2 and it

60
00:03:07.400 --> 00:03:09.900
 may also very based on your system.

61
00:03:11.700 --> 00:03:14.500
The next one is the MBR which stands

62
00:03:14.500 --> 00:03:17.800
 for the master. Boot record. Now, the

63
00:03:17.800 --> 00:03:21.000
 MBR is located into the first sector

64
00:03:20.600 --> 00:03:24.200
 of the bootable disk. It

65
00:03:23.200 --> 00:03:26.800
 is usually into this path,

66
00:03:26.800 --> 00:03:30.200
 which is slash Dev slash SDA where

67
00:03:29.200 --> 00:03:32.600
 Dev stretch for device or sometimes.

68
00:03:32.600 --> 00:03:36.100
 It's in slash Dev slash HD a

69
00:03:35.100 --> 00:03:38.700
 this is the first sector of

70
00:03:38.700 --> 00:03:39.800
 the bootable disc.

71
00:03:40.600 --> 00:03:44.600
Now it is always less than 512 bytes

72
00:03:44.600 --> 00:03:47.800
 in size and it has three major components

73
00:03:47.800 --> 00:03:50.300
 as you can see onto the right hand side

74
00:03:50.300 --> 00:03:53.600
 of the screen the first four four

75
00:03:53.600 --> 00:03:56.700
 six bytes are being assigned to the

76
00:03:56.700 --> 00:03:59.600
 primary bootloader info the next

77
00:03:59.600 --> 00:04:02.100
 64 bytes have been assigned to

78
00:04:02.100 --> 00:04:05.600
 the partition table and the last two bytes

79
00:04:05.600 --> 00:04:08.200
 are given to the grub, which we are

80
00:04:08.200 --> 00:04:09.100
 going to see the next.

81
00:04:10.800 --> 00:04:13.200
So what does grub stands for

82
00:04:13.200 --> 00:04:15.300
 and what is the importance of it?

83
00:04:15.900 --> 00:04:19.500
So grub stands for Grand unified bootloader.

84
00:04:20.200 --> 00:04:23.500
Now it chooses the kernel image to load

85
00:04:23.500 --> 00:04:26.100
 and it executes it later on.

86
00:04:26.900 --> 00:04:29.400
It is like a splash screen onto your

87
00:04:29.400 --> 00:04:33.000
 computer which execute the default kernel

88
00:04:32.300 --> 00:04:35.500
 images from your computer. You can

89
00:04:35.500 --> 00:04:38.300
 have multiple kernel images like kernel 1

90
00:04:38.300 --> 00:04:41.200
 kernel 2 kernel 3 that can be

91
00:04:41.200 --> 00:04:45.300
 different operating systems like Kali parrot already

92
00:04:44.300 --> 00:04:47.600
 hat. So it loads and

93
00:04:47.600 --> 00:04:50.200
 executes the kernel and gives you

94
00:04:50.200 --> 00:04:53.700
 the opportunity to load into a specific operating system.

95
00:04:55.400 --> 00:04:58.600
The next is the kernel, which is also known

96
00:04:58.600 --> 00:05:02.600
 as the heart of the computer it execute

97
00:05:01.600 --> 00:05:04.600
 the spin slash in

98
00:05:04.600 --> 00:05:07.700
 it, and there are multiple system programs

99
00:05:07.700 --> 00:05:10.400
 which get executed into this step.

100
00:05:10.800 --> 00:05:13.400
Now the kernel mounts the

101
00:05:13.400 --> 00:05:17.200
 root file system into the grub.configuration file,

102
00:05:16.200 --> 00:05:18.600
 which has been specified.

103
00:05:19.500 --> 00:05:23.000
It also executes the initialized programs,

104
00:05:22.500 --> 00:05:26.000
 which is located into the s-bin folder,

105
00:05:25.300 --> 00:05:27.800
 which is system in folder.

106
00:05:28.500 --> 00:05:31.600
And finally, it loads the file system of

107
00:05:31.600 --> 00:05:32.600
 the operating system.

108
00:05:34.300 --> 00:05:37.600
Next is the init so in it

109
00:05:37.600 --> 00:05:40.900
 executes the Run level programs. Now, you

110
00:05:40.900 --> 00:05:43.400
 may think what are the Run levels you're

111
00:05:43.400 --> 00:05:46.500
 going to understand the Run levels in next couple

112
00:05:46.500 --> 00:05:46.900
 of seconds.

113
00:05:47.900 --> 00:05:50.800
So in it decides in which run

114
00:05:50.800 --> 00:05:53.800
 level your system needs to be booted. It

115
00:05:53.800 --> 00:05:56.100
 also decides the programs to be

116
00:05:56.100 --> 00:05:58.700
 loaded when your computer starts.

117
00:05:59.300 --> 00:06:02.600
So coming to the Run level. How many are there

118
00:06:02.600 --> 00:06:05.000
 as you can see onto your screen in the

119
00:06:05.300 --> 00:06:05.900
 right hand side.

120
00:06:07.100 --> 00:06:10.500
There are different run levels which starts from

121
00:06:10.500 --> 00:06:14.200
 run level 0 run level 1 to run

122
00:06:14.200 --> 00:06:17.700
 level 6 now, whenever your system boots, it

123
00:06:17.700 --> 00:06:20.400
 goes into a fixed run level, which

124
00:06:20.400 --> 00:06:23.600
 is the Run level 3, which is multi-user plus

125
00:06:23.600 --> 00:06:24.500
 networking.

126
00:06:25.300 --> 00:06:28.200
Let's understand all the Run levels one by one.

127
00:06:28.900 --> 00:06:31.400
So what does run level 0 stands for

128
00:06:31.400 --> 00:06:34.200
 its stands for shutdown or

129
00:06:34.200 --> 00:06:37.800
 halt which means onto your computer into

130
00:06:37.800 --> 00:06:40.600
 your terminal if you type run level

131
00:06:40.600 --> 00:06:43.500
 0 then your computer is going to shut down.

132
00:06:43.500 --> 00:06:46.400
 Now. You cannot type the command run level you

133
00:06:46.400 --> 00:06:50.200
 have to type the command which is in it zero which

134
00:06:49.200 --> 00:06:52.300
 gives the instruction to your

135
00:06:52.300 --> 00:06:55.400
 computer that the user wants to go into the

136
00:06:55.400 --> 00:06:58.600
 Run level, which is zero. So the command is in

137
00:06:58.600 --> 00:07:01.300
 it which stands for initialize the Run

138
00:07:01.300 --> 00:07:01.700
 level 0

139
00:07:02.600 --> 00:07:05.900
The next is run level 1 now. If

140
00:07:05.900 --> 00:07:08.200
 you type in it one into your

141
00:07:08.200 --> 00:07:11.600
 terminal, you're going to go into a single user mode

142
00:07:11.600 --> 00:07:14.800
 without networking. That means only one

143
00:07:14.800 --> 00:07:17.900
 user can now use the system and they

144
00:07:17.900 --> 00:07:19.200
 will be no internet.

145
00:07:20.300 --> 00:07:23.900
Next is the Run level 2 which is multiple

146
00:07:23.900 --> 00:07:26.000
 uses with no networking.

147
00:07:26.600 --> 00:07:29.100
Run level 3 is the default run level

148
00:07:29.100 --> 00:07:32.400
 into which any operating system boots, which is

149
00:07:32.400 --> 00:07:35.700
 the multi-user plus networking. Now. This

150
00:07:35.700 --> 00:07:38.100
 is the Rel level which everywhere of

151
00:07:38.100 --> 00:07:41.700
 us gets by default booted in wherein multiple

152
00:07:41.700 --> 00:07:44.300
 users can be switched as well as we have

153
00:07:44.300 --> 00:07:45.800
 the network access.

154
00:07:46.800 --> 00:07:50.400
Next one is the Run level 4 which is undefined and

155
00:07:49.400 --> 00:07:52.400
 which is used for research and

156
00:07:52.400 --> 00:07:53.600
 development purposes.

157
00:07:54.300 --> 00:07:58.100
The next is the Run level 5 now run

158
00:07:57.100 --> 00:08:00.500
 level 5 works exactly as

159
00:08:00.500 --> 00:08:03.400
 run level 3, which is multi-user plus

160
00:08:03.400 --> 00:08:06.700
 networking with X11 protocol support

161
00:08:06.700 --> 00:08:07.400
 now.

162
00:08:08.300 --> 00:08:12.300
X11 protocol is a display GUI

163
00:08:11.300 --> 00:08:14.800
 protocol, which is used to enhance the

164
00:08:14.800 --> 00:08:15.500
 operating system.

165
00:08:16.500 --> 00:08:19.200
And the last one is the Run level 6 which is

166
00:08:19.200 --> 00:08:22.200
 used to reboot or restart the system.

167
00:08:22.200 --> 00:08:25.900
 So onto your terminal if you type in it

168
00:08:25.900 --> 00:08:28.800
 6 which means you are giving the instruction to

169
00:08:28.800 --> 00:08:31.500
 initialize the Run level 6 your computer

170
00:08:31.500 --> 00:08:33.200
 will automatically restart.

171
00:08:34.100 --> 00:08:37.100
So now we have completed the Run levels, which is

172
00:08:37.100 --> 00:08:40.800
 run level 0 1 2 3 4

173
00:08:40.800 --> 00:08:42.800
 5 6 respectively.

174
00:08:43.900 --> 00:08:46.500
Now as we have also understood the

175
00:08:46.500 --> 00:08:49.800
 Run levels and the programs that are executed from

176
00:08:49.800 --> 00:08:52.700
 this directory, which is slash Etc

177
00:08:52.700 --> 00:08:57.000
 slash rc.d. Slash rc1.d

178
00:08:55.900 --> 00:08:58.300
 RC 2 dot

179
00:08:58.300 --> 00:08:59.200
 d and so on.

180
00:09:00.500 --> 00:09:03.700
We have also understood how the system executes program

181
00:09:03.700 --> 00:09:06.800
 based on fixed run levels.

182
00:09:06.800 --> 00:09:09.200
 We also understood the directories of

183
00:09:09.200 --> 00:09:10.100
 this programs.

184
00:09:10.700 --> 00:09:13.400
Now one important thing to remember over

185
00:09:13.400 --> 00:09:16.600
 here is the programs that start with

186
00:09:16.600 --> 00:09:19.500
 s into those directories are used

187
00:09:19.500 --> 00:09:22.500
 for startup and the programs which starts with

188
00:09:22.500 --> 00:09:26.200
 k are used for shutdown now YK

189
00:09:25.200 --> 00:09:28.900
 because K stands for kill. I

190
00:09:28.900 --> 00:09:31.300
 hope you guys understood that what are the

191
00:09:31.300 --> 00:09:34.800
 Run levels and how the Linux boot process

192
00:09:34.800 --> 00:09:35.900
 functions

193
00:09:37.200 --> 00:09:40.200
If you have any questions or queries, you can always post it

194
00:09:40.200 --> 00:09:41.700
 into the Q&A. Thank you.
