Page 1 of 1

使用 nand 启动,是不是用不了ssh?

Posted: 2024-05-24 2:02
by Eworm001
使用 nand 启动,是不是用不了ssh,因为rootfs挂载成了只读,/var/empty 无法写文件

Re: 使用 nand 启动,是不是用不了ssh?

Posted: 2024-05-24 3:36
by Eng38
您好,使用 nand 或 SD卡启动都可以使用 SSH。

1.使用动态IP进行SSH登录,就要用扫描工具、串口和ADB等多种方法查询到IP地址:192.168.xxx.xxx。
2.系统为静态IP且未开启DHCP,使用静态IP进行SSH登录,参考帖子:viewtopic.php?t=588
3.使用USB虚拟网口进行SSH登录,它的IP地址是固定的172.32.0.93,所以在电脑上配置虚拟网口也应该是172.32.0.xxx网段。
参考教程:https://wiki.luckfox.com/zh/Luckfox-Pic ... lnet-Login

Re: 使用 nand 启动,是不是用不了ssh?

Posted: 2024-05-24 5:28
by Eworm001

Code: Select all

bash
 ./S50sshd start
chown: /var/empty/: No space left on device
Starting sshd: /var/empty must be owned by root and not group or world-writable.
OK
# 

Code: Select all

bash

# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs              59.1M     59.1M         0 100% /
devtmpfs                 16.7M         0     16.7M   0% /dev
tmpfs                    16.8M         0     16.8M   0% /dev/shm
tmpfs                    16.8M     64.0K     16.7M   0% /tmp
tmpfs                    16.8M    176.0K     16.6M   1% /run
/dev/ubi4_0              22.4M     18.1M      4.3M  81% /oem
/dev/ubi5_0               4.5M     24.0K      4.5M   1% /userdata
# 


Re: 使用 nand 启动,是不是用不了ssh?

Posted: 2024-05-24 5:31
by Eworm001
网络

Code: Select all

bash
# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:71:B9:9C:BC:0B  
          inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:513 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:321813 (314.2 KiB)  TX bytes:830 (830.0 B)
          Interrupt:51 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 8A:31:E9:2A:11:C0  
          inet addr:172.32.0.93  Bcast:172.32.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:971 errors:0 dropped:502 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:165538 (161.6 KiB)  TX bytes:0 (0.0 B)

# 

Re: 使用 nand 启动,是不是用不了ssh?

Posted: 2024-05-24 5:53
by Eng38
Eworm001 wrote: 2024-05-24 5:28

Code: Select all

bash
 ./S50sshd start
chown: /var/empty/: No space left on device
Starting sshd: /var/empty must be owned by root and not group or world-writable.
OK
# 

Code: Select all

bash

# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs              59.1M     59.1M         0 100% /
devtmpfs                 16.7M         0     16.7M   0% /dev
tmpfs                    16.8M         0     16.8M   0% /dev/shm
tmpfs                    16.8M     64.0K     16.7M   0% /tmp
tmpfs                    16.8M    176.0K     16.6M   1% /run
/dev/ubi4_0              22.4M     18.1M      4.3M  81% /oem
/dev/ubi5_0               4.5M     24.0K      4.5M   1% /userdata
# 

您的网络看起来没有问题,运行 S50sshd 脚本给出的错误信息表明 rootfs 已满,导致 chown 命令因空间不足而失败。要解决这个问题,需要释放一些设备上的空间。建议烧录网盘提供的镜像进行测试。