-
Notifications
You must be signed in to change notification settings - Fork 0
Alternative Linux Image setup
The repository in https://github.com/T4EQ/leap-linux contains a buildroot distribution that is configured to create a WiFi access point so that one may connect to it. This makes it easier to perform the initial configuration of the raspberry pi, as you can connect to the network created by the raspberry pi from a computer and use this network to connect to it via ssh and configure it.
The resulting image is located at https://github.com/T4EQ/leap-linux/releases/tag/aid-india-feature-complete-demo. Download sdcard.img and use Balena Etcher to flash it to the SD card. The boot the raspberry pi with the SD card connected.
Upon boot, a LEAP-Setup WiFi network will be available. Connect to it from your computer and then use ssh t4eq@leap.local to connect to the device. Once inside, use the shell session to configure the connection to an actual WiFi network with internet access. You can use the following commands:
$ nmcli dev wifi rescan
$ nmcli dev wifi # This command should show the available networks. While the scan runs the SSH connection might become a bit unstable. If you get disconnected, try to restart the ssh connection.
$ nmcli dev wifi connect <WIFI-SSID> password <WIFI-PASSWORD> # Run this once the SSID is present in the list of connections.
Note that after the last command above, the LEAP-Setup network will no longer be available. If you introduced the wrong credentials, you will have to re-flash the SD card and repeat the procedure. However, if everything worked, the raspberry pi will connect to the network and then you will be able to ssh into it using ssh t4eq@leap.local as well, assuming you are connected to the same network.
At this time the operating system of LEAP needs to be installed and configured manually. This guide describes the steps taken to get the Raspberry Pi OS in working condition before we can install and install and use the LEAP application.
Now let's partition the USB drive. In almost all likelihood the drive will be present as /dev/sda, but you can double check with commands such as sudo fdisk -l, lsblk or looking at dmesg output. The remainder of this guide assumes that the drive is present at /dev/sda.
We can partition the drive with:
$ sudo fdisk /dev/sda <<EOF
o
n
p
1
w
EOF The drive should look like:
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 238 GB, 256060514304 bytes, 500118192 sectors
31130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 0,1,1 1023,254,63 63 500118191 500118129 238G 83 Linux
Now lets create a file system inside the one partition we created. We label it LEAP_DATA to be able to refer to it later.
sudo mke2fs -L LEAP_DATA /dev/sda1Check that the filesystem gets mounted:
$ sudo mount -a
$ sudo mount | grep sda1
/dev/sda1 on /var/lib/leap type ext4 (rw,noatime)The system is finally ready to execute the LEAP software.