In this way, I would avoid having to run
when I copy the image to a card and boot the pi.
Code: Select all
apt-get update && apt-get dist-upgrade
I have previously made use of mount with a loop device to mount the boot partition and copy an empty ssh file and a wpa_supplicant.conf file to it so that I can boot headless (which in theory I can do from a Windows machine anyway).
I also mounted the root partition as well, and was able to access that successfully.
I did think that mounting the root, and using chroot /mountpoint ... would allow me to do this.
Of course, I would also have to mount the boot partition under the mount point's boot directory first, or updating the kernel and/or any overlays wouldn't work.
So, two questions:
1. Is what I want to do possible?
(I recognise that I would have to regularly run the process to keep the image updated)
2. Does the mechanism I describe allow me to do such a thing?
Thanks in advance for any advice, experience, or general comments.