简单几步通过DD工具把云服务器系统Linux改为windows

news2024/9/20 9:04:20

简单几部通过DD安装其他系统,当服务器的web控制台没有我们要装的系统,就需要通过DD(Linux磁盘)工具来更改系统,(已知支持KVM系统)

本文如何简单的更换系统,不通过web控制台来更换,对于国外服务器不支持的系统,可以进行更换:

一、更新系统(本文以ubuntu为例)

sudo apt update && sudo apt install wget -y

root@VM-8-2-ubuntu:/# sudo apt update
Hit:1 http://mirrors.tencentyun.com/ubuntu jammy InRelease
Get:2 http://mirrors.tencentyun.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://mirrors.tencentyun.com/ubuntu jammy-security InRelease [110 kB]
Get:4 http://mirrors.tencentyun.com/ubuntu jammy-updates/main amd64 Packages [1,377 kB]
Get:5 http://mirrors.tencentyun.com/ubuntu jammy-updates/main Translation-en [273 kB]
Get:6 http://mirrors.tencentyun.com/ubuntu jammy-updates/restricted amd64 Packages [1,431 kB]
Get:7 http://mirrors.tencentyun.com/ubuntu jammy-updates/restricted Translation-en [235 kB]
Get:8 http://mirrors.tencentyun.com/ubuntu jammy-updates/universe amd64 Packages [1,049 kB]
Get:9 http://mirrors.tencentyun.com/ubuntu jammy-updates/universe Translation-en [237 kB]
Get:10 http://mirrors.tencentyun.com/ubuntu jammy-updates/multiverse amd64 Packages [42.1 kB]
Get:11 http://mirrors.tencentyun.com/ubuntu jammy-security/main amd64 Packages [1,161 kB]
Get:12 http://mirrors.tencentyun.com/ubuntu jammy-security/main Translation-en [213 kB]
Get:13 http://mirrors.tencentyun.com/ubuntu jammy-security/restricted amd64 Packages [1,401 kB]
Get:14 http://mirrors.tencentyun.com/ubuntu jammy-security/restricted Translation-en [231 kB]
Get:15 http://mirrors.tencentyun.com/ubuntu jammy-security/universe amd64 Packages [842 kB]
Get:16 http://mirrors.tencentyun.com/ubuntu jammy-security/universe Translation-en [161 kB]
Get:17 http://mirrors.tencentyun.com/ubuntu jammy-security/multiverse amd64 Packages [37.1 kB]
Fetched 8,920 kB in 5s (1,699 kB/s)  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
155 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@VM-8-2-ubuntu:/# sudo apt install wget -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.21.2-2ubuntu1).
wget set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 155 not upgraded.
root@VM-8-2-ubuntu:/# 

 

二、下载脚本:

wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh

中国大陆服务器:

wget --no-check-certificate -qO InstallNET.sh 'https://gitee.com/mb9e8j2/Tools/raw/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh

三、快速启动

如果需要添加其他参数,则必须分配特定的发行版名称!

Debian 12 版本

bash InstallNET.sh -debian

KALI版本

bash InstallNET.sh -kali

Alpine Linux Edge

bash InstallNET.sh -alpine

Alpine Linux 是一种轻量级的 Linux 版本,它对那些性能较低的机器很友好,至少需要 256MB 的系统内存。大部分Docker内系统以此为基础搭建系统容器。

CentOS 9 流

bash InstallNET.sh -centos

AlmaLinux 9

bash InstallNET.sh -almalinux

rock Linux 9

bash InstallNET.sh -rockylinux

fedora 39

bash InstallNET.sh -fedora

Ubuntu  22.04

bash InstallNET.sh -ubuntu

适用于工作站的 Windows 11 专业版

bash InstallNET.sh -windows

win10 中文版

bash InstallNET.s

bash InstallNET.sh -windows 10 -lang "cn"

四、安装windows10 中文版

运行:bash InstallNET.sh -windows 10 -lang "cn"


然后reboot重启,重启后会自动下载安装,以轻量云为例子,大概50分钟左右。

