When your system starts, there are a number of processes that occur to load the operating system. In this video, you’ll learn about the steps of the boot process and the tools available to help troubleshoot any issues.
The process of getting an operating system running on your computer is an interesting one. When you first start your computer, it knows nothing about the operating systems that might be stored on a storage device somewhere. All it knows is that there’s a keyboard connected and a mouse. There’s memory. There’s a storage device on this computer. And it really checks the basics of the hardware on this device and performs a power on self test.
Once that power on self test is complete, there is a bootstrap loader in the BIOS that starts a program which is then going to start your operating system. So this is a multi-step process as we go through. This bootstrap loader in the BIOS often references a second-stage boot loader. In Windows, this is Winload. In other operating systems, you may be using GRUB Legacy, or GRUB 2, or LILO. This is what’s actually going to start the operating system on your computer.
With a legacy BIOS, your computer relies on a Master Boot Record, or an MBR. This is often the first sector of the very first hard drive. It’s very small– only 512 bytes in length. And it stores the important information about where partitions might be on this drive.
If you look at a graphical display of the boot process, you can see the Master Boot Record. And on this particular drive, there’s a Boot Sector and an OS kernel for two different partitions. So there are probably two different operating systems running. The BIOS is going to hand off to the Master Boot Record on this particular drive, which is then going to access the Boot Sector of a particular partition, which is then going to load the operating system kernel and start up the operating system. This might also work a different way. It may access the Master Boot Record. And the Master Boot Record might jump over the Boot Sector and go directly to the kernel of the operating system on a particular partition.
On a UEFI BIOS, you don’t have the Master Boot Record. Instead, you have an EFI System Partition. This is also called the ESP. And in this system partition may be configuration files to load up particular operating systems.
On this drive, I have a load-a.efi and a load-b.efi. On a UEFI BIOS, the BIOS is going to access the ESP. And it will probably prompt you to which operating system you would like to run. And then you may choose load-b.efi, which then loads the second operating system partition. Or you might choose the load-a EFI that loads up the first partition.
When you want to repair problems with the Master Boot Record or a Volume Boot Record, you need to make those repairs before the operating system loads. But if you don’t have the operating system loaded, how do you actually make the repairs? Well, you do that by using the Windows Command Prompt. This is a command prompt that’s available by booting from the installation media for your operating system. So you’ll need your install disks for Windows Vista, Windows 7, or Windows 8 or 8.1.
For Windows Vista and Windows 7, you get to the Windows Command Prompt through the System Recovery Options and choose Command Prompt. For Windows 8 and 8.1, it’s a little bit more involved. But it gets you to the Command Prompt by choosing Other Options, going to Troubleshoot, selecting Advanced Options, and finally choosing the Command Prompt.
One thing to keep in mind is when you’re using this Windows Command Prompt, you have complete access to the disk. You have complete access to the operating system. So it is a very powerful interface to work in. But it’s also a very dangerous interface. Make sure you know exactly what you’re doing when you’re typing things in at the Windows Command Prompt.
This gives you the access to use, copy, rename, or replace system files. You can modify folders. You can change partitions on the disk. You can enable or disable certain services from starting when you begin the operating system. Or you can repair the file system boot sector or the Master Boot Record. And I’ll take you through how you can get to the Windows Command Prompt in both Windows Vista and Windows 7 and the process for Windows 8 and 8.1.
Let’s look at how you get to the Command Prompt in Windows Vista and Windows 7. It’s almost identical between the two. But I’ll use Vista here as an example. I’ve started Windows Vista with my installation media. And it presents the normal startup screen. In my case, I want to click Next to go to the next screen. And I want to tell Windows Vista not to install. Because I already have a Windows Vista installation.
I want to choose the option to Repair Your Computer. And when you do that, Windows Vista presents you with the different installations that are available on the drives. And you can see I have two different Windows Vista installations. I’m going to choose the first one and click Next.
At that point, I get the System Recovery Options. And there are a number of different options available here. The one we’re interested in for this video is the Command Prompt option. When I click that, it presents me with the Windows Command Prompt.
In Windows 8 and 8.1, the process is very similar. In fact, when you start up Windows 8 or 8.1 from the installation media, the screen that you get’s very similar to what we saw in Windows Vista and Windows 7. In this case, I’ll choose Next to continue. And then, of course, choose the option again not to install now, but instead to Repair Your Computer.
This is the part where it’s very different than the Windows Vista and Windows 7. You have a completely different menu and front end than you do in those older operating systems. In this case, we’re going to choose Troubleshoot. From Troubleshoot, we have the option to Refresh Your PC or Reset Your PC. We don’t want to do either of those. So we’ll choose Advanced Options. And one of these advanced options is the Command Prompt. And now from the Command Prompt, we can run the commands that are necessary to analyze and fix any problems we might have with the operating system.
For problems relating to the Master Boot Record or Volume Boot Record, we want to use the command boot rec. And you can see the different options if you simply type boot rec and hit Enter. You see there’s a /FixMbr, a /FixBoot, a /ScanOs and a /RebuildBcd.
If you’ve never worked with this system or you just need a refresh of how this system is configured, you might want to start with boot rec /ScanOs. This will identify the Windows installations on this particular drive. And then you can make a decision on which Windows installation you may want to work with.
If you have a Master Boot Record that needs to be repaired, we can still run the same boot rec command. But we’ll run it with the /FixMbr at the end. It should give you an immediate feedback of “The operation has completed successfully.” And at that point, you have fixed the Master Boot Record.
To make repairs to the Volume Boot Record, it’s the same boot rec command. But you use /FixBoot. And again, you should get a response back very quickly that says, “The operation completed successfully.” And now you’ve repaired the Volume Boot Record.
If the problem is not with your MBR or the Volume Boot Record, it may be that the boot configuration data is incorrect and it doesn’t know where to load the operating system from on disk. To repair this, we can run the boot rec command with the /RebuildBcd, for Boot Configuration Data. And at that point, it will scan through disks for any of the Windows installations. So this may take a number of minutes.
When it does identify an installation, it asks you if you’d like to add the installation to the boot list. And you can respond with a Yes, a No, or an All. And at that point, it has rewritten the BCD. And you can restart your machine and now see if your system is able to identify where to boot Windows from.
If you want to resolve any problems with the Windows partitions, you can use the diskpart command. This will manage disk partitions. You generally want to run this also from the Windows Command Prompt. When you run diskpart, you’ll be taken to a separate set of prompts called diskpart. And from there, you can run different commands to list the volumes, remove, add, or make any changes to these partitions.
Category: CompTIA A+ 220-901