我已看过一些不同的教程,但仍然无法调整 BeagleBone Black 文件系统的大小。
运行后/opt/scripts/tools/grow_partition.sh
,我得到以下输出:
debian@beaglebone:~$ sudo /opt/scripts/tools/grow_partition.sh
Media: [/dev/mmcblk1]
Disk /dev/mmcblk1: 116736 cylinders, 4 heads, 16 sectors/track
Old situation:
Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk1p1 * 1 3647 3647 3734528 83 Linux
/dev/mmcblk1p2 0 - 0 0 0 Empty
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty
New situation:
Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/mmcblk1p1 * 1 3647 3647 3734528 83 Linux
/dev/mmcblk1p2 0 - 0 0 0 Empty
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
sfdisk: BLKRRPART: Device or resource busy
sfdisk: The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
我的df -h
输出:
debian@beaglebone:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 99M 8.4M 91M 9% /run
/dev/mmcblk1p1 3.5G 3.2G 61M 99% /
tmpfs 247M 4.0K 247M 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 247M 0 247M 0% /sys/fs/cgroup
tmpfs 50M 0 50M 0% /run/user/1000
我也尝试过使用fdisk
命令手动执行此操作,但同样没有成功。如果您认为此方法有助于解决此问题,我可以重试该方法并提供命令输出。
我尝试过的教程:
- https://www.element14.com/community/thread/73919/l/not-enough-disk-space-for-apt-upgrade-on-beaglebone-ai(使用脚本)
- https://openthread.io/guides/border-router/beaglebone-black#expand-the-sd-card-image(手动使用 fdisk
我尝试过使用 16GB 和 64GB SD 卡。我还尝试过使用不同的图像https://beagleboard.org/latest-images,但它们似乎都给出了相同的结果。我有一台 BeagleBone Black Rev. C。
答案1
事实证明,我实际上并没有从 SD 卡启动,第二个教程我链接的内容实际上说你必须按住一个按钮才能从 SD 卡启动。我这样做之后,运行sudo /opt/scripts/tools/grow_partition.sh
就正常了。
我必须研究如何始终从 SD 卡启动,但我认为这足够简单。