root@VM-8-2-ubuntu:/home/ubuntu# wget --no-check-certificate -qO InstallNET.sh 'https://gitee.com/mb9e8j2/Tools/raw/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
root@VM-8-2-ubuntu:/home/ubuntu# bash InstallNET.sh -windows 10 -lang "cn"
Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
no label, UUID=c6ba0084-87dc-4457-86f7-8a93222f2ac0
vm.swappiness = 70
Hit:1 http://mirrors.tencentyun.com/ubuntu jammy InRelease
Hit:2 http://mirrors.tencentyun.com/ubuntu jammy-updates InRelease
Hit:3 http://mirrors.tencentyun.com/ubuntu jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
150 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu4).
The following packages were automatically installed and are no longer required:
  crash libsnappy1v5 makedumpfile
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
grep: /etc/yum.repos.d/: No such file or directory
InstallNET.sh: line 1341: yum: command not found
cat: /etc/redhat-release: No such file or directory
cat: /etc/system-release: No such file or directory
InstallNET.sh: line 1358: apk: command not found
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'kdump-tools' is not installed, so not removed
Package 'kexec-tools' is not installed, so not removed
Package 'inetutils-ping' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  crash libsnappy1v5 makedumpfile
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cpio is already the newest version (2.13+dfsg-7).
efibootmgr is already the newest version (17-1ubuntu2).
fdisk is already the newest version (2.37.2-4ubuntu3).
iputils-ping is already the newest version (3:20211215-1).
jq is already the newest version (1.6-2.1ubuntu3).
net-tools is already the newest version (1.60+git20181103.0eebece-1ubuntu5).
util-linux is already the newest version (2.37.2-4ubuntu3).
wget is already the newest version (1.21.2-2ubuntu1).
xz-utils is already the newest version (5.2.5-2ubuntu1).
tuned is already the newest version (2.15.0-1).
virt-what is already the newest version (1.21-1).
curl is already the newest version (7.81.0-1ubuntu1.15).
dmidecode is already the newest version (3.3-3ubuntu0.1).
file is already the newest version (1:5.41-3ubuntu0.1).
gzip is already the newest version (1.10-4ubuntu4.1).
openssl is already the newest version (3.0.2-0ubuntu1.14).
dnsutils is already the newest version (1:9.18.18-0ubuntu0.22.04.2).
The following packages were automatically installed and are no longer required:
  crash libsnappy1v5 makedumpfile
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
InstallNET.sh: line 1420: yum: command not found
ping: connect: Network is unreachable
ping: connect: Network is unreachable
ping: connect: Network is unreachable
ping: connect: Network is unreachable
ping: connect: Network is unreachable
ping: connect: Network is unreachable
ping: connect: Network is unreachable
ping: connect: Network is unreachable
EFI variables are not supported on this system.
ls: cannot access '/sys/firmware/efi/efivars/': No such file or directory
ls: cannot access '/sys/firmware/efi/vars/': No such file or directory
ls: cannot access '/sys/firmware/efi/runtime-map/': No such file or directory
ls: cannot access '/sys/firmware/efi/mok-variables/': No such file or directory
find: ‘/boot/efi/EFI/’: No such file or directory
find: ‘/boot/efi/EFI/’: No such file or directory
InstallNET.sh: line 1114: type: grub2-mkconfig: not found

# System Memory

4095 MB

# Virtualization and Manufacturer

kvm tencentcloud

# Check Dependence

[ok]            awk
[ok]            basename
[ok]            cat
[ok]            cpio
[ok]            curl
[ok]            cut
[ok]            dirname
[ok]            file
[ok]            find
[ok]            grep
[ok]            gzip
[ok]            iconv
[ok]            ip
[ok]            lsblk
[ok]            openssl
[ok]            sed
[ok]            wget
find: ‘/proc/5518’: No such file or directory
find: ‘/proc/5523’: No such file or directory

# Network Details

[Adapter Name]  eth0
[Network File]  /etc/netplan/50-cloud-init.yaml
[Server Stack]  IPv4Stack

[IPv4  Method]  isDHCP
[IPv4 Address]  10.0.8.2
[IPv4  Subnet]  255.255.252.0
[IPv4 Gateway]  10.0.8.1
[IPv4     DNS]  119.29.29.29 223.6.6.6
[IPv4  Amount]  1

[IPv6  Method]  N/A
[IPv6 Address]  N/A
[IPv6  Subnet]  N/A
[IPv6 Gateway]  N/A
[IPv6     DNS]  N/A
[IPv6  Amount]  N/A

# User Timezone

Asia/Shanghai

# Hostname

VM-8-2-ubuntu

# SSH or RDP Port, Username and Password

3389
Administrator
Teddysun.com

# Formatting and Installing Drives

/dev/vda

# Motherboard Firmware

BIOS

# Check DIST

Success

# Installation Starting

Overwriting Packaged Image Mode Target System [Windows 10 Enterprise LTSC]
https://dl.lamp.sh/vhd/zh-cn_windows10_ltsc.xz

