For a robotics project, I've assembled a make target that uses dd (actually dcfldd) to write a Raspbian Jessie image to SD card. This way, I can be assured that my environment is reproducible from scratch any time I want it.
The make target is just
flash:
sudo dcfldd bs=4M if=$(IMGPATH) of=$(SDX)
sync
where $(SDX) is /dev/sdc, and is meant to be preceded by a script which mounts the image at /mnt/img, makes some modifications, calls sync, and than unmounts it.
The process seems to be working fine, except that I always need to call the make target twice--the first time, if I pull the eject the card reader and reinsert it, one of the two partitions from the image fails to mount, and, if I try to boot the Raspberry Pi from it, I get a keel panic.
What's going on here? Is there some other way I should be writing this image so that it works on the first try? I don't want to be buing my limited SD card write cycles needlessly.
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 260
تاريخ: دوشنبه
4 مرداد
1395 ساعت: 8:58