首先下载dietpi的PC版本:
https://dietpi.com/downloads/images/DietPi_NativePC-BIOS-x86_64-Stretch.7z
然后使用Etcher烧录到U盘。
https://github.com/balena-io/etcher/releases/download/v1.5.5/balenaEtcher-Setup-1.5.5-x64.exe
插上U盘到电脑上。
这个时候,它会启动,然后开启ssh服务。
可是,我不知道它的ip是多少。
这个时候,需要使用nmap进行端口扫描。
然而:

在windows的子系统里,使用nmap是无效的。
所以,要使用nmap的windows版本,这里下载:
https://nmap.org/dist/nmap-7.70-setup.exe
下载安装后,打开powershell(win+x)。
输入:
nmap -sS 10.168.1.* -p22
几秒钟就扫描到了。看我框选的位置,找到了。

接下来就是登录:
ssh root@10.168.1.132
dietpi的默认账号是root,默认密码是dietpi。
进入后,它会自动进行设置。

之后,重新登陆一次。
ssh root@10.168.1.132
由于这个系统目前还在U盘里。现在必须想办法安装到硬盘里。
很简单,使用dd大法,直接把U盘复制到硬盘里。
首先看一下硬盘:
fdisk -l

现在,复制U盘到硬盘。
dd if=/dev/sda of=/dev/zero status=progress

过一会儿,似乎拷贝完成了。
之后,重启。
reboot
这时候就断开连接了,因为机器重启了。
等几秒钟,拔掉U盘,尝试继续连接。
ssh root@10.168.1.132

果然进来了。说明已经成功安装了系统到硬盘上。
接下来,想怎么玩就可以怎么玩了。我正在安装一个desktop。

当然,最好是换源。
nano /etc/apt/sources.list
替换内容为:
deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
剩下的事情,就不用我说了。
网友评论