1

I think for myself that this could be very complicated... but maybe there is a possibility:

is it possible to install an OS (like Windows 7 e.g.) on a Computer while running another OS (e.g. Linux)? Like you would start up a Virtual Machine Hypervisor, which let the installer access all the stuff it needs and let the virtual running OS see all its needed Hardware (like Mainboard, ...)

I know that it could be very complicated because you need to somehow manage that one operating system is not gathering locks for the hw which will lock out the hypervisor... But a virtual hardware (like VirtualBox or VMWare does) would also guides to trouble because than you couldnt start up Windows after installation...

maybe someone has thought about that earlier?

3
  • Most LiveCD installers do this, though they're installing the same OS that's already running. Feb 6, 2012 at 18:45
  • @Amazed yes but they are just copying the binary files to the harddisk, reboot and then run the real system...
    – reox
    Feb 7, 2012 at 16:34
  • that's not been my experience, at least with non-Windows install media. Feb 7, 2012 at 18:05

3 Answers 3

1

Yes, without virtualization; but only as far as phase one.

Windows NT versions 3 and 4 for x86 used to be installable from within MS-DOS, by running a DOS program named winnt.exe. (This was dropped in later versions. MS-DOS doesn't double up as a "pre-boot" recovery/install environment any more. A cut-down version of Windows NT itself, Windows PE, is used nowadays and has been since Windows NT 5.1.)

This was a normal DOS program that would begin the first phase of installation. Of course, subsequent phases of the installation process required bootstrapping into the part-installed operating system, so not all of the installation procedure was done whilst running another operating system.

For any operating system it is theoretically possible to write an installer program that will run on top of a different (general purpose) operating system, for performing at least the initial phase of installation (picking a boot volume and planting system files and the second stage installer program on it). Almost no-one produces installer programs like that for current operating systems, however. Most installation programs run on top of the target operating system itself, usually as bootstrapped from a removable DASD.

2

This can be easily done in Linux:

1 - Make a mount point for your partition (for this example, I will use /mnt/fs).

2 - Mount your partition: mount /dev/[device] /mnt/fs.

3 - Move the basic directory structure into the mount point (this should contain binutils, and a shell).

4 - If you have your /var, /boot or any other directory separated from your / partition, mount them into your mount point. Example: mount --rbind /var /mnt/fs/var.

5 - Mount the /proc and /dev filesystems: mount -t proc none /mnt/fs/proc and mount --rbind /dev /mnt/fs/dev.

6 - Chroot into the fs and configure your fresh install: chroot /mnt/fs <here goes your shell, ex: /bin/bash>.

You can read more about the process in the Gentoo handbook.

EDIT: This probably can't be done for Windows or Mac installs.

2
  • the chroot isnt a different OS.. you are still running the same kernel. So my consideration was to run two kernels on the same machine - as written as answer, it should work but nobody did it yet, as i understood.
    – reox
    Feb 7, 2012 at 16:36
  • the question itself was, to my understanding "is it possible to install an OS (like Windows 7 e.g.) on a Computer while running another OS (e.g. Linux)?". In any case, I know of no way to run two kernels at the same time, not without virtualization. This post points to User-mode Linux, but that seems to be virtualization.
    – Misguided
    Feb 7, 2012 at 18:13
0

You can use a LiveCD that'll give you a virtualized OS in a window inside another OS or you can use a desktop Virtual Machine program like VirtualBox to do the same thing, and if the first OS is already virtualized on the hardware, you can create another VM and install an OS to it because the virtualization host manages the hardware access and prevents one of the VM OSes from locking up the hardware.

But you cannot have a non-virtualized OS running and then use a virtualization framework allow direct access to that same hardware to install another OS into what would be essentially a dual-boot configurattion.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .