通常在Linux VPS下安装windows用的比较多的方法是DD,Vicer大佬已经制作出通用的一键脚本,厘米在cloudcone一台VPS上测试正常安装,耗时不到20分钟。根据大佬的教程,可以自己制作镜像包,添加相应的驱动。目前支持KVM、Hyper-V构架,OPENVZ不支持。
通常在Linux VPS下安装windows用的比较多的方法是DD,Vicer大佬已经制作出通用的一键脚本,厘米在cloudcone一台VPS上测试正常安装,耗时不到20分钟。根据大佬的教程,可以自己制作镜像包,添加相应的驱动。目前支持KVM、Hyper-V构架,OPENVZ不支持。
- 特点:
突破没有VNC,没有救援模式,内存比dd包小的限制.
使用Debian Live CD中的busybox做中间媒介,经过复杂的处理,
使本机的网络参数传进Windows操作系统中,
即使没有DHCP能够让Windows获取网络参数,
也能让Windows操作系统在开机的第一时间能够连通网络.
- 准备:
- 使用方法:
wget --no-check-certificate -qO DebianNET.sh 'https://moeclub.org/attachment/LinuxShell/DebianNET.sh' && bash DebianNET.sh -dd '[Windows dd包直连地址]'
- 萌咖提供的dd包:
wget --no-check-certificate -qO DebianNET.sh 'https://moeclub.org/attachment/LinuxShell/DebianNET.sh' && bash DebianNET.sh -dd 'https://moeclub.org/get-win7embx86-auto'
- 注意事项:
- 远程登陆账号为: Administrator
- 远程登陆密码为: Vicer
- 仅修改了主机名,可放心使用.(建议自己制作.)
- 使用的公用网盘,如需长期/大量使用此包请自行备份.
- 如果因此违反了TOS,作者不负任何责任.
- 可能用到的命令:
::以管理员身份运行CMD:: ::更改用户的密码 net user [用户名] [密码] ::激活 Administrator 账户 net user Administrator /active:yes ::设置 Administrator 账户密码 net user Administrator [新密码] ::添加用户 net user [用户名] [密码] /add ::将用户添加至 Administrator 组 net localgroup Administrators [用户名] /add ::删除用户 net user [用户名] /del
代码备份
#!/bin/bash while [[ $# -ge 1 ]]; do case $1 in -v|--ver) shift VERtmp="$1" shift ;; -d|--debian|--ubuntu) shift vDEBtmp="$1" shift ;; -dd|--ddwin) shift ddMode='1' URLtmp="$1" shift ;; -p|--password) shift WDtmp="$1" shift ;; -a|--auto) shift INStmp='auto' ;; -m|--manual) shift INStmp='manual' ;; -apt|--mirror) shift isMirror='1' tmpMirror="$1" shift ;; -ssl) shift tmpSSL="$1" shift ;; *) echo -ne " Usage:ntbash $0t-d/--debian [7/ 33[33m 33[04mwheezy 33[0m|8/jessie|9/stretch]ntttt-v/--ver [32/ 33[33m 33[04mi386 33[0m|64/amd64]ntttt-apt/--mirrorntttt-dd/--ddwinntttt-a/--autontttt-m/--manualn" exit 1; ;; esac done [[ $EUID -ne 0 ]] && echo "Error:This script must be run as root!" && exit 1 [[ -f /boot/grub/grub.cfg ]] && GRUBOLD='0' && GRUBDIR='/boot/grub' && GRUBFILE='grub.cfg' [[ -z $GRUBDIR ]] && [[ -f /boot/grub2/grub.cfg ]] && GRUBOLD='0' && GRUBDIR='/boot/grub2' && GRUBFILE='grub.cfg' [[ -z $GRUBDIR ]] && [[ -f /boot/grub/grub.conf ]] && GRUBOLD='1' && GRUBDIR='/boot/grub' && GRUBFILE='grub.conf' [ -z $GRUBDIR -o -z $GRUBFILE ] && echo "Error! Not Found grub path." && exit 1 [[ -n $vDEBtmp ]] && { [ "$vDEBtmp" == '7' -o "$vDEBtmp" == 'wheezy' ] && linuxdists='debian' && vDEB='wheezy'; [ "$vDEBtmp" == '8' -o "$vDEBtmp" == 'jessie' ] && linuxdists='debian' && vDEB='jessie'; [ "$vDEBtmp" == '9' -o "$vDEBtmp" == 'stretch' ] && linuxdists='debian' && vDEB='stretch'; [[ "$vDEBtmp" == 'precise' ]] && linuxdists='ubuntu' && vDEB='precise'; [[ "$vDEBtmp" == 'trusty' ]] && linuxdists='ubuntu' && vDEB='trusty'; [[ "$vDEBtmp" == 'wily' ]] && linuxdists='ubuntu' && vDEB='wily'; [[ "$vDEBtmp" == 'xenial' ]] && linuxdists='ubuntu' && vDEB='xenial'; [[ "$vDEBtmp" == 'yakkety' ]] && linuxdists='ubuntu' && vDEB='yakkety'; [[ "$vDEBtmp" == 'zesty' ]] && linuxdists='ubuntu' && vDEB='zesty'; } [[ -n $vDEBtmp ]] && { [ "$VERtmp" == '32' -o "$VERtmp" == 'i386' ] && VER='i386'; [ "$VERtmp" == '64' -o "$VERtmp" == 'amd64' ] && VER='amd64'; } [[ -n $ddMode ]] && [[ "$ddMode" == '1' ]] && { [[ -n $URLtmp ]] && { linuxdists='debian'; vDEB='jessie'; VER='amd64'; INStmp='auto' DDURL="$URLtmp" [[ -n $tmpSSL ]] && CURL_SUPPORT="$tmpSSL" [[ -z $CURL_SUPPORT ]] && CURL_SUPPORT='https://moeclub.org/get-curl_udeb_amd64' } || { echo 'Please input vaild URL! ' exit 1 } } || { ddMode='0'; } [[ -z $linuxdists ]] && linuxdists='debian' [[ -n $isMirror ]] && [[ "$isMirror" == '1' ]] && [[ -n $tmpMirror ]] && { tmpDebianMirror="$(echo -n "$tmpMirror" |grep -Eo '.*.(w+)')" echo -n "$tmpDebianMirror" |grep -q '://' [[ $? -eq '0' ]] && { DebianMirror="$(echo -n "$tmpDebianMirror" |awk -F'://' '{print $2}')" } || { DebianMirror="$(echo -n "$tmpDebianMirror")" } } || { [[ $linuxdists == 'debian' ]] && DebianMirror='httpredir.debian.org' [[ $linuxdists == 'ubuntu' ]] && DebianMirror='archive.ubuntu.com' } [[ -z $DebianMirrorDirectory ]] && [[ -n $DebianMirror ]] && [[ -n $tmpMirror ]] && { DebianMirrorDirectory="$(echo -n "$tmpMirror" |awk -F''${DebianMirror}'' '{print $2}' |sed 's//$//g')" } [[ "$DebianMirrorDirectory" == '/' ]] && [[ -n $DebianMirror ]] && { [[ $linuxdists == 'debian' ]] && DebianMirrorDirectory='/debian' [[ $linuxdists == 'ubuntu' ]] && DebianMirrorDirectory='/ubuntu' } [[ -z $DebianMirrorDirectory ]] && [[ -n $DebianMirror ]] && { [[ $linuxdists == 'debian' ]] && DebianMirrorDirectory='/debian' [[ $linuxdists == 'ubuntu' ]] && DebianMirrorDirectory='/ubuntu' } [[ -n $INStmp ]] && { [[ "$INStmp" == 'auto' ]] && inVNC='n' [[ "$INStmp" == 'manual' ]] && inVNC='y' } [[ -n $WDtmp ]] && myPASSWORD="$WDtmp" [[ -z $vDEB ]] && vDEB='wheezy'; [[ -z $VER ]] && VER='i386'; [[ -z $myPASSWORD ]] && myPASSWORD='Vicer' clear && echo -e "n 33[36m# Install 33[0mn" [[ -z $inVNC ]] && ASKVNC(){ inVNC='y'; [[ "$ddMode" == '0' ]] && { echo -ne "