Tuesday, September 12, 2017

Installing Windows 7 on a Linux Mint machine that used to have Windows 7

I have two desktop computers that I got from Free Geek Portland that were running Linux Mint.

One is a Dell Optiplex 790 and the other is a Lenovo Thinkcentre

They both have product keys for Windows 7 Pro OA (whatever that is)

My goal was to get one of them running windows again to set up as a gaming computer capable of playing overwatch.

Warning: before trying any of this, I recommend backing up all your files. Installing an operating system could potentially wipe out any files or operating systems you're currently running on your computer.

To duplicate how I did my installation, you will need internet access, a windows computer to make your bootable usb stick with, and at least one usb flash drive (usb stick, whatever)

These instructions will wipe any data you have on your USB, so back that data up somewhere before trying this. 

You WILL need a product key to complete installation. This is not instructions on how to pirate a copy of Windows.

If you have an installation CD or USB flash drive from when you originally purchased your computer, or if you have a friend that has a Windows 7 installation disc for the type of Windows you need (Home Edition, Pro, etc.) Congratulations, you can just try installing with that.

If you tried booting up that way already and it didn't work, you probably need to adjust your BIOS settings to boot to USB or CD drive first. Try googling BIOS and the type of computer you have for specifics. It generally entails booting up your computer (watch the screen closely for instructions) and hitting F2, F12 or sometimes 'enter' to enter and then change the BIOS settings.


I didn't have a disc to start with so I was going to have to make my own.

First I tried just going to a windows site and installing the OS BUT a lot of the ways to install Windows require you start with a machine that has Windows so I ran into some dead ends.

then I found this link;   https://www.microsoft.com/en-us/software-download/windows7

which seemed like the ticket but when I entered my product key I got this error message;

the product key you entered appears to be for software pre-installed by the device manufacturer. Please contact the device manufacturer for software recovery options.

But I didn't want to do that because I didn't purchase the machine new, I imagine the warranty is expired, and didn't think it would do any good.

It offered a button for FAQs but wasn't helpful. Apparently there's a difference between a copy of Windows you would purchase from the store (that would have a product key) and would work on any computer, and a product key from a copy of windows that came pre-installed.

so I did some googling and found this link, which basically lets you download a copy of windows without the product key. YOU WILL STILL NEED TO ENTER IT LATER. Also, installing this way on the Dell Optiplex 790 worked, but for some reason the internet didn't. I had to go on another machine and download drivers for it, put them on my usb stick, and install that way.

I only recommend this if you, like me, are too stubborn to contact the manufacturer like Windows recommends, you have some knowledge of computing, and you are willing to take the chance of disabling your computer.

https://www.heidoc.net/joomla/technology-science/microsoft/14-windows-7-direct-download-links

I used the 'windows and Office ISO Downloader' from Heidoc.net

