installation - Is it possible to take any OS iso and use it to install to a hard drive WHILE staying on windows?
Say i have some hard drives, and each of them needs to install its own OS to it, and i have a windows machine, and i can also hot swap these hard drives, is it possible to take for example a Ubuntu ISO, mount it THEN install the OS to the hard drive without making a bootable usb, restart windows, boot to usb, then use it to install to this hard drive?
the idea is take any installer ISO and sort of emulate so i can run it like I'm running it as a bootable drive but instead inside windows (or any other OS) then use it to install the OS.
Answer
You could run the ISO inside a virtual machine software (such as VirtualBox), connecting the hard drives to the VM, and following the installing procedure as usual.
- Connect your hard drive to the computer.
- Open Windows Disk Management (Win + X > Disk Management)
Identify your disk's number. For example, in the case of the picture below, the disk number we're interested in is #0 (imagine that it didn't have
C:
in it). You can see the disk number at the left-hand side, in the list at the bottom.Open a command line with administrator privileges and run
diskpart
:Select the disk we're interested in (the number should be the one identified before):
DISKPART> select disk 0
Disconnect the disk:
DISKPART> offline disk
Make the disk writable:
DISKPART> attributes disk clear readonly
Quit
diskpart
: DISKPART> exitCreate a VMDK file for your hard drive with the command line with administrator privileges:
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands createrawvmdk -filename C:\PATH\WHERE\SAVE\theImage.vmdk -rawdisk \\.\PhysicalDrive0
Note that you have to replace the number in
\PhysicalDrive0
with the disk number found in step 3.Open VirtualBox and create a new virtual machine, with the disk file we just created. If you have any problem (VERR_ACCESS_DENIED), try opening VirtualBox with admin privileges.
Once created, enter the machine's settings (without starting it, yet), and go to Storage. There, add the ISO of the OS you want to install:
Start the virtual machine, and proceed to install your OS as usual. The disk and partitions that'll appear in the installation program will be from the hard drive we used through all this process.
And that's it!
Comments
Post a Comment