Recommended Posts

3523f261.gif

An outline of the boot sequence

Things start rolling when you press the power button on the computer (no! do tell!). Once the motherboard is powered up it initializes its own firmware - the chipset and other tidbits - and tries to get the CPU running. If things fail at this point (e.g., the CPU is busted or missing) then you will likely have a system that looks completely dead except for rotating fans. A few motherboards manage to emit beeps for an absent or faulty CPU, but the zombie-with-fans state is the most common scenario based on my experience. Sometimes USB or other devices can cause this to happen: unplugging all non-essential devices is a possible cure for a system that was working and suddenly appears dead like this. You can then single out the culprit device by elimination.

If all is well the CPU starts running. In a multi-processor or multi-core system one CPU is dynamically chosen to be the bootstrap processor (BSP) that runs all of the BIOS and kernel initialization code. The remaining processors, called application processors (AP) at this point, remain halted until later on when they are explicitly activated by the kernel. Intel CPUs have been evolving over the years but they?re fully backwards compatible, so modern CPUs can behave like the original 1978 Intel 8086, which is exactly what they do after power up. In this primitive power up state the processor is in real mode with memory paging disabled. This is like ancient MS-DOS where only 1 MB of memory can be addressed and any code can write to any place in memory - there?s no notion of protection or privilege.

Most registers in the CPU have well-defined values after power up, including the instruction pointer (EIP) which holds the memory address for the instruction being executed by the CPU. Intel CPUs use a hack whereby even though only 1MB of memory can be addressed at power up, a hidden base address (an offset, essentially) is applied to EIP so that the first instruction executed is at address 0xFFFFFFF0 (16 bytes short of the end of 4 gigs of memory and well above one megabyte). This magical address is called the reset vector and is standard for modern Intel CPUs.

The motherboard ensures that the instruction at the reset vector is a jump to the memory location mapped to the BIOS entry point. This jump implicitly clears the hidden base address present at power up. All of these memory locations have the right contents needed by the CPU thanks to the memory map kept by the chipset. They are all mapped to flash memory containing the BIOS since at this point the RAM modules have random crap in them. An example of the relevant memory regions is shown below:

bootMemoryRegions.png

Important memory regions during boot

The CPU then starts executing BIOS code, which initializes some of the hardware in the machine. Afterwards the BIOS kicks off the Power-on Self Test (POST) which tests various components in the computer. Lack of a working video card fails the POST and causes the BIOS to halt and emit beeps to let you know what?s wrong, since messages on the screen aren?t an option. A working video card takes us to a stage where the computer looks alive: manufacturer logos are printed, memory starts to be tested, angels blare their horns. Other POST failures, like a missing keyboard, lead to halts with an error message on the screen. The POST involves a mixture of testing and initialization, including sorting out all the resources - interrupts, memory ranges, I/O ports - for PCI devices. Modern BIOSes that follow the Advanced Configuration and Power Interface build a number of data tables that describe the devices in the computer; these tables are later used by the kernel.

After the POST the BIOS wants to boot up an operating system, which must be found somewhere: hard drives, CD-ROM drives, floppy disks, etc. The actual order in which the BIOS seeks a boot device is user configurable. If there is no suitable boot device the BIOS halts with a complaint like ?Non-System Disk or Disk Error.? A dead hard drive might present with this symptom. Hopefully this doesn?t happen and the BIOS finds a working disk allowing the boot to proceed.

The BIOS now reads the first 512-byte sector (sector zero) of the hard disk. This is called the Master Boot Record and it normally contains two vital components: a tiny OS-specific bootstrapping program at the start of the MBR followed by a partition table for the disk. The BIOS however does not care about any of this: it simply loads the contents of the MBR into memory location 0?7c00 and jumps to that location to start executing whatever code is in the MBR.

masterBootRecord.png

