There are 30 steps for everything:

1. $ sudo su

2. apt install gparted filezilla grub2 wimtools -y

The grub setup starts. Click Ok, mark which disk to put on, confirm and at the end select Yes.

3. gparted

Run gparted, delete the current partitions and split the disk into 3 parts:

We leave the initial part, larger, unmarked, we will install Windows on it, format the second and third (10-20 gigs) as ntfs

Next, we make the first section bootable:

4. gdisk / dev / sda

5.r

6.g

7.p

8.w

9.Y

10. mount / dev / sda1 / mnt

11. cd ~

12. mkdir disk

13. mount / dev / sda2 disk

14. grub-install --root-directory = / mnt / dev / sda

15. cd / mnt / boot / grub

16. nano grub.cfg

We create a grub menu by writing the following in the config:

menuentry "Windows installer" {

insmod ntfs

search --set = root --file = / bootmgr

ntldr / bootmgr

boot

}

Save the file by pressing sequentially: Ctrl + X, Y and press Enter

17. cd / root / disk

18. mkdir wincd

Next, you need a link to download the Windows ISO.

Let's analyze it using the example of Windows 10, but of course you can use the Windows Server source by uploading it to your host.

AT In the last post, I showed you how to get Windows 10 ISO from Microsoft official website.

We copy this full link to the iso along with the end (session id), otherwise the microsoft site will send you away, saying Forbidden 403.

And we shorten it through any link shortening service (I was given https://bit.ly/3dDkkBe ). Short links usually do not last long and I do not guarantee the functionality of my links.

Download the distribution kit via a short url and on the fly rename the downloaded file 3dDkkBe to win10.iso

19. wget -O win10.iso https://bit.ly/3dDkkBe

"Preparing the installation disc" =)

Mount, copy files from iso and unmount

20. mount -o loop win10.iso wincd

21. rsync -avz --progress wincd / * / mnt

22. umount wincd

Downloading .iso VirtIO drivers

You can select the stable and the latest version here: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/

23. wget -O virtio.iso https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.185-1/virtio-win-0.1.185 .iso

For some reason, fedorapeople.org with vps contabo did not ping, so I uploaded to the Yandex disk

https://yadi.sk/d/eb-NHOi2uvTwfw - virtio-win-0.1.185.iso

https://yadi.sk/d/AgHooxuabfzqQA - virtio-stable-win-0.1.171.iso

In case of using VirtIO drivers from a Yandex disk:

Follow the link https://yadi.sk/d/eb-NHOi2uvTwfw, click download on your computer, copy the full link to the file from the browser (something like this https://s196vla.storage.yandex.net/rdisk/ 02e16cf0b1047..here-very-long-link) and drive it into the bit.ly link shortener. We continue with a short link https://bit.ly/2YEhiIt

23. wget -O virtio.iso https://bit.ly/2YEhiIt

24. mount -o loop virtio.iso wincd

25. mkdir / mnt / sources / virtio

26. rsync -avz --progress wincd / * / mnt / sources / virtio

27. cd / mnt / sources

28.# touch cmd.txt

29. echo 'add virtio / virtio_drivers' >> cmd.txt

30. wimlib-imagex update boot.wim 2 <cmd.txt

if "<" is not pressed, set the virtual key florence

29.1 apt install florence

reboot




The Windows installer is loaded, it will ask for the driver when loading. Select Boot (X :) / virtio_drivers / amd64 / and then select your OS (Win10).

After loading and initial configuration, add the drivers for the network and PCI device. During installation, specify the folder on Boot (X :) / virtio_drivers and check the "search in subfolders" box

The last step is to allow remote connection. We reboot.

Everything is ready! You can connect via RDP.

PS I will share another good affiliate program that I use on my doorway drops - RedPush

Push notifications, payments within half a day, I usually receive within a couple of hours, including on weekends.

By the way, if you registered using my link from the article, I will help with the setup if you blunt somewhere.