Skip to content

Instantly share code, notes, and snippets.

@shiwildy
Last active December 29, 2024 16:18
Show Gist options
  • Save shiwildy/d0afa204bd03652b0b2db83149120574 to your computer and use it in GitHub Desktop.
Save shiwildy/d0afa204bd03652b0b2db83149120574 to your computer and use it in GitHub Desktop.
Tutor install windows di cloud yang tidak mendukung windows.
Step 1
# >> Boot into rescue
Step 2
# >> Install xfce4 and required packages
apt update -y
apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils -y
apt install gparted filezilla grub2 wimtools -y
echo "exec startxfce4" > ~/.xinitrc
startx > ~/startx.log 2>&1 &
Step 3
gparted # this will open gparted gui
# >> Now delete all parititon and create 2 parititon with ntfs format for windows iso and windows bootmgr
Step 4
# >> Now apply the partition changes using gdisk
gdisk /dev/sda
confirm
r
g
p
w
y
Step 5
# >> Mount the /dev/sda1 partition into /mnt
mount /dev/sda1 /mnt
# >> and paste this command
mkdir /root/win && cd /root/win
mount /dev/sda2 /root/win
Step 6
# >> Install grub
grub-install --root-directory=/mnt /dev/sda
Step 7
# >> Configure grub to boot using bootmgr
echo 'menuentry "windows installer" {
insmod ntfs
search --set=root --file=/bootmgr
ntldr /bootmgr
boot
}' > /mnt/boot/grub/grub.cfg
Step 8
# >> Download windows iso
mkdir -p /root/win/winfile
cd /root/win
wget -O win10.iso 'https://go.microsoft.com/fwlink/p/?LinkID=2195404&clcid=0x409&culture=en-us&country=US'
mount -o loop /root/win/win10.iso /root/win/winfile
rsync -avz --progress /root/win/winfile/* /mnt
umount /root/win/winfile
Step 9
# >> Download virtio drivers
mkdir -p /root/win/virtio
cd /root/win
wget -O virtio.iso 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso'
mount -o loop /root/win/virtio.iso /root/win/virtio
mkdir /mnt/sources/virtio
rsync -avz --progress /root/win/virtio/* /mnt/sources/virtio/
umount /root/win/virtio
Step 10
# >> Add virtio to boot
cd /mnt/sources
touch cmd.txt
echo 'add virtio /virtio_drivers' >> cmd.txt
wimlib-imagex update boot.wim 2 < cmd.txt
Step 11
# >> reboot and install it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment