Add files via upload
This commit is contained in:
117
README.md
117
README.md
@@ -1 +1,116 @@
|
||||
# Windows-Server-Contabo-VPS-main
|
||||
# Windows Server on a Contabo VPS - Installation Guide
|
||||
|
||||
## Introduction
|
||||
|
||||
This guide provides step-by-step instructions for installing Windows 10 on a Contabo VPS. Please be aware that you assume full responsibility for all risks associated with this installation.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- VNC Viewer application installed. Download it from [here](https://www.realvnc.com/en/connect/download/viewer/).
|
||||
- A Contabo VPS
|
||||
- Microsoft Remote Desktop for RDP connection to the machine.
|
||||
|
||||
## Steps for installation
|
||||
|
||||
### 1. Prepare the VPS for installation
|
||||
|
||||
- Purchase a new Ubuntu VPS
|
||||
- Log in to the Contabo user panel and navigate to the "Your services" section.
|
||||
- On your VPS click the "Manage" button and select "Rescue System".
|
||||
- Choose "Debian 10 - Live" from the "Rescue System Version" dropdown menu.
|
||||
- Set a password and start the Rescue System.
|
||||
- From the control panel go to "VPS control".
|
||||
- Click the "Manage" button and select "VNC password".
|
||||
- Set the VNC password. It must be 8 characters long, containing at least one uppercase and one lowercase character, and one number. Avoid using any special characters.
|
||||
|
||||
### 2. Connect to the VPS via SSH
|
||||
|
||||
- Open Terminal on MacOS or PuTTY on Windows.
|
||||
- Log in with the command `ssh root@<MACHINE-IP>` and enter your Rescue System password.
|
||||
- Execute the following commands:
|
||||
- `apt install git -y`
|
||||
- `git clone https://github.com/NeiKiNDR/Windows-Server-Contabo-VPS.git`
|
||||
- `cd Windows-Server-Contabo-VPS`
|
||||
- `chmod +x windows-install.sh`
|
||||
- `./windows-install.sh`
|
||||
- The process takes approximately 15 minutes and completes when the ssh session disconnects due to the machine rebooting.
|
||||
|
||||
### 3. Connnect to the VPS with VNC to install Windows
|
||||
|
||||
- Open your VNC app and create a new connection using the IP and PORT found on the VPS control page. Hover over "Manage" and click on "VNC Information"
|
||||
- Upon connecting, you will see a screen as shown in the image. Press Enter.
|
||||
|
||||

|
||||
|
||||
- Follow the on-screen prompts to install Windows.
|
||||
- Install the virtIO drivers as shown in the following images.
|
||||
- Click on "Browse"
|
||||
|
||||

|
||||
|
||||
- From Boot select `virtio_drivers`
|
||||
|
||||

|
||||
|
||||
- Select `amd64\w10` and click on "Ok"
|
||||
|
||||

|
||||
|
||||
- Click on "Next"
|
||||
|
||||

|
||||
|
||||
- Click on "Custom: Install Windows Only (advanced)"
|
||||
|
||||

|
||||
|
||||
- For the installation, select the partition `Drive 0 Partition 1`
|
||||
|
||||

|
||||
|
||||
- Choose the operating system and then click on "Next"
|
||||
|
||||

|
||||
|
||||
### 4. Install the Ethernet adapter for internet connection
|
||||
|
||||
- Open the `Device Manager`
|
||||
|
||||

|
||||
|
||||
- Right-click on `Ethernet Controller` and select `Update Driver`
|
||||
|
||||

|
||||
|
||||
- Choose `Browse my computer for drivers`
|
||||
|
||||

|
||||
|
||||
- Click on `Browse` and select the path `C:\sources\virtio`, and click "Next"
|
||||
|
||||

|
||||
|
||||
- Click on `Install`
|
||||
|
||||

|
||||
|
||||
### 5. Allow Remote Access Connection for RDP
|
||||
|
||||
- Search for `allow remote connections to this computer` and select the first option.
|
||||
|
||||

|
||||
|
||||
- In the Remote Desktop section, click on `Show settings`
|
||||
|
||||

|
||||
|
||||
- Choose `Allow remote connections to this computer`, click "Apply" and then "Ok"
|
||||
|
||||

|
||||
|
||||
- Now, connect remotely using your Remote Desktop Connection program with the credentials created during the Windows installation.
|
||||
|
||||
## Conclusions
|
||||
|
||||
Congratulations! You should now have a fully operational Windows 10 installation on your Contabo VPS. Remember to proceed with these instructions at your own risk and ensure that all software and applications used are legal and compliant with the respective licenses.
|
||||
|
||||
|
||||
93
windows-install.sh
Normal file
93
windows-install.sh
Normal file
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt update -y
|
||||
|
||||
apt install grub2 filezilla gparted wimtools -y
|
||||
|
||||
#Get the disk size in GB and convert to MB
|
||||
disk_size_gb=$(parted /dev/sda --script print | awk '/^Disk \/dev\/sda:/ {print int($3)}')
|
||||
disk_size_mb=$((disk_size_gb * 1024))
|
||||
|
||||
#Calculate partition size (25% of total size)
|
||||
part_size_mb=$((disk_size_mb / 4))
|
||||
|
||||
#Create GPT partition table
|
||||
parted /dev/sda --script -- mklabel gpt
|
||||
|
||||
#Create two partitions
|
||||
parted /dev/sda --script -- mkpart primary ntfs 1MB ${part_size_mb}MB
|
||||
parted /dev/sda --script -- mkpart primary ntfs ${part_size_mb}MB $((2 * part_size_mb))MB
|
||||
|
||||
#Inform kernel of partition table changes
|
||||
partprobe /dev/sda
|
||||
|
||||
sleep 30
|
||||
|
||||
partprobe /dev/sda
|
||||
|
||||
sleep 30
|
||||
|
||||
partprobe /dev/sda
|
||||
|
||||
sleep 30
|
||||
|
||||
#Format the partitions
|
||||
mkfs.ntfs -f /dev/sda1
|
||||
mkfs.ntfs -f /dev/sda2
|
||||
|
||||
echo "NTFS partitions created"
|
||||
|
||||
echo -e "r\ng\np\nw\nY\n" | gdisk /dev/sda
|
||||
|
||||
mount /dev/sda1 /mnt
|
||||
|
||||
#Prepare directory for the Windows disk
|
||||
cd ~
|
||||
mkdir windisk
|
||||
|
||||
mount /dev/sda2 windisk
|
||||
|
||||
grub-install --root-directory=/mnt /dev/sda
|
||||
|
||||
#Edit GRUB configuration
|
||||
cd /mnt/boot/grub
|
||||
cat <<EOF > grub.cfg
|
||||
menuentry "windows installer" {
|
||||
insmod ntfs
|
||||
search --set=root --file=/bootmgr
|
||||
ntldr /bootmgr
|
||||
boot
|
||||
}
|
||||
EOF
|
||||
|
||||
cd /root/windisk
|
||||
|
||||
mkdir winfile
|
||||
|
||||
wget -O win10.iso https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66749/17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_es-es.iso
|
||||
|
||||
mount -o loop win10.iso winfile
|
||||
|
||||
rsync -avz --progress winfile/* /mnt
|
||||
|
||||
umount winfile
|
||||
|
||||
wget -O virtio.iso https://goo.su/CFLdpDT
|
||||
|
||||
mount -o loop virtio.iso winfile
|
||||
|
||||
mkdir /mnt/sources/virtio
|
||||
|
||||
rsync -avz --progress winfile/* /mnt/sources/virtio
|
||||
|
||||
cd /mnt/sources
|
||||
|
||||
touch cmd.txt
|
||||
|
||||
echo 'add virtio /virtio_drivers' >> cmd.txt
|
||||
|
||||
wimlib-imagex update boot.wim 2 < cmd.txt
|
||||
|
||||
reboot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user