The specific code in the MBR could be a Windows MBR loader, code from Linux loaders such as LILO or GRUB, or even a virus. In contrast the partition table is standardized: it is a 64-byte area with four 16-byte entries describing how the disk has been divided up (so you can run multiple operating systems or have separate volumes in the same disk). Traditionally Microsoft MBR code takes a look at the partition table, finds the (only) partition marked as active, loads the boot sector for that partition, and runs that code. The boot sector is the first sector of a partition, as opposed to the first sector for the whole disk. If something is wrong with the partition table you would get messages like ?Invalid Partition Table? or ?Missing Operating System.? This message does not come from the BIOS but rather from the MBR code loaded from disk. Thus the specific message depends on the MBR flavor.

Boot loading has gotten more sophisticated and flexible over time. The Linux boot loaders Lilo and GRUB can handle a wide variety of operating systems, file systems, and boot configurations. Their MBR code does not necessarily follow the ?boot the active partition? approach described above. But functionally the process goes like this:

1. The MBR itself contains the first stage of the boot loader. GRUB calls this stage 1.

2. Due to its tiny size, the code in the MBR does just enough to load another sector from disk that contains additional boostrap code. This sector might be the boot sector for a partition, but could also be a sector that was hard-coded into the MBR code when the MBR was installed.

3. The MBR code plus code loaded in step 2 then read a file containing the second stage of the boot loader. In GRUB this is GRUB Stage 2, and in Windows Server this is c:\NTLDR. If step 2 fails in Windows you?d get a message like ?NTLDR is missing?. The stage 2 code then reads a boot configuration file (e.g., grub.conf in GRUB, boot.ini in Windows). It then presents boot choices to the user or simply goes ahead in a single-boot system.

4. At this point the boot loader code needs to fire up a kernel. It must know enough about file systems to read the kernel from the boot partition. In Linux this means reading a file like ?vmlinuz-2.6.22-14-server? containing the kernel, loading the file into memory and jumping to the kernel bootstrap code. In Windows Server 2003 some of the kernel start-up code is separate from the kernel image itself and is actually embedded into NTLDR. After performing several initializations, NTDLR loads the kernel image from file c:\Windows\System32\ntoskrnl.exe and, just as GRUB does, jumps to the kernel entry point.

There?s a complication worth mentioning (aka, I told you this thing is hacky). The image for a current Linux kernel, even compressed, does not fit into the 640K of RAM available in real mode. My vanilla Ubuntu kernel is 1.7 MB compressed. Yet the boot loader must run in real mode in order to call the BIOS routines for reading from the disk, since the kernel is clearly not available at that point. The solution is the venerable unreal mode. This is not a true processor mode (I wish the engineers at Intel were allowed to have fun like that), but rather a technique where a program switches back and forth between real mode and protected mode in order to access memory above 1MB while still using the BIOS. If you read GRUB source code, you?ll see these transitions all over the place (look under stage2/ for calls to real_to_prot and prot_to_real). At the end of this sticky process the loader has stuffed the kernel in memory, by hook or by crook, but it leaves the processor in real mode when it?s done.

We?re now at the jump from ?Boot Loader? to ?Early Kernel Initialization? as shown in the first diagram. That?s when things heat up as the kernel starts to unfold and set things in motion. The next post will be a guided tour through the Linux Kernel initialization with links to sources at the Linux Cross Reference. I can?t do the same for Windows but I?ll point out the highlights.

Source

Link to comment
https://www.neowin.net/forum/topic/653311-how-computers-boot/
Share on other sites

  • 2 weeks later...
You don't think that knowing the boot sequence for a PC is important? OK, someone here may find it useful .

That really doesnt show anything relevant...

People are more likely to get help from something like:

Power On, system accesses Video, then RAM, then BIOS check...

Having a technical readout of things that cant be realized or changed....dont see how it helps the layman.

That really doesnt show anything relevant...

People are more likely to get help from something like:

Power On, system accesses Video, then RAM, then BIOS check...

Having a technical readout of things that cant be realized or changed....dont see how it helps the layman.

Maybe so but you have the boot sequence wrong. I suggest that you read the first post,. :)

  • 4 weeks later...
  • 2 weeks later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Internet Download Manager (IDM) 6.43 Build 1 by Razvan Serea Internet Download Manager (IDM) is a tool to increase download speeds by up to 8 times due to its smart dynamic file segmentation technology. Unlike other download managers and accelerators, Internet Download Manager segments downloaded files dynamically during download process, and it reuses available connections without additional connect and login stages to achieve the best possible acceleration performance. Comprehensive error recovery and resume capability will restart broken or interrupted downloads due to lost connections, network problems, computer shutdowns, or unexpected power outages. All popular browsers are supported IDM integrates seamlessly into Google Chrome, FireFox, Microsoft Edge, Opera, Safari, Internet Explorer, Maxthon and all other popular browsers to automatically handle your downloads. You can also drag and drop files, or use Internet Download Manager from command line. The program supports proxy servers, ftp and http protocols, firewalls, redirects, cookies, authorization, MP3 audio and video content processing. IDM includes web site spider and grabber IDM downloads all required files that are specified with filters from web sites, for example all pictures from a web site, or subsets of web sites, or complete web sites for offline browsing. It's possible to schedule multiple grabber projects to run them once at a specified time, stop them at a specified time, or run periodically to synchronize changes. Easy downloading with one click When you click on a download link in a browser, IDM will take over the download and accelerate it. You don't need to do anything special, just browse the Internet as you usually do. IDM will catch your downloads and accelerate them. IDM supports HTTP, FTP, HTTPS and MMS protocols. Changes in Internet Download Manager 6.43 Build 1: Added the ability to download MP4 files from web sites where previously only TS videos were available. IDM displays both TS and MP4 file formats in its video download button. If you only need MP4 files, disable TS in IDM Options -> General tab -> Customize IDM Download panels in browsers -> Edit button. Remove TS extension on "Customize IDM Download panel in browsres" dialog Fixed video downloading problems on several popular web sites Fixed bugs Download: Internet Download Manager 6.43 Build 1 | 11.9 MB (Shareware) Links: Internet Download Manager Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • This is of course "clickbait" WTF? It is literally your example but tech based. A "clickbait" title is a sensationalized headline designed to manipulate readers into clicking a link using things like "fear" rather than delivering objective facts. A "clickbait" headline also usually provides little value compared to the hype generated. How does this headline not qualify? It's a generic often reused headline that is overly sensationalized. Oh no! "millions" can't use this app anymore. It has no basic facts like what f*cking app. You read the article and it's the Samsung VPN which no one cares about and there is a million free VPNs. How are you defending this ######? Headlines like this (and among other things) make me read Neowin much less than I used to in the past. It's trash...
    • UniGetUI 2026.2.1 by Razvan Serea UniGetUI is an application whose main goal is to create an intuitive GUI for the most common CLI package managers for Windows 10 and Windows 11, such as Winget, Scoop and Chocolatey. With UniGetUI, you'll be able to download, install, update and uninstall any software that's published on the supported package managers — and so much more. UniGetUI features Install, update and remove software from your system easily at one click: UniGetUI combines the packages from the most used package managers for windows: WinGet, Chocolatey, Scoop, Pip, Npm and .NET Tool. Discover new packages and filter them to easily find the package you want. View detailed metadata about any package before installing it. Get the direct download URL or the name of the publisher, as well as the size of the download. Easily bulk-install, update or uninstall multiple packages at once selecting multiple packages before performing an operation Automatically update packages, or be notified when updates become available. Skip versions or completely ignore updates in a per-package basis. Manage your available updates at the touch of a button from the Widgets pane or from Dev Home pane with UniGetUI Widgets. The system tray icon will also show the available updates and installed package, to efficiently update a program or remove a package from your system. Easily customize how and where packages are installed. Select different installation options and switches for each package. Install an older version or force to install a 32bit architecture. [But don't worry, those options will be saved for future updates for this package] Share packages with your friends to show them off that program you found. Here is an example: Hey @friend, Check out this program! Export custom lists of packages to then import them to another machine and install those packages with previously-specified, custom installation parameters. Setting up machines or configuring a specific software setup has never been easier. Backup your packages to a local file to easily recover your setup in a matter of seconds when migrating to a new machine Devolutions UniGetUI 2026.2.1 changelog: This release brings several quality-of-life improvements, new troubleshooting features, privacy enhancements, and a collection of fixes and stability improvements across UniGetUI. New Features Added an operation counter to provide better visibility into ongoing package operations. Added a setting to automatically redact usernames from exported logs, making it easier to share diagnostic information while protecting personal data. UniGetUI now opens the release notes page after updating by default, helping users discover new features, improvements, and fixes. This behavior can be disabled from Settings. Expanded diagnostics and troubleshooting capabilities to simplify issue reporting and support. Improvements Improved update reliability and handling of update-related edge cases. Enhanced installer behavior when updating running UniGetUI instances. Improved package manager integrations and package metadata processing. Refined various user interface elements for a more consistent experience. Updated package screenshots, icons, and bundled resources. Improved logging and error reporting throughout the application. Bug Fixes Fixed multiple issues affecting application updates and self-update workflows. Resolved several package installation and upgrade edge cases. Fixed UI inconsistencies and unexpected behaviors across different pages. Improved handling of package manager responses and failure scenarios. Addressed issues affecting package discovery and metadata retrieval. Fixed a number of stability issues reported by the community. Performance & Stability Improved overall application stability during package operations. Reduced the likelihood of update interruptions and inconsistent update states. Various reliability and performance optimizations across the codebase. Download: UniGetUI 64-bit | Portable | ~200.0 MB (Open Source) Download: UniGetUI ARM64 | Portable Links: UniGetUI Home Page | GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • PDF4QT 1.6.0.0 by Razvan Serea PDF4QT is a free and open-source application created to provide a complete solution for working with PDF documents in a simple, flexible, and effective way. It offers all the essential tools you need to handle your files: you can view PDFs with smooth navigation, edit content, annotate pages, and highlight key sections for better collaboration. It also allows you to compare two versions of a document, making it easy to spot changes. Built-in security features give you control over protecting sensitive information and managing access. Applications PDF4QT Viewer Profi: Advanced PDF browsing with encryption, digital signature verification, annotation editing, regex text search, page-to-image conversion, and plugin support. PDF4QT Viewer Lite: Lightweight viewer with essential, user-friendly PDF viewing functions. PDF4QT DocPage Organizer: Merge, split, move, clone, or add pages easily with an intuitive interface. PDF4QT DocDiff: Compare two PDFs, highlight differences page-to-page, and export results to XML. Key Features Multithreading Support for faster PDF processing Hardware Accelerated Rendering for smooth, high-quality display Encryption to secure documents Color Management to preserve accurate color profiles Optional Content Handling to control visibility of content Text Layout Analysis for better text extraction and editing Signature Validation for verifying digital signatures Annotations and Form Filling for interactivity Text-to-Speech Conversion to listen to PDFs Advanced Annotation Tools (images, text, etc.) File Attachments Management to view and save attachments Optimization to reduce file size without losing quality Command Line Tool for automation Audio Book Conversion from PDFs Internal Structure Inspector to explore PDF structure Compare Documents to detect differences Redaction to remove sensitive information Document Signing for digital authentication PDF4QT 1.6.0.0 release notes: PDF4QT 1.6.0.0 brings a major image compression and optimization update, especially for PageMaster and assembled output documents. Image compression is now integrated into the assembly/export workflow, backed by new optimizer infrastructure, UI controls, feedback fixes, and tests. This should make PageMaster much more useful for producing smaller output PDFs directly from assembled or reorganized documents. The release also contains a large PageMaster refresh with improved drag and drop, recent files, crop pages, save/restore functionality, rotation and size indicators, a reworked icon set, and faster output preview rendering. Viewer and Editor workflows were improved with wildcard Advanced Find, Enter-to-search behavior, better outline keyboard selection, startup settings, fullscreen support, side-to-side scrolling, smoother scrolling, text selection, snapping, and expanded annotation controls. Compatibility and platform behavior were improved as well, including fixes for embedded files, fonts, checkboxes, invisible text, menu colors, highlights, XMP metadata, Windows color management, AppImage packaging, MSIX generation, installer behavior, translations, and newer compiler/Qt warnings. The commit history also includes a new scan-and-edit plugin foundation and color management performance work. Changelog: Highlights Image compression for PageMaster / DocPage Organizer and assembled output documents (#92) Major PageMaster UX refresh, including drag and drop, recent files, crop pages, save/restore, icons, and output preview performance (#383, #18) Improved image optimization feedback, including final resolution and DPI updates (#384) Better Viewer and Editor navigation: fullscreen, side-to-side scrolling, smoother scrolling, text selection, snapping, and outline keyboard selection (#242, #368, #136, #321, #250, #373) Advanced Find wildcard mode and Enter-to-search behavior (#379, #378) PDF compatibility fixes for embedded files, fonts, checkboxes, invisible text, form content suppression, and Windows color management (#225, #356, #256, #230, #326, #224, #385, #388) Startup settings, custom settings directory support, Linux double-click viewer separation, and packaging/build fixes (#382, #380, #381) Scan-and-edit plugin foundation and broader translation updates from the 1.6.0.0 development cycle Resolved Issues Issue #389: Adding hyperlink to internal object in PDF Issue #388: Update Windows color management system Issue #385: PDFTextLayoutGenerator::isContentKindSuppressed(ContentKind kind) is missing ContentKind::Form Issue #384: In the "Optimize Images" dialog, the info on the final image resolution and final DPI does not update Issue #383: UX improvements for PDF4QT PageMaster tool (v1.5.3.1) (ex. DocPage Organizer) Issue #382: Startup Settings Issue #381: Separated apps for double-click viewer in Linux Issue #380: Ability to run app with custom settings directory - executable parameter with path Issue #379: Advanced Find - Wildcard Mode Issue #378: Advanced Find - Should start searching if Enter key is pressed Issue #376: Deleting a note jumps to Outline Issue #375: Not enough maximum compiled page cache Issue #373: Ctrl/Shift keyboard selection for Outline Issue #372: Option to not color images Issue #370: Extracting pages within a range Issue #369: Keeping redact box on Issue #368: Side-to-side scrolling Issue #357: Bulk delete/add/edit of page labels Issue #356: Compatibility issues - font problems Issue #354: Color blend mode for highlights Issue #352: Icon size of the sidebar Issue #349: Add inherit zoom to bookmark zoom options Issue #338: Editor toolbox higher than editor window Issue #334: Impossible to set French language Issue #326: Checkboxes don't render in PDF4QT Issue #324: Menu text not rendered with correct color Issue #321: Select text in Viewer Issue #291: Support for editing XMP metadata or exporting to PDF/UA format Issue #282: Editor outline view: always zooms to around 50% Issue #256: PDF4QT cannot show some specific fonts correctly Issue #253: Undo/redo doesn't work in "edit page content" mode Issue #250: Snapping Issue #242: Full screen Issue #234: Setting font, font size and area of text annotations Issue #230: Garbled characters when opening PDF files with PDF4QT Issue #225: PDF4QT cannot open PDF files with embedded files Issue #224: Option to remove invisible text Issue #194: Change page size Issue #160: Color | Custom (green/black) does not work Issue #136: Smooth scrolling of document with mouse middle wheel - flywheel Issue #92: Add image compression to PDF DocPage Organizer Issue #18: Performance optimization - OutputPreview Renderer Download: PDF4QT 1.6.0.0 | Portable | ~30.0 MB (Open Source) Download: PDF4QT MSIX | 29.4 MB Links: PDF4QT Home Page | PDF4QT @GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Veteran
      branfont went up a rank
      Veteran
    • Reacting Well
      Almohandis earned a badge
      Reacting Well
    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      472
    2. 2
      +Edouard
      181
    3. 3
      PsYcHoKiLLa
      120
    4. 4
      Steven P.
      85
    5. 5
      neufuse
      73
  • Tell a friend

    Love Neowin? Tell a friend!