5

Digital Ocean Install Windows 10 2004

 3 years ago
source link: https://sskaje.me/2020/06/digital-ocean-install-windows-10-2004/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Digital Ocean Install Windows 10 2004

方法1 使用别人现成的磁盘镜像

参考 https://www.whatuptime.com/ 。步骤如下

1 注册 Digital Ocean 账号

2 建一台虚拟机,设置密码,关掉,进recovery,改成 Boot from Recovery ISO,启动后选择 6 Interactive Shell

3 原作者给了一个 dropbox 的磁盘镜像下载地址,但是这个磁盘镜像是基于微软古老的公开的 Windows 10 Enterprise Evaluation 制作的,不管怎样,有个现成的总归省事。

wget -O- https://www.dropbox.com/s/e2oglmh3tdu3boz/WIn10.gz?dl=1 | gunzip | dd of=/dev/vda

4 改回磁盘引导,Console 连进去,用户名 WhatUpTime.com,密码: P@ssword64 。先改用户名密码,然后根据后台的信息设置网卡。我创建的 Compute Optimized 的droplet,系统里的两个网卡,Ethernet 2 和 3,我改的2,可用。建好网络后,选用老版本的 Windows 远程桌面客户端 或者 Mac 版的连上去,Windows 10 2004 的远程桌面连上去提示 CredSSP 的错误,简单说,这个系统太老了。Windows Update之后,这个提示会消失,但是 Digital Ocean 的 Web Console 在 Mac Chrome 下,鼠标跟虚拟机里的鼠标对不上,这是一个有挑战的体验。

5 进系统,该更新更新,但是更新之后,系统始终显示的是 Windows 10 Enterprise Evaluation,版本也始终停留在 1607,虽然更新能装到 2018 年 4 月。注册表的版本文字也改过了,正版 Enterprise 的 license key 也试过了,都无法直接升级;Windows 10 Update Assistant 也提示无法升级;Media Creation Tool 也死;DISM 查询版本也失败。需要从官方下载 2004 business edition 的 ISO,直接运行 setup.exe,运行后,系统会提示有更新。

6 该更新更新,更新完重启后再进系统,再运行 setup.exe,安装。

注1:该虚拟机磁盘镜像只有16G,系统装完之后基本就满了,磁盘管理里直接扩展卷即可。

注2:Snapshot 不用尝试了,创建的snapshot 直接生成droplet会出错不可用,创建标准虚拟机后用 snapshot 重建 droplet 也不可用。

方法2 自制Window 10 磁盘镜像

参考 https://glitchwitch.io/blog/2018-09/windows-10-on-digitalocean/ 全手工。

准备: windows 10 2004 ISO, virtio-win ISO,一台有加载了 kvm_intel 的linux。

Virtio-win 驱动从这里下载 https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/ 。win10 2004 至少需要 virtio-win-0.1.185,低版本会蓝屏。

以 Ubuntu 18.04 为例,

# Install qemu
apt-get update && apt-get install qemu -y
# Create disk image
qemu-img create -f raw windows10.img 16G
# Start Windows 10 VM with VNC
qemu-system-x86_64 \
  -m 1G \
  -cpu host \
  -enable-kvm \
  -boot order=d \
  -drive file=win10-os.iso,media=cdrom \
  -drive file=windows10.img,format=raw,if=virtio \
  -drive file=virtio-win.iso,media=cdrom \
  -vnc :0 \
  # Press CTRL + C to stop virtualization

装好之后,直接vnc 远程连这台主机的5900,进入安装步骤。安装过程需要加载外部驱动,E:\NetKvm\w10\amd64 和 E:\viostor\w10\amd64 ,去掉 隐藏不兼容驱动的勾,都选择第一个。识别出硬盘后,正常安装,等到系统提示自动重启倒计时的时候,ctrl + c 结束 qemu 进程。

dd if=windows10.img | gzip -c > windows10.gz

压缩镜像后,gzip文件大概 4.7G,先在DigitalOcean上同机房建一个$5的服务器,把文件传上去,装一个nginx。剩下回到第一步,用vpc内网IP下载镜像、安装。

这个版本的镜像会自带一个恢复分区,需要删除了才能去扩展磁盘卷。管理员CMD下操作命令如下:

diskpart
list disk
select disk 0
list partition
select partition 3
delete partition override

结束之后去磁盘管理里,把C盘的卷直接扩展即可。

Digital Ocean Install Windows 10 2004 by @sskaje: https://sskaje.me/2020/06/digital-ocean-install-windows-10-2004/
Link to this post!

Author sskajePosted on June 5, 2020June 10, 2020Categories Linux, Windows, 杂七杂八, 笔记Tags digitalocean, digitalocean windows, windows, windows 10


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK