How does an OS detect the hardware it's being installed on?

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
Hello,

I installed Windows on an IBM platform computer with a standard x86-64 architecture.

I then took the HD out and popped it into another IBM x86-64 computer from another manufacturer.

The OS booted and the splash screen showed up for about 1.5 seconds.

Then, it crashed and blue-screened.

I tried over and over and got the same result.

It occurred to me that the Windows installation was specific to the machine that it was installed on, and despite the fact that many machines are based on x86-64 architecture, the HD can't be swapped in and out of random computers.

My question is: How does the installation code know which version of itself to install?

Does it query the BIOS?

Does it query individual chips?

What does this "query code" look like?

How many different sub-versions of Windows (or Linux, etc...) are included in standard OS installation files?

Thanks.
 

zir_blazer

Golden Member
Jun 6, 2013
1,217
507
136
I don't know your definition of "IBM x86-64 platform computer" since when you mention that you popped it into another computer from a different manufacturer, you can't obviously be talking about something IBM branded. You're just missing saying "IBM PC compatible", a term originating in the 80's.

Windows is usually not easily migrable if you pick the HD from one computer and put it in another one, since it also installs device specific Drivers for things like the Chipset, which usually BSODs if you try to straight transfer them to a totally different computer.
How Windows knows what devices there are? Look for "Plug and Play" and PCI Device ID info.
 

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
How Windows knows what devices there are? Look for "Plug and Play" and PCI Device ID info.

How old can hardware be and still be compatible with modern OS's?

How many different types of chipsets do the software engineers plan for?

Thanks.
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
@ chrstrbrts: First one needs to gain some insight into how a PC actually works, as shown in this block diagram...

CNhVA1.png


...because the questions you would like answers for won't make any sense to you until you've done a little research so that you understand what each of those terms in the diagram represent. In the process of doing that, I think you'll find that you will have answered your own questions, and gained valuable knowledge as well.

.
 

Puffnstuff

Lifer
Mar 9, 2005
16,187
4,871
136
I find this thread amusing in that someone would think that they could just install an OS onto a particular pc and then start running the boot drive in any old setup without issue. :awe:
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,528
415
126
It not a matter of Old if the Computer past the BIOS boot, got into the OS and crash it means that the one of few of the component do not have the correct driver to load. I.e, the chipset, or and a component of the second computer are not the same as the computer that the HD was taken form. Age is not relevant in this matter.

Knowing the level of compatibility can be asses by reading the detailed Specs of each computer and have technical knowledge that help One to understand the situation.

Also logging to the BIOS of the computers before the OS boot and makes sure that the BIOS are configured similarly in both computers might help too.



:cool:
 
Last edited:

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
I find this thread amusing in that someone would think that they could just install an OS onto a particular pc and then start running the boot drive in any old setup without issue. :awe:

Why not? Linux works that way, for the most part.
 

lxskllr

No Lifer
Nov 30, 2004
59,067
9,469
126
I find this thread amusing in that someone would think that they could just install an OS onto a particular pc and then start running the boot drive in any old setup without issue. :awe:

No reason it won't work. My work computer is running a Xubuntu hd on intel/nvidia hardware that started life as an amd netbook. Started up first boot, and has been running for going on two years.
 

SimMike2

Platinum Member
Aug 15, 2000
2,577
1
81
You don't specify which version of Windows. Wide variation in how the different versions react to big hardware changes.
 

Magic Carpet

Diamond Member
Oct 2, 2011
3,477
233
106
You don't specify which version of Windows. Wide variation in how the different versions react to big hardware changes.
I remember Windows XP VLK, which didn't have the same hardware activation mambo-jambos as the consumer release. You could literally change your hardware parts every day, without any re-activation hassle. Those were the days :cool:

Windows_XP.jpg

That was famous.
 
Last edited:

Raduque

Lifer
Aug 22, 2004
13,140
138
106
I remember Windows XP VLK, which didn't have the same hardware activation mambo-jambos as the consumer release. You could literally change your hardware parts every day, without any re-activation hassle. Those were the days :cool:

Windows_XP.jpg

That was famous.

That's.... not at all what they're talking about.

As for the OP's question, Windows Setup detects the hardware and hands Windows the drivers saying "this is what hardware you're going to run on". Windows takes those drivers and loads them on every boot. If the hardware is different from the drivers, they crash, windows crashes, everything crashes. Simple.
 

Hi-Fi Man

Senior member
Oct 19, 2013
601
120
106
Windows for the most part uses generic drivers included with the OS to communicate with the hardware. Said drivers are compatible with a lot of hardware and Windows generally does not have issues when swapped into different hardware however, there is an exception to this. The infamous AHCI and IDE driver are what cause the majority of Windows swap BSODs. Windows uses separate drivers for SATA controllers operating in AHCI mode and IDE mode and it doesn't switch them automatically (you have to edit a registry key, win8+ safe mode does the same thing I believe).

I remember when I started working at Tigerdirect as an A+ tech, all the guys there were like "zomg you can't do that!!!1 Winblows will crash". I kindly showed them you can as long as the SATA controller was in the same mode on both machines and the generic Windows drivers were compatible with the essential hardware. The look on their faces when Windows booted in another machine... priceless.

Of course Windows will complain about activation but that's a separate issue.
 
Last edited:

SPBHM

Diamond Member
Sep 12, 2012
5,065
418
126
yes the biggest problem is the HD controller driver, the time I made it (transferred the HD with an install) keeping the same controller it was fine, I lost the activation (which is tied to the motherboard) but the OS still worked.

but it seems like windows 8/10 will boot in safe mode with the wrong HD controller driver and fix it.
 

Mushkins

Golden Member
Feb 11, 2013
1,631
0
0
Windows for the most part uses generic drivers included with the OS to communicate with the hardware. Said drivers are compatible with a lot of hardware and Windows generally does not have issues when swapped into different hardware however, there is an exception to this. The infamous AHCI and IDE driver are what cause the majority of Windows swap BSODs. Windows uses separate drivers for SATA controllers operating in AHCI mode and IDE mode and it doesn't switch them automatically (you have to edit a registry key, win8+ safe mode does the same thing I believe).

I remember when I started working at Tigerdirect as an A+ tech, all the guys there were like "zomg you can't do that!!!1 Winblows will crash". I kindly showed them you can as long as the SATA controller was in the same mode on both machines and the generic Windows drivers were compatible with the essential hardware. The look on their faces when Windows booted in another machine... priceless.

Of course Windows will complain about activation but that's a separate issue.


Dont forget SecureBoot. Which is specifically designed to stop these kinds of hardware swaps for security reasons.

Long story short is while it *might* work, it's a bad practice. If you're doing a full system build it's best to do a fresh install.
 

Hi-Fi Man

Senior member
Oct 19, 2013
601
120
106
Dont forget SecureBoot. Which is specifically designed to stop these kinds of hardware swaps for security reasons.

Long story short is while it *might* work, it's a bad practice. If you're doing a full system build it's best to do a fresh install.

I'm awful then because every time I've ever done a platform upgrade I always just stick in the boot drive, data drive, install any needed drivers and call it a day :p. Too much work to reinstall the OS and all my crap.
 

QuietDad

Senior member
Dec 18, 2005
523
79
91
You can better your chances that before removing the harddrive from the working system, you install the chipset drivers from the mother board in the system it's going into. Chipset drivers usually come with the and are specific to the motherboard and Windows doesn't have a whole lot of them included. BSODs can be the results of finding the new hardware and have no drivers for it.