My local notes on how to use and abuse the Raspberry Pi.
grep Revision /proc/cpuinfo
You can look up Raspberry Pi revision codes here.
This script will find any devices on your network that have been configured by DHCP and have an ARP record.
#!/bin/bash echo "The following Raspberry Pi 4 devices have been found:" arp -a | grep dc:a6 # add MAC for other models... echo "The following Raspberry Pi 2/3 devices have been found:" arp -na | grep -i "b8:27:eb"
This will result in mounting a partition contained within a Pi image file at /tmp/image-part
file ubuntu-20.04.1-preinstalled-server-arm64+raspi.img # find the startsector of the partition you wish to mount (in this example 526336) sudo mount -o offset=$[512*526336] ubuntu-20.04.1-preinstalled-server-arm64+raspi.img /tmp/image-part