«

WSL中安装debian再看看能不能升级truenas

学长 发布于 阅读:507 软件


wsl --set-default-version 2
wsl --install -d Debian

安装只能默认到C盘中能导出然后再导入到D盘

InstallingDebianOn/Microsoft/Windows/SubsystemForLinux - Debian Wiki

cat /etc/issue
uname -a

版本是12,内核是5.15的

开始迁移到其他盘

终端,管理员模式

wsl -l -v

看看有什么虚拟机可以用

wsl --export Debian 'D:\Debian-WSL2.tar'
wsl --unregister debian

windows还是那样大小写不敏感

wsl --import Debian 'D:\Debian-WSL2' 'D:\Debian-WSL2.tar'

导入完成就可以 wsl -d debian运行 debian

当然也可以通过 wsl --set-default debian来把 debian设置成默认的 wsl -s更快点

其他一些指令

wsl -d linux发行版 -u 用户

以特定用户登录指定发行版 exit一直退出到到 ps就回到 windows

wsl -t linux发行版

关闭指定的系统

wsl --shutdown

关闭所有的


官方途径安装的直接 nvidia-smi验证下,根本不需要安装 wsl2 kernel驱动。。。

Install Proxmox VE on Debian 12 Bookworm - Proxmox VE

truenas/truenas-installer: Repo with scripts for TrueNAS installation on Debian

先试试能不能truenas

好用点的vim

apt -y install curl vim
curl https://raw.githubusercontent.com/wklken/vim-for-server/master/vimrc > ~/.vimrc

因为是放在 ~下的,每个用户要改变就得自己执行下 curl https://raw.githubusercontent.com/wklken/vim-for-server/master/vimrc > ~/.vimrc

安装下 git 还有python

sudo apt -y install git python3
sudo git clone https://github.com/truenas/truenas-installer.git truenas
cd truenas

这段是一侧尝试,可以直接跳到下一个分割线

因为默认目录是windows的。。。debian注册的用户没有权限。。。下面全部su得了。。。

clone完发现需要setuptool

然后刚才安装的python3是没有pip的。。。

apt install python3-pip

直接接近400M。。。


python3 -m pip install setuptools

直接告诉我。。。apt install python3-setuptools...那我装pip干嘛???

python3 setup.py build

这build的速度。。。让我觉得。。。这很有可能不是个再debian下安装truenas的项目,而是。。。在truenas上安装deb的工具?

python3 setup.py install

啥都没有发生。。。

python3 -m truenas_installer

尝试跑

需要aiohttp ixhardware,pyroute2是我在网络部分看到的。。。

apt install python3-aiohttp python3-pyroute2

ixhardware 找不到 因为这个是truenas/ixhardware truenas自己的项目不是python3下面的

因为之前已经进到上一个项目先到上一个目录中

cd ..
git clone https://github.com/truenas/ixhardware.git
cd ixhardware
python3 build
python3 install

下载并进入这个项目,尝试安装出 zip_safe flag not set; analyzing archive contents...不知道是否真的安装成功了。。。后面测试不影响运行。。。

退回到truenas-installer

cd ../truenas

python3 -m truenas_installer

缺少humanfriendly可以在python3中找到,但是接着aiohttp_rpc。。。找不到。。。

apt install python3-humanfriendly

aiohttp-rpc · PyPI对应的描述只有pip。。。google目前没找到对应的apt

那就尝试安装完全体python3-full需要164M+pipx117M 没什么卵用。。。

apt install python3-full pipx
apt remove python3-full pipx
apt autoremove

再通过 dpkg -s python3-aiohttp 对比了truenas和wsl debian中的两个发现版本不一样。。。我也不知道是不是这个造成的。。。

再试试再truenas中能否 python3 import aiohttp_rpc同样。。。。木有啊!!!

最终还是。。。pip了。。。

pip install aiohttp-rpc --break-system-packages

缺少python3-jsonschema

apt install python3-jsonschema

缺少 truenas_connect_utils,这个项目在这里truenas/truenas_connect_utils

cd ..

git clone https://github.com/truenas/truenas_connect_utils.git

cd truenas_connect_util

python3 setup.py build

python3 setup.py install

cd ../truenas

python3 -m truenas_installer

跳出来试着安装下。。。缺少jwt

apt install python3-jwt

接着缺少truenas_api_client,应该是这个truenas/api_client

cd ..

git clone https://github.com/truenas/api_client.git

python3 ./api_client/setup.py build

python3 ./api_client/setup.py install

这样写有问题,必须去api_client目录中运行。。。

cd api_client

python3 setup.py build

python3 setup.py install

cd ../truenas

python3 -m truenas_installer

缺少josepy

apt insatll python3-josepy

缺少truenas_acme_utils,应该是truenas/truenas_crypto_utils

cd..

git clone https://github.com/truenas/truenas_crypto_utils.git

cd truenas_crypto_utils

python3 setup.py build

python3 setup.py install

cd ../truenas

python3 -m truenas_installer

缺少acme dateutil

apt install python3-acme python3-dateutil

touch /etc/version

出dialog问题。。。大概是???找不到tty1?

https://iheld.net/post-299.html

这个程序尝试连接的是ttys0...因为介绍太少我也不知道是为啥。。。

apt install -y git python3 python3-pip python3-setuptools \
python3-aiohttp python3-humanfriendly python3-jsonschema \
python3-pyroute2 python3-jwt python3-josepy python3-acme \
python3-dateutil

pip install aiohttp-rpc --break-system-packages

git clone https://github.com/truenas/ixhardware.git
cd ixhardware
python3 setup.py build
python3 setup.py install

git clone https://github.com/truenas/truenas_connect_utils
cd truenas_connect_utils
python3 setup.py build
python3 setup.py install

git clone https://github.com/truenas/api_client
cd api_client
python3 setup.py build
python3 setup.py install

git clone https://github.com/truenas/truenas_crypto_utils
cd truenas_crypto_utils
python3 setup.py build
python3 setup.py install

touch /etc/version

cd ../truenas-installer

git clone https://github.com/truenas/truenas-installer.git
python3 setup.py build
python3 setup.py install

python3 -m truenas_installer

python tests:
apt install -y  python3-pytest python3-pytest-asyncio


扫描二维码,在手机上阅读