vhdxBasedWin10

1. install to vhdx in installation

create a vdisk(expandable) and attach it for installation:

/images/2024_04_21_10_52_26_864x637.jpg

then you found this attached vdisk:

/images/2024_04_21_10_53_11_743x543.jpg

Create, to let windows create its layout:

/images/2024_04_21_10_54_51_856x589.jpg

按照以上的方法无法安装到vhdx文件

2. install from existing windows

/images/2024_04_21_11_29_06_838x688.jpg

/images/2024_04_21_11_29_38_682x485.jpg

CombineLinuxAndWin

分区:

/images/2024_04_19_11_44_17_781x330.jpg

安装windows:

/images/2024_04_19_11_53_02_642x471.jpg

Install on vdisk:

/images/2024_04_19_12_02_02_628x469.jpg

Continue to install :

/images/2024_04_19_12_02_34_650x473.jpg

rocklinuxrog

After installation, change the enpxxx to eth0 via:

 grubby --set-default /boot/vmlinuz-5.14.0-362.8.1.el9_3.x86_64 
 grubby --args="net.ifnames=0" --update-kernel="$(grubby --default-kernel)"
 grubby --args="biosdevname=0" --update-kernel="$(grubby --default-kernel)"

Install mono for using fog client:

yum install -y epel-release
sed -e 's|^metalink=|#metalink=|g' \
         -e 's|^#baseurl=https\?://download.fedoraproject.org/pub/epel/|baseurl=https://mirrors.ustc.edu.cn/epel/|g' \
         -e 's|^#baseurl=https\?://download.example/pub/epel/|baseurl=https://mirrors.ustc.edu.cn/epel/|g' \
         -i.bak \
         /etc/yum.repos.d/epel{,-testing}.repo
yum makecache
yum install -y mono-complete

Download the fog client SmartInstaller.exe, then:

sudo mono SmartInstaller.exe
...
hhhhhh.owgouwogwoegow.gowugou
...

Then you have to enable the ethtool service:

# cat /etc/systemd/system/wol.service 
[Unit]
Description=Enable Wake On Lan

[Service]
Type=oneshot
ExecStart = /sbin/ethtool --change eth0 wol g

[Install]
WantedBy=basic.target
# systemctl enable wol

Start and enable:

systemctl enable FOGService
systemctl start FOGService

LocalDNSOnFog

Install dnsmasq via:

sudo apt install -y dnsmasq

Edit the configuration file(vim /etc/dnsmasq.conf):

...

# 不允许 dnsmasq 通过轮询 /etc/resolv.conf 或者其他文件来获取配置的改变,则取消注释。
#no-poll
# 向上游所有服务器查询
all-servers
# 启用转发循环检测
dns-loop-detect
# 重启后清空缓存
clear-on-reload
# 完整域名才向上游服务器查询,如果是主机名仅查找 hosts 文件
domain-needed

# 指定 dnsmasq 默认查询的上游服务器,此处以 Google Public Dns 为例。
server=223.5.5.5

# no-hosts, 默认情况下这是注释掉的,dnsmasq 会首先寻找本地的 hosts 文件,再去寻找缓存下来的域名,最后去上级 Dns 服务器中寻找;而 addn-hosts 可以使用额外的 hosts 文件。
# Dns 解析 hosts 时对应的 hosts 文件,对应 no-hosts
addn-hosts=/etc/hosts
# Dns 缓存大小,Dns 解析条数
cache-size=1024
# 不缓存未知域名缓存,默认情况下 dnsmasq 会缓存未知域名并直接返回客户端
no-negcache
# 指定 Dns 同时查询转发数量
dns-forward-max=1000

# 增加一个域名,强制解析到所指定的地址上,强行指定 domain 的 IP 地址
address=/hhhhhh.ctyun.net.cn/192.168.1.22
...

Test via:

dig @192.168.1.22 hhhhhh.ctyun.net.cn
dig @192.168.1.22 www.baidu.com

Then edit the dhcpd.conf:

# vim /etc/dhcp/dhcpd.conf
....

option domain-name-servers 192.168.1.22;
....

x11dockerRunThunderbird

1. 前置条件

Ubuntu18.04操作系统,已安装x11docker, 安装方法详见x11docker github仓库。

2. 邮箱容器制作

撰写如下的Dockerfile:

FROM x11docker/xfce
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y firefox-esr thunderbird libreoffice fonts-wqy-microhei fonts-wqy-zenhei xfonts-wqy thunderbird-l10n-zh-cn firefox-esr-l10n-zh-cn libreoffice-help-zh-cn manpages-zh
RUN apt-get install -y fontconfig
RUN apt-get install -y evince
RUN apt-get install -y fcitx-pinyin fonts-arphic-uming
RUN fc-cache -fv
COPY locale.gen /etc/locale.gen
RUN apt-get install -y fcitx-pinyin fonts-arphic-uming
RUN apt-get install -y tzdata
RUN  apt-get install -y locales tzdata xfonts-wqy && \
    locale-gen zh_CN.UTF-8 && \
    locale-gen  && \
    update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 && \
    ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8

其中locale.gen文件如下:

zh_CN.UTF-8 UTF-8

运行以下命令编译一个名为x11docker/securebrowser的容器:

$ docker build -t x11docker/securebrowser .

3. 容器启动及包装

撰写一个启动x11容器的命令文件:

$ cat /home/xxx/start_en.sh
read id < <(x11docker --showid --network=host --home x11docker/securebrowser thunderbird)
docker exec -e XMODIFIERS="@im=fcitx" -e QT_IM_MODULE="fcitx" -e GTK_IM_MODULE="fcitx" $id fcitx&

撰写一个桌面快速启动文件以快速调用:

$ cat /home/xxx/Secure.desktop
[Desktop Entry]
Version=1.0
Exec=xterm -e '/home/xxx/start_en.sh;sleep 10;bash'
Name=SecureApp
GenericName=SecureAPP
Comment=SecureApp
Encoding=UTF-8
Terminal=false
Type=Application
Categories=Application;Network;

注意需要安装xterm包以便可以方便的使用xterm调用启动文件。