understanding the boot process and command line - ewu · pdf fileunderstanding the boot...

36
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 3 Understanding the Boot Process and Command Line

Upload: vokiet

Post on 06-Mar-2018

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

A+ Guide to Managing and Maintaining Your PCFifth Edition

Chapter 3

Understanding the Boot Process and Command Line

Page 2: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

2A+ Guide to Managing and Maintaining Your PC, Fifth Edition

You Will Learn…

About the boot process and some tools for troubleshooting a failed boot

To use many commands at the command prompt

Page 3: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

3A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Booting Up Your Computer

Hard (cold) boot versus soft (warm) boot

Startup BIOS is in control when boot process begins

Turns control over to the OS

Page 4: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

4A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Steps in the Boot Process

1. Startup BIOS runs power-on self test (POST) and assigns resources

2. ROM BIOS startup program searches for and loads an OS

3. OS configures the system and completes its own loading

4. Application software is loaded and executed

Page 5: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

5A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Boot Step 1: POST

Page 6: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

6A+ Guide to Managing and Maintaining Your PC, Fifth Edition

How the BIOS Finds and Loads the OS

Page 7: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

7A+ Guide to Managing and Maintaining Your PC, Fifth Edition

How the BIOS Finds and Loads the OS (continued)

BIOS executes MBR program

Turns to partition table to find OS boot record

Program in OS boot record attempts to find a boot loader program for OS

Ntldr (Windows NT/2000/XP)

Io.sys (Windows 9x)

Page 8: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

8A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Boot Step 2: Loading the OS

Page 9: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

9A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Loading the MS-DOS Core of Windows 9x

Brings OS to real-mode command prompt

Relevance: Real-mode DOS core often used as a troubleshooting tool

Page 10: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

10A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Loading the MS-DOS Core of Windows 9x (continued)

Files necessary to boot to command promptIo.sys

Msdos.sys

Command.com

To customize 16-bit portion of load processAutoexec.bat

Config.sys

Page 11: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

11A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Boot Step 3: OS Initializes Itself

Page 12: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

12A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Emergency Startup Disks

Bootable disks with some utility programs to troubleshoot a failed hard drive

Each OS provides automated method to create a rescue disk (Windows 9x) or set of disks (Windows 2000)

Page 13: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

13A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Emergency Startup Disks (continued)

Creating a Windows 9x startup disk

Add/Remove Programs icon in Control Panel

Using a Windows 9x startup disk with another OS

Page 14: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

14A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Windows 9x Startup Disks

Page 15: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

15A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Using the Command Prompt

Multiple ways of accessing a command prompt

Launching a program using the command prompt

Using commands to manage files and folders and perform utility tasks when troubleshooting a failed system

Page 16: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

16A+ Guide to Managing and Maintaining Your PC, Fifth Edition

How to Access a Command Prompt in Windows

Windows 2000 or Windows XP

Startup disks (Windows 2000) or installation CD (Windows XP) to boot PC and load Recovery Console

All versionsStart, Run, Command.com in Run dialog box

All versionsCommand window from Windows desktop

Page 17: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

17A+ Guide to Managing and Maintaining Your PC, Fifth Edition

How to Access a Command Prompt in Windows (continued)

Windows 9xCtrl + F8 while booting

Windows 95/98Start, Shutdown, Restart in MS-DOS mode

Windows 9xBoot from a bootable disk

Page 18: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

18A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Launching a Program Using the Command Prompt (continued)

Type filename of program file at command prompt

OS

Attempts to find program file by name,

Copies file into RAM, and

Executes program

Page 19: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

19A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Launching a Program Using the Command Prompt (continued)

Page 20: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

20A+ Guide to Managing and Maintaining Your PC, Fifth Edition

DOS File and Directory Naming Conventions

8.3 formatUp to 8 characters, separating period, and file extension of up to 3 characters (eg, filename.ext)

Acceptable characters Letters a through zNumbers 0 through 9_ ^ $ ! # % & - { } ( ) @ ‘ `

Do not use space, period, *, ? or \Acceptable extensions: .com, .sys, .bat, .exe

Page 21: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

21A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Windows File and Directory Naming Conventions

Up to 255 characters

Can contain spaces

When DOS part of system is operating, it

Truncates long filenames

Assigns new 8-character names (eg, Mydocu~1.doc)

Page 22: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

22A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Wildcards

Question mark (?)

Wildcard for one character

Asterisk (*)

Wildcard for more than one character

Page 23: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

23A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Deletes files or groups of filesDel or Erase

Displays contents of text file on screen

Type

Renames a file or folderRename or Ren

Lists files and directoriesDirFunctionCommand

Page 24: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

24A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Result of Dir Command

Page 25: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

25A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Deletes directory tree beginning with specified subdirectoryUse with caution!

Deltree [drive:]path

Same general command-source-destination format as CopyOffers several more options

Xcopy /C /S /Y /D:

Copies single file or group of filesDoes not alter original files

CopyFunctionCommand

Page 26: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

26A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Removes a subdirectoryRmdir [drive:]path or RD [drive:]path

Changes current default directory

Chdir [drive:]path or CD [drive:]path or CD..

Creates a subdirectory under a directory

Mkdir [drive:]path or MD [drive:]path

FunctionCommand

Page 27: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

27A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Displays or changes read-only, archive, system, and hidden attributes assigned to files

Attrib

Reports information about a diskChkdsk [drive:] /F /V

Copies system files needed to boot to a disk or drive

Sys Drive:

FunctionCommand

Page 28: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

28A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Rewrites files on hard drive in contiguous clusters to improve hard drive performance

Defrag Drive: /S

Restores or repairs Windows 98 registry

Scanreg /Restore /Fix /Backup

Scans hard drive for errors and repairs them

Scandisk Drive: /A /N /P

FunctionCommand

Page 29: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

29A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Views/manipulates components of a file system on disks and drives (FAT, directories, boot records)Views contents of memory and hexadecimal addresses

Debug

Extracts files from a cabinet fileExtract filename.cab file1.ext /D

Displays version of OS in useVerFunctionCommand

Page 30: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

30A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Commands to Manage Disks, Drives, Files, and Directories

Attempts to reverse effects of accidental format

Unformat

Formats disk or hard drive/S option makes drive bootable

Format Drive

Partitions hard drive for first useFdisk

Enables editing text files while working at command prompt

Edit [path][filename]FunctionCommand

Page 31: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

31A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Editing Autoexec.bat and Config.sys

Page 32: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

32A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Options for Fdisk Command

Page 33: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

33A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Options for Format Command (continued)

Page 34: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

34A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Options for Format Command (continued)

Page 35: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

35A+ Guide to Managing and Maintaining Your PC, Fifth Edition

Using Batch Files

To execute group of commands using single command

Page 36: Understanding the Boot Process and Command Line - EWU · PDF fileUnderstanding the Boot Process and Command Line. ... troubleshooting a failed boot ... (Windows NT/2000/XP)

36A+ Guide to Managing and Maintaining Your PC, Fifth Edition

SummaryHow a PC first boots upParts of the boot process

POSTLoading the OSOS initializing itselfLoading and executing an application

Troubleshooting tools to use when the boot failsEssential commands used from a command prompt when troubleshooting a failed system