Installing Windows 10 on a friend’s computer.

So, I had a laptop here that was having a problem in the BIOS. I took it to the technicians and they couldn’t solve the problem. I got a new computer and gave the old one to a friend, who solved the BIOS problem. He then sent me the old PC back, but now I had no use for it. So I gave it to my mother, who knows how to handle Linux without any major problems, but she also had no use for the old computer. She passed the laptop on to a friend of mine, who is completely new to Linux, which was the operating system installed on the machine.

A week later, the guy asks me for help, saying that he wasn’t getting along with Linux. I used to be a Linux fanatic, but I became more tolerant of Windows and suggested installing Windows on his PC. But why wasn’t he getting along with Linux?

Before proceeding, one must understand that Linux is a kernel, not a complete operating system, that mimics the Unix ways without embedding code directly from Unix. Thus, Linux is used to build operating systems similar to Unix. Such a system has four fundamental components: the kernel (in this case, Linux), C code libraries, a command interpreter and applications. The other components that will form the complete system together with Linux generally come from the GNU project. That’s why the complete systems are also called GNU / Linux. The ones I’ve used are Ubuntu, Tails (obviously), Debian, Mint, Manjaro and MX.

The machine I sent to the guy had MX installed in it. Bad for beginners. The graphical user interface is not a fundamental component of a Unix-like system: it can be modified, replaced and even completely removed. Remember the days of DOS? Well, then, it’s the same mechanics behind the first three versions of Windows: in the past, Windows was simply an interface that could be installed on MS-DOS, PC-DOS or DR-DOS, rather than a complete system. So much so that Windows could be installed and then removed from DOS without harming the system. Because of this mechanics, if you don’t like the MX interface, called Xfce, you can replace it with GNOME, KDE or anything else.

The problem is that the beginner often does not know how to do this. In Brazil, Windows 7 is still highly popular, which is not a good thing. So most people who come from Windows 7 to Linux have no concept software repository, which is where Linux system administrators install what they need, including interfaces. Then, he eventually lost his mind and begged mercy.

I don’t blame him. The debate about which is better, Linux or Windows, is a pissing contest. The best system is the one that best meets your needs as user. If you’re willing to sacrifice some stability for customization and ease of use, use Windows. If you prefer to sacrifice some ease of use in exchange for customization and stability, you go for Linux. If you prefer to sacrifice a little customization for stability and ease, go for Mac OS. If you want to do something completely alien, go for BSD. Or that pony thing. And so on.

But installing Windows on that machine was a nightmare. I didn’t imagine that I would have to do so much.

Downloading Windows and preparing the flash drive.

The best part of Windows 10 is that it is available for free download on the Microsoft website. There is no need for activation keys. And, really, one of the reasons I switched to Linux was that I wasn’t willing to do something illegal just to have a working system. I was willing to learn a new system if it meant not breaking any laws. This, of course, because I didn’t have the money for a legitimate copy of Windows Vista Ultimate, which was what I was using at the time (on an Acer Aspire 5315, imagine that).

Downloading was easy. It was difficult to create a bootable device. In Linux, it’s easy to create a flash drive for live sessions … if the system in the flash drive is also Linux … I tried to create a bootable USB flash drive with the same method that I use to create bootable Linux devices. No luck. It didn’t boot at all. I took the BIOS out of legacy mode, put it on UEFI mode. Nothing. I enabled and disabled secure boot. Nothing with nothing. Damn it, mare! What went wrong?

WoeUSB.

I have no idea where the problem was. While trying to find a solution, I found WoeUSB. It is a program (basically a script ) that is made to prepare flash drives with Windows on a Linux machine, provided the dependencies are satisfied. But I only found it as source code and through a personal package archive (PPA), which is an Ubuntu thing. I’m on MX, so I couldn’t use that. I looked for WoeUSB in my repositories and didn’t find it. Okay… I kept trying all other methods, without succeeding. I was already preparing my psyche to face the pains of software compilation, in case I had to use the source code of WoeUSB. When everything went wrong, I realized that I would have to use the source code for WoeUSB. I had nowhere to run.

Fortunately, I didn’t have to compile anything. WoeUSB is simply a script that operates pre-existing programs in the system and, like any script, it just needs to be run from the Terminal. And to think that I could have done it from the start, saving me an afternoon of work.

woeusb –device /home/yure/windows /dev/sdb

It gave error: “you are not running WoeUSB as root!” Oh yes. I forgot, sorry.

sudo woeusb –device /home/yure/windows /dev/sdb

It gave another error. Apparently, my flash drive (/dev/sdb) was not a “block”. In other words: nothing could be written on it. Okay, let’s try to format it… I formatted it and tried again. Same problem. Damn it, mare! Okay, let’s try to delete the partition table from the device. I opened Gparted, plugged in the device, selected the “device” tab and deleted the partition table, creating a new GPT one. I ended up with a large unallocated space, which I formatted as NTFS. I left it at that and tried again. This time, the thing worked. There was an error at the very end, but it was a purely cosmetic error that could be ignored.

I restarted the computer with the flash drive, now ready, plugged into the PC. GRUB opened, and from GRUB, Windows 10 started the installation process. I thought: “oh, this is the trick, then.” For some reason, my BIOS did not start Windows on the flash drive, but if you have Linux installed on your machine, it is assumed that the BIOS can start GRUB2, which is the boot loader for all modern Linux systems. The trick is to get the BIOS to start GRUB, installed on the USB flash drive with WoeUSB, and let GRUB start the Windows installer. Great! And what an adventure…

What we learned today.

1) Not everyone gets along with Xfce, of course.

2) Methods used to write Linux to a flash drive may not be sufficient to write Windows, requiring special methods.

The method used, step-by-step.

1) Turn on the computer on which you want to install Windows and, while it turns on, enter the BIOS (on my computer, this is done by pressing F2 while the Acer logo is on the screen).

2) In the BIOS, set boot from UEFI to legacy and change the boot order so that USB comes first.

3) Download Windows 10 from the MS website.

4) Open a Terminal and install the WoeUSB dependencies (assuming you are using MX Linux, use the command sudo apt-get install bash coreutils util-linux grep gawk find grub gparted wget).

5) Download WoeUSB (you download it on Github via the code button).

6) Rename the Windows that you downloaded to windows.iso and put it in your home directory, next to the other folders (Documents and Downloads, for example).

7) Extract the contents of the zip that WoeUSB came from.

8) Inside the WoeUSB directory there is a folder called sbin and, inside it, the script.

9) Open a terminal in that location (right click> open terminal here).

10) Plug the flash drive, open Gparted, select the target device (usually /dev/sdb) and, in the “device” tab, create a GPT partition table.

11) Still in Gparted, create an NTFS partition using the unallocated space.

12) In the terminal you just opened, give the command sudo woeusb –device ~/windows.iso /dev/sdb (note that “/dev/sdb” must be replaced according to the name of your device).

13) Wait until it finishes and restart the computer without removing the flash drive.

Am I forgetting something? Well, it worked, that’s what matters…

Publicado por Yure

Quando eu me formei, minha turma teve que fazer um juramento coletivo. Como minha religião não me permite jurar nem prometer, eu só mexi os lábios, mas resolvi viver com os objetivos do juramento em mente de qualquer forma.

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s

Este site utiliza o Akismet para reduzir spam. Saiba como seus dados em comentários são processados.

%d blogueiros gostam disto: