最近在进行debian根文件系统移植时,参考网上的例子使用debootstrap抽取了一个debian stretch根文件系统,之后得到了一个文件夹。
但是当我使用指令,将根文件系统下的所有内容复制到SD卡分区时,开机启动开发板,出现如下报警。
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[ OK ] Reached target System Time Synchronized.
[ OK ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[ OK ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[ OK ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[ OK ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Telephony service...
Starting System Logging Service...
[ OK ] Started D-Bus System Message Bus.
[ 6.983851] RTL8211E Gigabit Ethernet e6800000.ethernet-ffffffff:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=161)
[ OK ] Started Telephony service.
Starting DUN service...
Starting Connection service...
Starting Save/Restore Sound Card State...
Starting Login Service...
[ OK ] Started Regular background program processing daemon.
[ OK ] Started System Logging Service.
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Found device /dev/ttySC0.
[ 7.665906] random: crng init done
[ 7.669368] random: 7 urandom warning(s) missed due to ratelimiting
[ OK ] Started DUN service.
[ OK ] Started Connection service.
[ OK ] Started Login Service.
Starting Bluetooth service...
[ OK ] Started Bluetooth service.
[ OK ] Reached target Bluetooth.
[FAILED] Failed to start Hostname Service.
See 'systemctl status systemd-hostnamed.service' for details.
给大家提炼一下,就是集中在两个错误上
1、Failed to start Network Time Synchronization.
2、Failed to start Hostname Service.
当你进行展开,查看错误缘由时,你是查不到任何地址或者命令错误的。
之后经过我多次google发现,原来是由于/var/下面缺少了tmp文件夹,导致此错误发生。
修改方式:1,使用sudo cp -arf debian_stretch/* /media/******/rootfs/ (即重新完整复制根文件系统)
2,手动 mkdir /var/tmp (没试过,不推荐)
经过重新复制根文件系统后,问题解决。启动无报错。
问题解决,一片祥和。