1
00:00:00,000 --> 00:00:15,919
Hey everyone and welcome back to another skill.

2
00:00:15,919 --> 00:00:20,679
So in this skill right here we have a lot of stuff to get to but the very first thing

3
00:00:20,679 --> 00:00:25,879
that we are going to focus on is the Linux boot process.

4
00:00:25,879 --> 00:00:29,919
Now the Linux boot process comprises of multiple different steps.

5
00:00:29,919 --> 00:00:34,280
We have to understand what those steps are and well the very first thing that we should

6
00:00:34,280 --> 00:00:38,439
do is talk about the first step in that process of course.

7
00:00:38,439 --> 00:00:43,719
So the very first process or rather step in the process should I say is what is called

8
00:00:43,719 --> 00:00:44,719
the BIOS.

9
00:00:44,719 --> 00:00:52,840
Now the BIOS stands for the basic input output system and the first thing to understand about

10
00:00:52,840 --> 00:00:58,240
the BIOS is that this is not related to Linux in fact it's not related to the operating

11
00:00:58,240 --> 00:01:03,400
system itself this is actually to do with the hardware on your computer.

12
00:01:03,400 --> 00:01:08,960
Now what is going to happen is that when you push the power button on your computer to

13
00:01:08,960 --> 00:01:13,439
turn it on BIOS is going to effectively take action.

14
00:01:13,439 --> 00:01:19,200
Now what the BIOS is going to do is it's going to perform something known as the post.

15
00:01:19,200 --> 00:01:22,560
This is the power on self test.

16
00:01:22,560 --> 00:01:27,519
Now all the post is going to do is it's going to just do some basic hardware checks.

17
00:01:27,519 --> 00:01:32,840
So this could be things like checking your keyboards are operational so on so forth just

18
00:01:32,840 --> 00:01:35,240
some very basic low level checks.

19
00:01:35,240 --> 00:01:40,560
Now crucially what the BIOS is going to do is it's going to be responsible for booting

20
00:01:40,560 --> 00:01:45,079
the operating system but the question is from where.

21
00:01:45,079 --> 00:01:47,480
So what do I mean when I say that we'll think about it.

22
00:01:47,480 --> 00:01:54,480
It may actually be not obvious that the operating system can be booted from different locations

23
00:01:54,480 --> 00:02:00,200
typically this is going to come in the form of your hard drive that is where the operating

24
00:02:00,200 --> 00:02:06,080
system is going to be installed but you can have things such as removable media say for

25
00:02:06,080 --> 00:02:11,120
example you could have an operating system stored on a USB stick.

26
00:02:11,120 --> 00:02:17,439
Now when the BIOS is engaged we can ultimately select whereabouts we want to try to find

27
00:02:17,800 --> 00:02:22,240
this operating system should be check the hard drive first or should be check for removable

28
00:02:22,240 --> 00:02:26,759
media should be check for CD ROMs whatever it may be.

29
00:02:26,759 --> 00:02:32,280
But the key thing here is that the BIOS is going to search whatever location you tell

30
00:02:32,280 --> 00:02:36,919
it to be at the hard drive or the USB whatever it may be.

31
00:02:36,919 --> 00:02:42,599
The thing that the BIOS is going to look for and this is very very crucial the BIOS is going

32
00:02:42,599 --> 00:02:45,599
to look for the presence of an MBR.

33
00:02:45,599 --> 00:02:48,680
This is the master boot records.

34
00:02:48,680 --> 00:02:55,680
Now so long as the BIOS can find the MBR everything is AOK the process can then continue.

35
00:02:56,079 --> 00:03:01,759
So really if we happen to have a particular order i.e. we want to search the hard drive

36
00:03:01,759 --> 00:03:07,719
first for an MBR if the BIOS finds an MBR we're going to load it from the hard drive.

37
00:03:07,719 --> 00:03:13,039
However if it does not find it from the hard drive it can then get down the chain to the

38
00:03:13,039 --> 00:03:18,639
next thing we have specified in our order of operations maybe that could be the USB

39
00:03:18,639 --> 00:03:22,479
or CD ROM or a network based drive.

40
00:03:22,479 --> 00:03:27,560
Nevertheless whatever it may be so long as we find this MBR which happens to be very

41
00:03:27,560 --> 00:03:34,639
tiny indeed this is only 512 bytes after all but these are very important bytes that happen

42
00:03:34,639 --> 00:03:38,879
to be located at the very first sector of the disk.

43
00:03:38,879 --> 00:03:44,319
And so long as the BIOS can find that MBR it will then attempt to load the operating

44
00:03:44,319 --> 00:03:45,439
system.

45
00:03:45,439 --> 00:03:51,879
So really once the MBR runs the next stage is the bootloader is going to take effect.

46
00:03:51,879 --> 00:03:57,280
Now to note there are different bootloaders available on Linux.

47
00:03:57,280 --> 00:04:02,560
The very first bootloader is one called Lilo and the thing to note about Lilo is that it's

48
00:04:02,560 --> 00:04:07,519
kind of old and antiquated you're not going to see it very much at all in modern based

49
00:04:07,520 --> 00:04:14,640
systems if at all in a modern based system and Lilo is Linux specific this is the Linux

50
00:04:14,640 --> 00:04:20,680
loader but ultimately this was replaced by the grand unified bootloader otherwise known

51
00:04:20,680 --> 00:04:22,000
as Grubb.

52
00:04:22,000 --> 00:04:28,720
Now Grubb itself has since been replaced with Grubb 2 which is really just the updated version

53
00:04:28,720 --> 00:04:34,199
of Grubb and this really is the one that you're going to see all over the place in modern

54
00:04:34,199 --> 00:04:35,600
Linux based systems.

55
00:04:35,600 --> 00:04:41,120
The thing here about Grubb is that Grubb is not just a Linux based bootloader the way

56
00:04:41,120 --> 00:04:47,560
Lilo is Grubb indeed can be used on other operating systems such as Windows.

57
00:04:47,560 --> 00:04:54,360
Now when the bootloader happens to run you may be happen to see a splash menu.

58
00:04:54,360 --> 00:04:59,360
Splash menu is just going to splash onto your screen and it's going to actually show you

59
00:04:59,360 --> 00:05:04,760
the different operating systems that you have available to you so let's maybe say you happen

60
00:05:04,759 --> 00:05:11,800
to have your hard disk and you partition it maybe you have a Linux operating system here

61
00:05:11,800 --> 00:05:18,000
let's maybe say Ubuntu and you also have a Windows operating system on the same disk

62
00:05:18,000 --> 00:05:24,519
this would be known as a dual boot scenario so let's maybe say you loved Linux for your

63
00:05:24,519 --> 00:05:28,719
system administration based stuff but you happen to really like the gaming ecosystem

64
00:05:28,720 --> 00:05:36,080
of Windows you wanted to have both the bootloader such as Grubb 2 is going to allow you to select

65
00:05:36,080 --> 00:05:42,280
which operating system we actually want to boot into now whatever bootloader you're using

66
00:05:42,280 --> 00:05:47,960
whether it is Lilo whether it is Grubb we have a primary purpose here that bootloader

67
00:05:47,960 --> 00:05:54,360
is going to load the kernel into memory now this is a very very important step the kernel

68
00:05:54,360 --> 00:05:59,759
as you may know is a very important part of the operating system it happens to be the

69
00:05:59,759 --> 00:06:05,360
core of the operating system and basically this kind of has control over absolutely everything

70
00:06:05,360 --> 00:06:10,560
so getting this to load into memory is a crucial component without this happening your system

71
00:06:10,560 --> 00:06:17,160
is not going to work now once the kernel has successfully loaded into memory we're then

72
00:06:17,160 --> 00:06:24,320
going to transition to the next phase this is called the kernel initialization phase so once

73
00:06:24,320 --> 00:06:30,160
the kernel has been loaded into memory what it's going to do it's going to load at least in modern

74
00:06:30,160 --> 00:06:37,240
systems system D now system D has a massive responsibility and modern Linux systems it's

75
00:06:37,240 --> 00:06:43,200
going to mount the file systems it's going to also handle the running and stopping of all the

76
00:06:43,240 --> 00:06:50,319
processes on the system but crucially to note is that system D is a newer implementation on older

77
00:06:50,319 --> 00:06:57,199
systems you may see different styles of programs such as sysv init now whether you happen to be

78
00:06:57,199 --> 00:07:02,439
running sysv init or system D essentially the same type of thing is going to happen they're going

79
00:07:02,439 --> 00:07:08,159
to be responsible for controlling those processes that are going to get your system fully up and

80
00:07:08,200 --> 00:07:14,160
running so really as a recap the process is going to be the very first step is going to be the

81
00:07:14,160 --> 00:07:21,720
BIOS which will do our basic checks for hardware the BIOS is then going to try to find the MBR on

82
00:07:21,720 --> 00:07:29,240
some type of media let's say a network drive or a hard drive or a USB the MBR is then going to run

83
00:07:29,240 --> 00:07:35,480
the bootloader so that could maybe be grub 2 and the bootloader is going to be responsible for

84
00:07:35,520 --> 00:07:41,640
loading the kernel into memory so then we have our kernel initialization and the kernel will load

85
00:07:41,640 --> 00:07:48,319
and modern systems at least system D which is going to mount your file system and begin running all

86
00:07:48,319 --> 00:07:55,640
of those essential processes to get your operating system up and running so that really is us for

87
00:07:55,640 --> 00:08:00,240
the basics of the Linux boot process I hope this has been informative for you and I'd like to thank

88
00:08:00,240 --> 00:08:00,960
you for viewing