Once I got that going, I was given a choice of what type of windows I wanted to download ( you can't go older than windows 7 or office 2007)

I didn't see Windows Pro OA like on my product key sticker so I chose Windows Pro SP1 (service pack 1)

The next mistake I made was I didn't realize there was a difference between just putting the iso on a usb stick and booting up, and creating a bootable usb stick.

When I tried booting to the usb I got this error;

Error: No configuration file found No DEFAULT or UI configuration directive found! boot:

I had skipped the step of taking the iso file I had downloaded and creating a bootable usb stick.

I needed the windows7 usb/dvd tool, which I found here;

https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool

When you go to that page, it directs you here;

http://wudt.codeplex.com/

(editing my post and having some trouble with this link. If you can't get it to work you may need to find another way to create your USB flash drive. It did work for me this way and I installed windows 7 on two different computers so...)
 (evidently codeplex is shutting down soon per the homepage on this link, which tells you to read Brian Harry's blog)

https://blogs.msdn.microsoft.com/bharry/2017/03/31/shutting-down-codeplex/

At this point you should be able to load your usb/dvd tool and create your bootable usb flash drive stick from the iso file you got before.

Now you have to ask the question: do I care about the operating system I already have? Do I just want a totally new install with just windows or do I want to dual boot linux?

If you don't care about what's on your machine, you can proceed with installation.

Your BIOS will have to be set to boot to your USB or CD before it looks at your hard drive, otherwise it will just boot to the operating system you already have.

Maybe I will talk about BIOS and partitioning (I'm expert at neither) in another post, because this is getting lengthy. I'm going to assume you've backed up all your files and you're not trying to do a dual-boot.

You should boot into windows installation now. If it comes to the part where it shows you the partitions on your hard drive and it tells you windows can't install on either of them, hit delete. This will delete the partition in question (I had two, one appeared somewhat larger and fuller than the other, which I assume was the one with my linux and files on it) and allow you to install windows.

Sometime around now you'll need to enter a product key

On my dell optiplex 790, the internet didn't work right away and I had to find a driver for the network adapter or whatever. I googled dell optiplex 790 drivers from my other computer and it took me here;

http://www.dell.com/support/home/us/en/4/product-support/product/optiplex-790/drivers

Cool! It's always nice to download straight from the manufacturer instead of a random website.

I clicked 'find it myself' (it generally assumes you're downloading drivers for the computer you're currently online with, that was not the case with me) scrolled down, and found 7 drivers under the category 'network'

I put all 7 on a usb stick and went to install them on the Optiplex. The first one worked. Not sure exactly which one, but I was going to install them all if need be.

Funny I thought when I installed windows on the Dell Optiplex that I deleted the Linux, but it automatically created a dual-boot function through the GNU grub menu and I now have a dual boot screen that comes up when I boot up. A happy accident.

I had so much fun I then went and installed windows on the Lenovo Thinkcentre. This time I decided to try and partition the hard drive myself first.

See, Linux has a handy hard drive partitioner called gparted, but you can't partition a hard drive you're currently running on, so I would now need a USB flash drive with a Linux Mint iso much like the flash drive I just made with the windows iso. Here's the link I found;

https://mintguide.org/tools/317-make-a-bootable-flash-drive-from-an-iso-image-on-linux-mint.html

This will give you great instructions for creating your linux flash drive from a windows, linux, or mac machine. This is a cool thing to have because you can use it to install linux on almost any computer (you still can't put 64 on a computer that requires 32), partition a drive, or try to revive a dead computer

I was using my linux machine so I scrolled down and followed the instructions to install unetbootin from terminal commands;

Ctl Alt T to open your terminal and type these lines one at a time (hitting enter after each line and waiting for the computer to do it's thing)

sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin extlinux
 
Then I just went to my linux mint menu and searched unetbootin and there it was, clicked on it and was ready to make my linux flash drive. It should be formatted FAT32 if it is not already formatted, first go to your USB formatter from your linux mint menu and format your usb stick (or if you have a shortcut for your usb stick on the desktop, right click it and select 'format') that part was super easy.

once running unetbootin, you should get a choice of what flavor linux you want to download and off you go. I chose linux mint 17.1

Now I rebooted to my new linux flash drive, but instead of installing, I hit quit. (Also it gave me a menu on different ways to boot, It was set to default so I just let it use default)

This will take you into a live boot which basically looks like you just installed Linux Mint (you can do this with Ubuntu and others too)

Now I was ready to run gparted and partition my drive.

Ctl Alt T to open your terminal and enter

sudo apt-get install gparted 

Went to my menu and did a search (I'm not always sure where things end up when I download or install them) and found gparted and clicked on it.

gparted started up and showed me my partitions. I clicked on the largest one and tried to resize it from the left side and got some error message, so I click dragged from the right side and reduced it to about 2/3 of what it was.

My goal was to create a new partition and format it NTFS (the file system windows uses) to do a dual install and retain my current linux os and files. An iso file is about 3gb so I wanted my partition to be around 10gb to have some wiggle room. I figured I could maybe go back and increase the size later if needed.

I got some warning that I might lose data and I should have backed up everything at this point.

This part was easy, but it did take awhile to do.

Once my partitions were created, I rebooted with the windows flash drive and went to install it.

This time, when I got to the screen with the partitions, I had one that was formatted NTFS and ready for windows to install on. Everything seemed to be working great but....

Once windows was installed it will now only boot to windows. Not sure if I can boot to the linux partition. Maybe I forgot to install GNU grub or something, maybe there is a different better way to dual boot with the Lenovo (I had read online that sometimes when doing Windows updates it can screw up your GNU grub menu, and a guy at work told me he has a dual boot system with multiple hard drives on his computer to prevent this.)

Anyways, after all that extra trouble partitioning the drive the dual boot didn't work and I may have lost access to the files on that partition of my hard drive (help?) still, I learned a LOT these past few days and I have my Linux flash drive in case i want to go back and install it on the Lenovo. I think I will try and do like my friend at work and build a dual hard-drive machine, and dual boot from BIOS.

I hope after all I went through this blog helps out some random person out there that has had similar problems that I had.

Edit follow up: I was able to boot into windows 7 and download something called easy bcd from neosmart technologies (free for non-commercial use, just scroll down the page)

http://neosmart.net/EasyBCD/

I added a boot option and used the Grub2 setting and now I can boot into my linux partition and I regained access to all of my files. You should be able to tell which partition is which by the size (which you allocated with gparted previously if you followed all my instructions)

The one thing on my Lenovo Thinkcentre that's not working on windows is the built-in speaker, but I'm not worried about that. I kind of like not having it working. I could probably find a driver for it but I'm going to leave it for now.


No comments:

Post a Comment