2

Is there any way to install windows 7 from ubuntu 14.04 to a portable hard disk?

mghh
  • 21
  • This question is more about Windows than Ubuntu, so please ask on Super User. – wjandrea Jun 15 '18 at 18:51
  • The same way you can install any ISO https://askubuntu.com/a/377561/15811 @wjandrea I disagree somewhat. He can by using Ubuntu and dd so that seems valid to me. But asked before it surely is :) That the dupe is about an Ubuntu ISO does not matter: change the file name to Windows 7. If W7 -can- be installed portable is beyond our expertise though. – Rinzwind Jun 15 '18 at 18:53
  • @Rinzwind For creating a Windows USB installer, there is a specific question about that here. But what OP wants to do is install Windows, which I figure is off-topic. – wjandrea Jun 15 '18 at 19:07

1 Answers1

1

You mean install windows 7 to a portable hard disk from an ubuntu 14.04 system?

Under the Ubuntu system if you install qemu you can run the Windows 7 installer as a virtual machine with the Ubuntu system acting as the host machine. With qemu you can pass the physical portable hard drive as the Windows 7 guest machine's hard disk and after the install you'll have an external drive you can boot Windows 7 off of.

First Install qemu:

sudo apt-get install qemu-kvm qemu

Identify the disk for your portable hard drive:

sudo fdisk -l

Launch the windows 7 installer in a Virtual Machine and pass the portable hard disk (Read my Note before running the command):

sudo qemu-system-x86_x64 --enable-kvm -m 2048 -hda /dev/sdb -cdrom win-installer.iso

NOTE: the above command makes some (potentially dangerous) assumptions. It assumes your portable hard disk is recognized as "/dev/sdb" make sure you substitute the correct one so you don't overwrite the wrong drive. (use the disk identifier not the partition number. For example you wouldn't use /dev/sdb1). It also assumes you can safely allocate 2G of RAM to a Virtual Machine and you have a windows7 installer iso image called "win-installer.iso". Ensure you substitute the file names and drive identifiers with the correct value. ALSO, make sure your portable hard drive is NOT mounted on the Ubuntu host machine at the time of running this command.

After following the windows install process and you safely shut down the Virtual Machine you can then plug the portable hard drive into a physical machine and boot off the drive into your windows installation. Anticipate potential issues regarding drivers when going from a virtual machine to a physical machine or switching physical machines.