[AlpineLinux] [edge] [x86_64] Downloading...
[Mirror] http://mirror.nju.edu.cn/alpine/edge/releases/x86_64/netboot/initramfs-virt
         http://mirror.nju.edu.cn/alpine/edge/releases/x86_64/netboot/vmlinuz-virt
46111 blocks

# Directory of Grub and Unattended Disposition File

/boot/grub/grub.cfg
/tmp/boot/init

[Finish] Input 'reboot' to continue the subsequential installation.
root@VM-8-2-ubuntu:/home/ubuntu# 

执行reboot重启,此时通过VNC查看服务器下载情况,预计40分钟左右(腾讯轻量云以10MB/S计算)。

经过漫长的等待,已经安装完成(记得在控制台开启3389端口)

对于SSH或者RDP服务默认配置

默认用户名/密码

对于 Linux:root  LeitboGi0ro

对于 Windows:administration  Teddysun.com

默认端口

SSH:22

Windows:3389

远程访问:

好了,系统已经更换完毕

参数详细说明

-debian 7-12:Debian 7 及更高版本
 

-kali rolling/dev/experimental : Kali Rolling, Development and Experimental, “Kali Rolling” 显然是最推荐的。
 

-centos 7 或 8/9-stream:CentOS 7 及以上版本
 

-alpine 3.16-3.18/edge:Alpine Linux 3.16 及更高版本,为了不断更新到最新版本,显然最推荐使用“edge”。
 

-almalinux/alma 8/9:AlmaLinux 8 及更高版本
 

-rockylinux/rocky 8/9:RockyLinux 8 及更高版本
 

-Fedora 38/39:Fedora 38 及更新的版本
 

