Whenever I install a operating system through dvd/usb drive the operating system loads the installer, extracts the files & makes the required installation.

Where does the operating system files reside/will be located while installing a new operating system? For example, whenever we install a software in Windows it will be stored under some temp folder and installation will get installed, is it there any such a thing happens while installing a new operating system?

Where do the files reside during installation?


For the GNU/Linux case, there are mainly 3 ways to install:

  1. Using a LiveCD/DVD/USB. In this case, the installer from the LiveCD either extracts the SquashFS filesystem directly to the hard drive (after partitioning it), then does some adjustments, or copies 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 is more or less a simple copy/paste from one filesystem to another.
  2. 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 execute some post-install script (the same way when you install 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 example.
  3. 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 temporarily stored on the target filesystem, generally in /var/cache/<package_manager> 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:

  1. Boot on a minimal text-installer. This one loads all drivers available, partitions and formats the disk, then extracts files from the i386 folder to the hard drive. It also installs a bootloader on the MBR.
  2. 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.
  3. 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 run from an MS-DOS system, which is installed 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 phase 1 and 2, you'll see something looking like a minimal Windows installation.

  • 1
    The setup in NT3 and NT4 is pretty much identical to that in XP and Server 2003. A replacement was definitely overdue when Vista arrived!
    – ntoskrnl
    Mar 4 '14 at 15:40

During the early stage of the installation, they reside either on the installation medium or in memory. During the later stage of installation, typically after the first reboot, they are already installed onto the target.

It frequently depends on the type of installer. Some installers put key files in a RAM disk and load the installation information from a network. Some installers run like a normal program in their early stages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.