For the GNU/Linux case, there are mainly 3 way to install :
- Using a LiveCD/DVD/USB. In this case, the installer from the LiveCD either extract directly the SquashFS filesystem to the hard drive (after partitionning it), then do some adjustments, or copy the currently mounted root filesystem, which is a virtual filesystem consisting of the SquashFS archive and a RAM disk storing temporary modification when running the LiveCD. This more or less a simple copy/paste from one filesystem to another.
- Using an installation CD/DVD/USB. Here, the installer, which is generally loaded in RAM in an init ram disk will extract packages located on the installation medium to the target filesystem, and executes some post-install script. (the same way when you install a software in a running GNU/Linux system) It might need to store some temporary files on the target filesystem, those should be located in /tmp or /var/cache for exemple.
- Using a netboot installer. This is the same as above, but since the installation medium doesn't contain the packages needed for installation, it has to download them. They are temporarly stored on the target filesystem, generally in /var/cache/ or /tmp too.
(I'm not sure about the following information)
Windows NT6+ (from Windows Vista) loads the boot.wim file in RAM, it contains a WinPE image with the installation software. Basically, it copies the content of install.wim (the right subdirectory for the current Windows edition) to the hard drive, then runs some scripts to finalize the installation. But the installation really finishes after the first boot.
Windows NT5 (2000-XP) contains 3 phases :
- Boot on a minimal text-installer. This one loads all drivers available, partitions and format the disk, then extract files from the i386 folder to the hard drive. It also installs a bootloader on the MBR.
- Boot on the hard drive, which now contains a minimalist Windows installation. It runs an installer which extracts remaining files from the installation medium, and performs some drivers/settings adjustments and other configuration.
- First boot up finalizes the installation
Windows 3 (and maybe 1 and 2) is the same as the above, but the installation is already finished before the first boot. Also the installer is ran from an MS-DOS system, which is installer on the first floppy disk or already on the hard drive.
Don't know for Windows 95-98-Me, but it should look like Windows 3. Don't know for NT3-NT4.
If you look at the content of your hard drive between the phase 1 and 2, you'll see something looking like a minimal Windows installation.