-ubuntu 20.04/22.04/24.04(测试,不稳定,请勿在生产环境中安装!
 

-windows 10/11/2012/2016/2019/2022:可选的发行版列表:
 

  • Windows 10 企业版 LTSC 22H2(简体中文和日语),23H2(英语)
  • Windows 11 Pro for Workstation 22H2 简体中文和日语,23H2 英文版
  • Windows 服务器 2012 R2
  • Windows 服务器 2016
  • Windows 服务器 2019
  • Windows 服务器 2022


注意:适用于英语的 Windows 10 和 11 23H2 首选使用 tiny10 和 tiny11 的基础映像,这些映像由 ntdev 开发和优化。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1465081.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

掌握Docker:让你的应用轻松部署和管理

文章目录 一、引言(为什么要学习docker?)1.1 环境不一致1.2 隔离性1.3 弹性伸缩1.4 学习成本 二、Docker介绍2.1 Docker的由来2.2 什么是Docker2.3 为什么要用Docker2.3.1 虚拟机2.3.2 Linux容器 2.4 Docker与传统虚拟机的区别2.5 Docker的思…

利用采购软件有效管理采购支出流程

在资本驱动的商业世界中,企业花的每一分钱都必须通过可量化的回报来证明其合理性。 采购支出管理通过简化企业的采购流程来实现支出的无缝优化。适当的程序可通过加强与供应商和贸易伙伴的沟通,来帮助企业最大限度地节省成本。 采购支出管理的重要性 企…

代码随想录算法训练营第四十天 343. 整数拆分、 96.不同的二叉搜索树

代码随想录算法训练营第四十天 | 343. 整数拆分、 96.不同的二叉搜索树 343. 整数拆分 题目链接:343. 整数拆分 - 力扣(LeetCode) 例如 n 10, 可以拆分为 3 * dp[7] 。因为dp[7]之前已经计算过最大 3 * 4, 所以dp[10] 3 * 3 …

conda 进入python环境里pip install安装不到该环境或不生效

参考:https://blog.csdn.net/weixin_47834823/article/details/128951963 https://blog.51cto.com/u_15060549/4662570?loginfrom_csdn 1、直接进入python Scripts目录下安装 cmd打开运行窗口,cd切换路径至指定虚拟环境下的Scripts路径后再pip安装 擦…

二叉树中的第K大层和

1.题目 这道题是2024-2-23的签到题,题目难度为中等。 考察知识点为BFS算法(树的层序遍历) 大根堆(优先队列)。 题目链接:2583. 二叉树中的第 K 大层和 - 力扣(LeetCode) 给你一棵…

MySQL学习Day18——逻辑架构

一、逻辑架构剖析: 1.服务器处理客户端请求: 首先 MySQL 是典型的C/S架构,即client/Server架构,服务器端程序使用的mysqld。不论客户端进程和服务器进程是采用哪种方式进行通信,最后实现的效果都是:客户端进程向服务器进程发送段文本(SQL语…

QT中调用python

一.概述 1.Python功能强大,很多Qt或者c/c开发不方便的功能可以由Python编码开发,尤其是一些算法库的应用上,然后Qt调用Python。 2.在Qt调用Python的过程中,必须要安装python环境,并且Qt Creator中编译器与Python的版…

docker 可视化管理工具 ui-for-docker

1、查询 docker search ui-for-docker 2、拉取镜像 docker pull uifd/ui-for-docker 3、运行启动容器 docker run -it -d \ --name docker-web \ -p 9010:9000 \ --privilegedtrue \ -v /var/run/docker.sock:/var/run/docker.sock \ ui-for-docker 4、页面访问 ​http:/…

vex-table链接

vxe-table v4https://vxetable.cn/#/table/start/quick

测试开源C#人脸识别模块DlibDotNet

百度“C# 换脸”找到参考文献4,发现其中使用DlibDotNet检测并识别人脸(之前主要用的是ViewFaceCore),DlibDotNet是Dlib的.net封装版本,后者为开源C工具包,支持机器学习算法、图像处理等算法以支撑各类高级应…

应用感知型网络性能管理

网络基础设施似乎日益复杂和先进,迫使网络管理员抛弃传统的管理方法。应用感知型网络性能管理是一种用于监控网络性能的新型整体方法,它为管理员提供了强大的 IT 资源管理功能。应用感知型网络性能管理为 IT 管理员带来了精细视图、动态资源分配、主动故…

如何使用NPM包管理器在Node.js项目中安装和管理依赖

随着现代开发技术的快速发展,前端开发工程师们面临着越来越多的挑战。其中一个重要的挑战之一就是管理项目中的依赖关系。NPM(Node Package Manager)是一个业界领先的包管理器,被广泛应用于Node.js项目中。本文将详细介绍如何使用…

【 buuctf-NTFS 数据流】

这里要用到NtfsStreamEditor Ntfs数据流处理工具2.0 NtfsStreamsEditor 2.0 预览 090410更新_原创工具区_安全区 卡饭论坛 - 互助分享 - 大气谦和!可以从这个网站下载,注意包含 ntfs 数据流的压缩包要用 winrar 解压缩,扫描 flag 文件,会出现…

多模态AI产业链全景梳理

当前AI模型从单模态向多模态演进,有望实现认知智能,是AI未来发展的明确趋势。 近期 AI 多模态模型不断取得突破性进展。 OpenAI 于11 月发布了 GPT-4 Turbo 且开放了 GPTs再次颠覆行业,GPTs短期上线数量已超3万,揭开AIGC应用生态…

『运维备忘录』之 Ln 文件链接命令详解

运维人员不仅要熟悉操作系统、服务器、网络等知识,甚至对于开发相关的也要有所了解。很多运维工作者可能一时半会记不住那么多命令、代码、方法、原理或者用法等等。这里我将结合自身工作,持续给大家更新运维工作所需要接触到的知识点,希望大…

Linux编译器---gcc/g++使用详解

目录 前言 gcc/g介绍 gcc/g的编译指令(以gcc为例) ​编辑 gcc选项 预处理(进行宏替换) 编译(生成汇编) 汇编(生成机器可识别代码) 链接(生成可执行文件或库文件) 函数库 概念 …

电气机械5G智能工厂数字孪生可视化平台,推进电气机械行业数字化转型

电气机械5G智能工厂数字孪生可视化平台,推进电气机械行业数字化转型。随着科技的不断发展,数字化转型已经成为各行各业发展的重要趋势。电气机械行业作为传统制造业的重要组成部分,也面临着数字化转型的挑战和机遇。为了更好地推进电气机械行…

嵌入式stm32软件开发——中断概念

中断就是异常,异常就是中断 关注我,共同交流,一起成长 一、中断基础概念二、中断的编程要点三、中断控制器组四、关于EXIT外部中断 一、中断基础概念 关于中断这个东西,简单来说是程序进展过程中的重要节点,而在中断这…

C 嵌入式系统设计模式 10:中介者模式

本书的原著为:《Design Patterns for Embedded Systems in C ——An Embedded Software Engineering Toolkit 》,讲解的是嵌入式系统设计模式,是一本不可多得的好书。 本系列描述我对书中内容的理解。本文章描述访问硬件的设计模式之三&…

https://registry.npm.taobao.org淘宝npm镜像仓库地址更新

在工作中有遇见获取淘宝的npm镜像存在问题,图示如下的报错: 根据报错的内容是说 https://registry.npm.taobao.org地址访问失败了,然后通过排查发现淘宝的npm镜像仓库地址有更新了。需要使用最新的地址 旧的淘宝镜像仓库:https://…