我们正在做一个小项目,我们需要一种稳定的方式来远程更新我们的设备(我们正在使用Raspberry PI 4)。我们决定使用Mender。
我能够从官方的raspbian镜像创建一个可启动的Mender镜像。在那之后,我决定首先在SD卡上安装官方的raspbian镜像,进行所有必要的重大更改(安装所有必需的软件包,添加我们项目的第一个版本,...)并创建SD卡的映像。
所以..。这并不是很顺利。我能够制作SD卡的副本,并且能够创建完全相同的副本并在另一台设备上运行。但Mender无法将其识别为可启动映像,因此无法对其进行转换。
我使用以下命令来创建镜像文件:
sudo dd if=/dev/sda2 of=/project/input/custom.img在尝试将图像转换为有效的Mender图像后,我得到了以下错误:
2020-03-09 08:03:22 [INFO] [mender-convert-extract] Using configuration file: configs/mender_convert_config
2020-03-09 08:03:22 [INFO] [mender-convert-extract] Using configuration file: configs/raspberrypi4_config
partx: input/custom.img: failed to read partition table
2020-03-09 08:03:22 [INFO] [mender-convert-extract] Validating disk image
2020-03-09 08:03:22 [FATAL] [mender-convert-extract] Sorry, but could not find any valid partitions for: input/custom.img因为它不能验证镜像,所以我假设我尝试将镜像转换为发行版的方式没有任何问题,而是我创建SD卡副本的方式。我使用以下教程将图像转换为Mender版本:
https://hub.mender.io/t/raspberry-pi-4-model-b-raspbian/1312
所以我的问题是:
如何将SD卡转换为可启动映像,包括可启动分区和所有内容?
发布于 2020-03-09 22:41:03
如果您正在尝试这样做,请始终先查看官方教程。
事实证明我用错了论据。要制作可引导映像,您可以使用:
dd if=<DEVICE> of=golden-image-1.img bs=1M conv=fdatasynchttps://stackoverflow.com/questions/60596834
复制相似问题