I'm trying to install LSDK 18.03 images to SD card with command flex-installer under regular user:
$ flex-installer -b bootpartition_arm64_lts_4.14.tgz -r build/rfs/rootfs_ubuntu_xenial_arm64 -m ls1043ardb -d /dev/sdd
but it fails with error:
LSDK-18.03/flexbuild/tools/flex-installer: line 362: /run/media/sdd3/etc/hostname: Permission denied
I've checked the problematic line in this script.
echo "$distroname.$machine" > /run/media/${devpartname}3/etc/hostname
In this script only this line does not using sudo, but it should when modifying files on target media. It works for me, if I change this line to:
echo "$distroname.$machine" | sudo tee /run/media/${devpartname}3/etc/hostname
Does this fix make sense to you?
Your modification is correct.
It looks like designers do not add "sudo" in this script since customer uses also different Linux versions on the host PC.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------