Download
windows startup and shutdown n.
Skip this Video
Loading SlideShow in 5 Seconds..
Windows Startup and Shutdown PowerPoint Presentation
Download Presentation
Windows Startup and Shutdown

Windows Startup and Shutdown

248 Views Download Presentation
Download Presentation

Windows Startup and Shutdown

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Windows Startup and Shutdown 資工四B 93502081 楊濬仲資工四B 93502065 陳建志資工碩1 965202080 凌家強資工碩1 965205005 陳昱端

  2. Meeting Minutes • 在每個星期的星期二下午定期開會。 • 討論的方法是 - 每個人都報告自己這禮拜的進度,及對這個部份的想法。 - 有問題就馬上討論或是回饋給對方。

  3. Windows Startup Step • Ready Boot • Start Boot • Loader Kernel • Kernel Initialization • System Login • Shutdown • Startup solve problems

  4. Windows Startup Step Window Setup Program Ready Boot Master Boot Record Start Boot ntldr Load kernel Ntoskrnl.exe Kernel Initialization Winlogon System Login Winlogon Shutdown

  5. Windows Startup Step Window Setup Program Ready Boot Master Boot Record Start Boot ntldr Load kernel Ntoskrnl.exe Kernel Initialization Winlogon System Login Winlogon Shutdown

  6. Ready Boot • Partition • A hard disk contain up to four primary partitions • Extended partition contain extended partitions • File system • Such as FAT , NTFS

  7. Partitons

  8. Windows Setup Program • When installed, windows setup do two operation • Write the MBR to a hard disk • Writes boot sector to the first bootable partition • While overwrite boot sector, windows setup copies the old content as Bootsect.dosin the root directory

  9. Windows Startup Step Window Setup Program Ready Boot Master Boot Record Start Boot ntldr Load kernel Ntoskrnl.exe Kernel Initialization Winlogon System Login Winlogon Shutdown

  10. Start Boot BIOS Start Boot MBR Boot Sector Ntldr Load kernel Boot.ini Kernel Initialization

  11. Master Boot Record(MBR) • Define • MBR is the code write in first sector • Responsibilities • Reads and loads partition boot sectors • Included • boot code:space contains executable instructions • partition table:four entries that define location of primary partitions

  12. MBR (cont’d)

  13. MBR (cont’d) • Action • Scan primary partition table until finds bootable partition flag • When MBR finds at least one such flag , it reads the first flag’s sector to boot • Reference

  14. Boot Sector • Define • The first sector of such a partition • Responsibilities • Reads the root directory to load Ntldr

  15. Boot Sector (cont’d)

  16. Windows Setup Program • When installed, windows setup do two operation • Write the MBR to a hard disk • Writes boot sector to the first bootable partition • While overwrite boot sector, windows setup copies the old content as Bootsect.dosin the root directory (ps. 此部分為 install 所執行的operation)

  17. Boot.ini • Called by ntldr • Responsibilities • Boot menu file • Location • The root directory of the system volume

  18. Boot.ini (cont’d) • C:\boot.ini

  19. Boot.ini (cont’d) • Syntax • Advanced RISC Computing • There are three variants to the syntax used by windows. • multi(W)disk(X)rdisk(Y)partition(Z) • scsi(W)disk(X)rdisk(Y)partition(Z) • signature(V)disk(X)rdisk(Y)partition(Z)

  20. Boot.ini (cont’d) W is disk controller number , typically 0 • multi(W)disk(X)rdisk(Y)partition(Z) • instructs Windows to use BIOS INT 13 functions to load system files X is always 0 in the multi() syntax Z indicates the partition number on the physical disk Y specifies the physical hard disk attached to controller W

  21. Boot.ini (cont’d) X is the physical hard disk attached to the controller , typically 0 -15 W is disk controller number , typically 0 • scsi(W)disk(X)rdisk(Y)partition(Z) • informs Windows that it should rely on disk I/O services provided by Ntbootdd.sys (described shortly) to access the files on the boot volume Y specifies the SCSI logical unit number (LUN) of the disk , typically 0 Z is the partition that corresponds to the boot volume with numbering starting at 1

  22. Boot.ini (cont’d) V is a 32-bit hexadecimal disk signature that identifies the disk X is the physical hard disk with the specific signature • signature(V)disk(X)rdisk(Y)partition(Z) • instructs Windows to locate the disk with the signature that matches the first value in parentheses, regardless of the controller number associated with the disk and to use Ntbootdd.sys to access the boot volume Z is the partition number on which the boot volume is located Y is always 0

  23. Boot option

  24. Boot.ini (cont’d) • C:\boot.ini

  25. Windows Startup and Shutdown 陳建志

  26. Windows Startup Step Window Setup Program Ready Boot Master Boot Record Start Boot ntldr Load kernel Ntoskrnl.exe Kernel Initialization Winlogon System Login Winlogon Shutdown

  27. Windows Startup Step Window Setup Program Ready Boot Master Boot Record Start Boot ntldr Load kernel Ntoskrnl.exe Kernel Initialization Winlogon System Login Winlogon Shutdown

  28. Loader procedure

  29. File Introduction • Ntldr • 負責載入Windows作業系統的核心程式、控制作業系統的選擇、硬體的檢測。 • Boot.ini • 指定啟動的預設作業系統。 • 負責開機載入程式的作業系統清單。 • 指定windows作業系統是擺放在那一個硬碟控制器(Disk Controller)下的那一個硬碟中的那一個分割區。 • Ntdetect.com • 偵測目前電腦安裝了那些硬體元件及其相關的設定資訊,並將其所收集到的資料建立成硬體清單(Hardware List)傳遞給 NTLDR 使用。

  30. File Introduction • Bootsect.dos(Optional) • 內含在安裝 windowsNT作業系統之前的分割區啟動磁區的內容備份,以便使用者可以載入安裝在硬碟的其他版本的作業系統,例 DOS、Windows 95/98 或 Windows Me。 • Ntbootdd.sys(Optional) • 只有當使用 SCSI(Small Computer System Interface)硬碟開機且 SCS I卡上的 BIOS 是未啟動(Disable)時,而且在 Boot.ini 中是採用 SCSI 的語法時。 • Hiberfil.sys (Optional) • 上次關機為休眠時,紀錄系統資訊的檔案 • 都存放在系統分割區的根目錄 • 例: C:/

  31. Loader procedure

  32. Enable Paging Bootsector Ntldr Real mode Protect mode Create page table

  33. Ntldr Step1 • Ntldr begin its existence while a system is executing in an mode called real mode • No virtual-to-physical translation of memory addresses occurs • Only first 1MB of physical memory can accessible • Ntldr switch the system to protected mode • Still no virtual-to-physical translation • After the system is in protected mode, Ntldr can access all of physical memory • Creating enough page table and small than 16MB

  34. Loader procedure

  35. Prepare Read Boot.ini Ntldr Enable paging Ntbootdd.sys Boot code

  36. Ntldr Step2 • After Ntldr enables paging, it is fully operational. • It still relies on functions supplied by the boot-code to access IDE-based system and boot disks • If the disk containing the boot volume is SCSI-based and isn’t accessible using BIOS firmware support • Ntldr loads Ntbootdd.sys and uses it instead of the boot-code functions for disk access • Ntbootdd.sys is a copy of the SCSI miniport driver that Windows uses when its fully operation to access the boot disk

  37. Prepare Read Boot.ini Enable paging Ntbootdd.sys Boot code Hiberfil.sys

  38. Ntldr Step3 • If there is a valid Hiberfil.sys file in the root of the system volume • It shortcuts the boot process by reading the contents of the file into memory • Transferring control to code in the kernel that resumes a hibernated system • It will be valid only if the last time the computer was shut down it was hibernated

  39. Read Boot.ini Ntbootdd.sys Boot code Hiberfil.sys Read Boot.ini

  40. Ntldr Step3 Cont. • Ntldr reads the Boot.ini file from the root directory using built-in file system code. • Like the boot sector's code, Ntldr contains read-only NTFS and FAT code • Unlike the boot sector's code, Ntldr's file system code can read subdirectories

  41. Ntldr Step4 • If there is more than one boot-selection entry in Boot.ini, it presents the user with the boot-selection menu • If there is only one entry, Ntldr bypasses the menu and proceeds to displaying the startup progress bar • Selection entries in Boot.ini direct Ntldr to the partition on which the Windows system directory of the selected installation resides • This partition might be the same as the boot partition, or it might be another primary partition

  42. boot-selection menu 請選擇您想要啟動的作業系統: Windows XP Professional   MS-DOS 使用 ↑ 鍵和 ↓ 鍵,將您想要的選項反白,選定後,請按 Enter 鍵確認。 倒數計時結束後,當時的反白選項將會自行啟動。你剩下的秒數: 29 請按 F8 為 Windows 2000 修正問題及設定進階啟動選項。 Microsoft Windows 2000 Advanced Server   Microsoft

  43. Boot.ini can include optional arguments that Ntldr and other components involved in the boot process interpret • Any options that are included on the Boot.ini save to the Registry valueHKLM\System\CurrentControlSet\Control\SystemStartOptions • If the user doesn't select an entry from the selection menu within the timeout period the Boot.ini file specifies, Ntldr chooses the default selection • which is the top-most entry in boot.ini with a path matching the path specified in the "default=" line

  44. Hardware detect Hiberfil.sys Read Boot.ini Bootsect.dos Ntdetect.com

  45. If the Boot.ini entry refers to an MS-DOS installation, Ntldr reads the contents of the Bootsect.dos file into memory, switches back to 16-bit real mode, and calls the MBR code in Bootsect.dos • Code in Bootsect.dos continues an MS-DOS-specific boot, such as is used to boot Microsoft Windows Me, Windows 98, or Windows 95 on a computer

  46. Loader procedure

  47. Ntldr Step5 • Once the boot selection has been made, Ntldr loads and executes Ntdetect.com, a 16-bit real-mode program that uses a system's BIOS to query the computer for basic device and configuration information • The time and date information stored in the system's CMOS • The types of buses on the system and identifiers for devices attached to the buses • The number, size, and type of disk drives on the system • The types of mouse input devices connected to the system • The number and type of parallel ports configured on the system • The types of video adapters present on the system • This information is gathered into internal data structures that will be stored under the HKLM\HARDWARE\DESCRIPTION registry key later in the boot

  48. On Windows 2000, Ntldr then clears the screen and displays the "Starting Windows" progress bar. This progress bar remains empty until Ntldr begins loading boot drivers • Below the progress bar is the message, "For troubleshooting and advanced startup options for Windows, press F8." • If the user presses F8, the advanced boot menu is presented, which allows the user to select such options as booting from last known good, safe mode, debug mode, and so on • On Windows XP and Windows Server 2003, Ntldr presents a logo splash screen instead of a progress bar

  49. Advanced boot menu Windows Advanced Option Menu  Please select an option: Safe Mode Safe Mode with Networking Safe Mode with Command Prompt Enable Boot Logging Enable VGA mode Last Known Good Configuration (your most recent setting that worked) Directory Service Restore Mode (Windows domain controller only) Debugging Mode Reboot Return to OS choice menu Use the up and down arrow keys to move the highlight your choice. Start Windows Normally

  50. Loader procedure