无限制全自动dd安装Windows
突破没有VNC,没有救援模式,内存比dd包小的限制.
使用Debian Live CD中的busybox做中间媒介,经过复杂的处理,
使本机的网络参数传进Windows操作系统中,
即使没有DHCP能够让Windows获取网络参数,
也能让Windows操作系统在开机的第一时间能够连通网络.
优化判断逻辑.
增加手动指定网络参数选项,可有效避免自动获取网络参数无效造成无法直接联网的问题.
1.带Windows的为什么就卖得那么贵?
2.当然是为了更自由的使用自己的机器.
1234 | #Debian/Ubuntu## 一般自带#RedHat/CentOSyum install glibc–common |
1 | wget —no–check–certificate –qO DebianNET.sh ‘https://moeclub.org/attachment/LinuxShell/DebianNET.sh’ && bash DebianNET.sh –dd ‘[Windows dd包直连地址]’ |
123 | https://moeclub.org/get-win7embx86-auto# 该包只添加了VirtIO驱动,理论上仅能在KVM,Hyper-V构架下正常运行.# 如需在其他虚拟化构架下运行,请自行添加相关虚拟化驱动. |
使用的是Windows Embedded Standard 7(Thin PC)作为底包,官方精简.
如需其他组件,例如:完整的桌面特征,Windows照片查看器等.
请参考: Thin PC (Win7 Embedded) 安装组件
1234 | #在你的机器上全新安装,如果你有VNC,可以看到全部过程.#在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’ |
12345 | # 将X.X.X.X替换为自己的网络参数.# –ip-addr :IP Address/IP地址# –ip-mask :Gateway /网关# –ip-gate :Netmask /子网掩码# wget –no-check-certificate -qO DebianNET.sh ‘https://moeclub.org/attachment/LinuxShell/DebianNET.sh’ && bash DebianNET.sh –ip-addr X.X.X.X –ip-mask X.X.X.X –ip-gate X.X.X.X -dd ‘https://moeclub.org/get-win7embx86-auto’ |
- 注意事项:
- 远程登陆账号为: Administrator
- 远程登陆密码为: Vicer
- 仅修改了主机名,可放心使用.(建议自己制作.)
- 使用的公用网盘,如需长期/大量使用此包请自行备份.
- 如果因此违反了TOS,萌咖不负任何责任.
- 可能用到的命令:
1234567891011121314 | ::以管理员身份运行CMD::::更改用户的密码net user [用户名] [密码]::激活 Administrator 账户net user Administrator /active:yes::设置 Administrator 账户密码net user Administrator [新密码]::添加用户net user [用户名] [密码] /add::将用户添加至 Administrator 组net localgroup Administrators [用户名] /add::删除用户net user [用户名] /del |
在磁盘管理中,点击’C‘盘,右键选择’扩展卷‘,可以直接’增加‘C盘的空间.
激活相关请参考: https://moeclub.org/kms
全新安装!!! 全新安装!!! 全新安装!!!
- Windows Embedded 8.1 Industry Pro x64 (2.87G;KVM;XEN;Hyper-V;未激活)
1 | https://moeclub.org/get-win8embx64-auto |
- 预览:
- #!/bin/bash
- export tmpVER=”
- export tmpDIST=”
- export tmpURL=”
- export tmpWORD=”
- export tmpMirror=”
- export tmpSSL=”
- export tmpINS=”
- export tmpFW=”
- export ipAddr=”
- export ipMask=”
- export ipGate=”
- export linuxdists=”
- export ddMode=’0′
- export setNet=’0′
- export isMirror=’0′
- export FindDists=’0′
- while [[ $# -ge 1 ]]; do
- case $1 in
- -v|–ver)
- shift
- tmpVER=”$1″
- shift
- ;;
- -d|–debian)
- shift
- linuxdists=’debian’
- tmpDIST=”$1″
- shift
- ;;
- -u|–ubuntu)
- shift
- linuxdists=’ubuntu’
- tmpDIST=”$1″
- shift
- ;;
- -dd|–image)
- shift
- ddMode=’1′
- tmpURL=”$1″
- shift
- ;;
- -p|–password)
- shift
- tmpWORD=”$1″
- shift
- ;;
- –ip-addr)
- shift
- ipAddr=”$1″
- shift
- ;;
- –ip-mask)
- shift
- ipMask=”$1″
- shift
- ;;
- –ip-gate)
- shift
- ipGate=”$1″
- shift
- ;;
- -a|–auto)
- shift
- tmpINS=’auto’
- ;;
- -m|–manual)
- shift
- tmpINS=’manual’
- ;;
- -apt|–mirror)
- shift
- isMirror=’1′
- tmpMirror=”$1″
- shift
- ;;
- -ssl)
- shift
- tmpSSL=”$1″
- shift
- ;;
- –firmware)
- shift
- tmpFW=’1′
- ;;
- *)
- echo -ne ” Usage:ntbash DebianNET.sht-d/–debian [ 33[33m 33[04mdists-name 33[0m]ntttt-u/–ubuntu [ 33[04mdists-name 33[0m]ntttt-v/–ver [32/ 33[33m 33[04mi386 33[0m|64/amd64]ntttt–ip-addr/–ip-gate/–ip-maskntttt-apt/–mirrorntttt-dd/–imagentttt-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 -ne “Error! nNot Found grub path.n” && exit 1;
- [[ -n “$tmpVER” ]] && {
- [ “$tmpVER” == ’32’ -o “$tmpVER” == ‘i386′ ] && VER=’i386’;
- [ “$tmpVER” == ’64’ -o “$tmpVER” == ‘amd64′ ] && VER=’amd64’;
- }
- [[ -z “$VER” ]] && VER=’i386′;
- [[ -z “$linuxdists” ]] && linuxdists=’debian’;
- [[ “$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’)”;
- }
- [[ -n “$DebianMirror” ]] && {
- [[ “$DebianMirrorDirectory” == ‘/’ ]] && {
- [[ “$linuxdists” == ‘debian’ ]] && DebianMirrorDirectory=’/debian’;
- [[ “$linuxdists” == ‘ubuntu’ ]] && DebianMirrorDirectory=’/ubuntu’;
- }
- [[ -z “$DebianMirrorDirectory” ]] && {
- [[ “$linuxdists” == ‘debian’ ]] && DebianMirrorDirectory=’/debian’;
- [[ “$linuxdists” == ‘ubuntu’ ]] && DebianMirrorDirectory=’/ubuntu’;
- }
- }
- [[ -z “$tmpDIST” ]] && {
- [[ “$linuxdists” == ‘debian’ ]] && DIST=’wheezy’;
- [[ “$linuxdists” == ‘ubuntu’ ]] && DIST=’trusty’;
- }
- [[ -z “$DIST” ]] && {
- DIST=”$(echo “$tmpDIST” |sed -r ‘s/(.*)/L1/’)”;
- echo “$DIST” |grep -q ‘[0-9]’;
- [[ $? -eq ‘0’ ]] && {
- isDigital=”$(echo “$DIST” |grep -o ‘[0-9.]{1,}’ |sed -n ‘1h;1!H;$g;s/n//g;$p’ |cut -d’.’ -f1)”;
- [[ -n $isDigital ]] && {
- [[ “$isDigital” == ‘7’ ]] && DIST=’wheezy’;
- [[ “$isDigital” == ‘8’ ]] && DIST=’jessie’;
- [[ “$isDigital” == ‘9’ ]] && DIST=’stretch’;
- [[ “$isDigital” == ’10’ ]] && DIST=’buster’;
- }
- }
- }
- [[ “$ddMode” == ‘1’ ]] && {
- [[ -n “$tmpURL” ]] && {
- linuxdists=’debian’;
- DIST=’jessie’;
- VER=’amd64′;
- tmpINS=’auto’;
- DDURL=”$tmpURL”
- echo “$DDURL” |grep -q ‘^http://|^ftp://|^https://’;
- [[ $? -ne ‘0’ ]] && echo ‘Please input vaild URL,Only support http://, ftp:// and https:// !’ && exit 1;
- [[ -n “$tmpSSL” ]] && SSL_SUPPORT=”$tmpSSL”;
- [[ -z “$SSL_SUPPORT” ]] && SSL_SUPPORT=’https://moeclub.org/get-wget_udeb_amd64′;
- } || {
- echo ‘Please input vaild URL! ‘;
- exit 1;
- }
- }
- DistsList=”$(wget –no-check-certificate -qO- “http://$DebianMirror$DebianMirrorDirectory/dists/” |grep -o ‘href=.*/”‘ |cut -d'”‘ -f2 |sed ‘/-|old|Debian|experimental|stable|test|sid|devel/d’ |grep ‘^[^/]’ |sed -n ‘1h;1!H;$g;s/n//g;s///;/g;$p’)”;
- for CheckDEB in `echo “$DistsList” |sed ‘s/;/n/g’`
- do
- [[ “$CheckDEB” == “$DIST” ]] && FindDists=’1′;
- [[ “$FindDists” == ‘1’ ]] && break;
- done
- [[ “$FindDists” == ‘0’ ]] && {
- echo -ne ‘nThe dists version not found, Please check it! nn’
- bash $0 error;
- exit 1;
- }
- [[ -n “$tmpINS” ]] && {
- [[ “$tmpINS” == ‘auto’ ]] && inVNC=’n’;
- [[ “$tmpINS” == ‘manual’ ]] && inVNC=’y’;
- }
- [ -n “$ipAddr” ] && [ -n “$ipMask” ] && [ -n “$ipGate” ] && setNet=’1′;
- [[ -n “$tmpWORD” ]] && myPASSWORD=”$tmpWORD”;
- [[ -n “$tmpFW” ]] && INCFW=”$tmpFW”;
- [[ -z “$myPASSWORD” ]] && myPASSWORD=’Vicer’;
- [[ -z “$INCFW” ]] && INCFW=’0′;
- clear && echo -e “n 33[36m# Install 33[0mn”
- ASKVNC(){
- inVNC=’y’;
- [[ “$ddMode” == ‘0’ ]] && {
- echo -ne “