0:下载BeagleBone Black操作系统镜像:
https://debian.beagleboard.org/images/
当前最新的是:
https://debian.beagleboard.org/images/bone-debian-9.2-iot-armhf-2017-10-10-4gb.img.xz
下载后,解压得到:bone-debian-9.2-iot-armhf-2017-10-10-4gb.img
用dd命令或者Win32DiskImager写入到TF卡中,建议大于等于4G
1,登录到bbb,并切换到root权限
Xshell:\> ssh [email protected] #从路由器可以看到BeagleBone Black的IP password: #密码:temppwd [email protected]:~$ sudo -s #密码:temppwd [email protected]:~# userdel -r debian [email protected]:~# vim /etc/ssh/sshd_config 将 #PermitRootLogin prohibit-password 改为 PermitRootLogin yes #重启SSHD服务 [email protected]:~# /etc/init.d/ssh restart
2,做必要的软件安装/卸载
[email protected]:~# apt-get update [email protected]:~# apt-get install psmisc [email protected]:~# apt-get autoremove apache2 [email protected]:~# apt-get autoremove nodejs [email protected]:~# apt-get install -f [email protected]:~# apt-get autoremove -f
3,扩容
查找脚本路径 [email protected]:~# find / -iname "grow_partition.sh" /opt/scripts/tools/grow_partition.sh [email protected]:~# 查看当前磁盘剩余 [email protected]:~# df -hT Filesystem Type Size Used Avail Use% Mounted on udev devtmpfs 217M 0 217M 0% /dev tmpfs tmpfs 49M 5.6M 44M 12% /run /dev/mmcblk0p1 ext4 3.3G 1.6G 1.5G 52% / tmpfs tmpfs 244M 0 244M 0% /dev/shm tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs tmpfs 244M 0 244M 0% /sys/fs/cgroup tmpfs tmpfs 49M 0 49M 0% /run/user/1000 tmpfs tmpfs 49M 0 49M 0% /run/user/0 [email protected]:~# 执行扩容脚本 [email protected]:~# /opt/scripts/tools/grow_partition.sh [email protected]:~# reboot #手动重新上电,开机 Xshell:\> ssh [email protected] [email protected]:~# df -hT #扩容成功 Filesystem Type Size Used Avail Use% Mounted on udev devtmpfs 217M 0 217M 0% /dev tmpfs tmpfs 49M 4.9M 44M 11% /run /dev/mmcblk0p1 ext4 7.4G 1.6G 5.5G 23% / tmpfs tmpfs 244M 0 244M 0% /dev/shm tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs tmpfs 244M 0 244M 0% /sys/fs/cgroup tmpfs tmpfs 49M 0 49M 0% /run/user/0 [email protected]:~#
4,其他参考信息:
内存: [email protected]:~# free -m total used free shared buff/cache available Mem: 487 28 375 4 83 443 Swap: 0 0 0 [email protected]:~# 磁盘: [email protected]:~# fdisk -l Disk /dev/mmcblk0: 7.5 GiB, 8061452288 bytes, 15745024 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xe6537755 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 8192 15745023 15736832 7.5G 83 Linux [email protected]:~# CPU信息 [email protected]:~# cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 2 (v7l) BogoMIPS : 995.32 Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc08 CPU revision : 2 Hardware : Generic AM33XX (Flattened Device Tree) Revision : 0000 Serial : 0000000000000000 [email protected]:~# 进程信息 [email protected]:~# pstree -ac systemd ├─agetty --noclear tty1 linux ├─agetty --keep-baud 115200,38400,9600 ttyS0 vt220 ├─agetty --keep-baud 115200,38400,9600 ttyGS0 vt220 ├─atd -f ├─avahi-daemon │ └─avahi-daemon ├─cgmanager -m name=systemd ├─connmand -n --nodnsproxy ├─cron -f ├─dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation ├─dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service ├─haveged --Foreground --verbose=1 -w 1024 ├─rsyslogd -n │ ├─{in:imklog} │ ├─{in:imuxsock} │ └─{rs:main Q:Reg} ├─sshd -D │ └─sshd │ └─bash │ └─pstree -ac ├─systemd --user │ └─(sd-pam) ├─systemd-journal ├─systemd-logind ├─systemd-timesyn │ └─{sd-resolve} ├─systemd-udevd └─wpa_supplicant -u -s -O /run/wpa_supplicant [email protected]:~#
时间: 2024-10-18 19:48:05