User Tools

Site Tools


airflash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
airflash [2021/08/20 09:50]
sausage Airflash image and imager links
airflash [2021/08/20 10:59]
sausage image change
Line 1: Line 1:
 ====== AirFlash for the Pi Zero ====== ====== AirFlash for the Pi Zero ======
  
-{{ :​airflash:​airflash.jpg?​direct&​400|}}+{{ :​airflash:​airflash-with-logo.jpg?​direct&​400|}}
  
 ===== What is the AirFlash? ===== ===== What is the AirFlash? =====
Line 16: Line 16:
  
 You can plug the AirFlash into any nearby USB port (to provide power to the device), connect to the WIFI access point called ''​AirFlash'',​ and using your file manager copy your files across to whichever USB stick is connected to the AirFlash. You can plug the AirFlash into any nearby USB port (to provide power to the device), connect to the WIFI access point called ''​AirFlash'',​ and using your file manager copy your files across to whichever USB stick is connected to the AirFlash.
 +
 +{{ :​airflash:​wifi-ap.png?​nolink |}}
 +
 +{{ :​airflash:​sharing-sda1.png?​nolink |}}
  
 Another good use case is when you are at a LAN party and everyone needs access to the same map packs and patches for a particular game. By leaving the AirFlash plugged in somewhere at the party, everyone can connect to it and pull down what is required. Another good use case is when you are at a LAN party and everyone needs access to the same map packs and patches for a particular game. By leaving the AirFlash plugged in somewhere at the party, everyone can connect to it and pull down what is required.
Line 61: Line 65:
 You can [[https://​waynejohnson.net/​airflash.zip | download the AirFlash image]], unzip and flash it using a tool like [[https://​www.osforensics.com/​tools/​write-usb-images.html | ImageUSB]] by Passmark or [[http://​rufus.ie/​en/​ | Rufus]] to your SD Card. You can [[https://​waynejohnson.net/​airflash.zip | download the AirFlash image]], unzip and flash it using a tool like [[https://​www.osforensics.com/​tools/​write-usb-images.html | ImageUSB]] by Passmark or [[http://​rufus.ie/​en/​ | Rufus]] to your SD Card.
  
-This image was designed on a 16GB SD Card so if your card is bigger, you might have to extend the partition.+This image was designed on a 16GB SD Card so if your card is bigger, you might have to [[https://​www.maketecheasier.com/​review-of-picore/​ | extend the partition]].
  
 Once flashed, insert the SD Card into the SD Card slot and boot your AirFlash. Once flashed, insert the SD Card into the SD Card slot and boot your AirFlash.
Line 90: Line 94:
 On the root of the SD Card is the README which is worth copying to your PC and keeping aside. ​ On the root of the SD Card is the README which is worth copying to your PC and keeping aside. ​
  
-Put the SD Card into the AirFlash, connect your HDMI to a TV or monitor. Connect power to the Micro-USB power port of the Pi Zero, and a Keyboard to one of the ports on the 4 port. You will boot into piCore Linux.+Put the SD Card into the AirFlash, connect your HDMI to a TV or monitor. Connect power to the Micro-USB power port of the Pi Zero, and a Keyboard to one of the ports on the 4 port. piCore Linux will boot up.
  
   Username: tc   Username: tc
Line 99: Line 103:
 ===== Extended the partitions to allow saving ===== ===== Extended the partitions to allow saving =====
  
-Use the README from the root of the SD Card to learn how to extend the Linux partition. This will be required so that changes to piCore can be persisted and extra packages can be downloaded and installed.+Use the README from the root of the SD Card to learn how to extend the Linux partition. Alternatively [[https://​www.maketecheasier.com/​review-of-picore/​ | good instructions are also here]]. This will be required so that changes to piCore can be persisted and extra packages can be downloaded and installed.
  
  
Line 160: Line 164:
 Note: //the nettle dependency comes from TinyCoreLinux 12.x instead of 13.x. This is because there is a dependency error for Samba in the 13.x packages.// Note: //the nettle dependency comes from TinyCoreLinux 12.x instead of 13.x. This is because there is a dependency error for Samba in the 13.x packages.//
  
-Insert ​the USB stick into one of the AirFlash USB ports and then mount the drive.+Remove ​the USB stick from your PC and plug it into one of the AirFlash USB ports and then mount the drive.
  
 After mounting the USB flash drive (usually this will be: ''​mount /​mnt/​sda''​),​ you can copy these files to the /​mnt/​mmcblk0p2/​tce/​optional/​ folder. This is where the system looks for tcz extensions. After mounting the USB flash drive (usually this will be: ''​mount /​mnt/​sda''​),​ you can copy these files to the /​mnt/​mmcblk0p2/​tce/​optional/​ folder. This is where the system looks for tcz extensions.
Line 198: Line 202:
   chmod 755 /​mnt/​mmcblk0p2/​tce/​startairflash.sh   chmod 755 /​mnt/​mmcblk0p2/​tce/​startairflash.sh
  
-Edit the ''/​opt/​bootlocal.sh'' ​file and add the following at the bottom:+Edit the ''​bootlocal.sh''​ file with ''​ sudo vi /​opt/​bootlocal.sh''​ and add the following at the bottom:
  
 <​code>​ <​code>​
Line 223: Line 227:
  
 Create the ''​hostapd.conf''​ file at ''/​mnt/​mmcblk0p2/​tce/'' ​ Create the ''​hostapd.conf''​ file at ''/​mnt/​mmcblk0p2/​tce/'' ​
 +
 +Add the following to the file:
  
 <​code>​ <​code>​
Line 262: Line 268:
 dnsmasq is being used for it's DHCP features, not for it's DNS features. Don't let the name throw you. dnsmasq is being used for it's DHCP features, not for it's DNS features. Don't let the name throw you.
  
-Head into the tce folder so we can create a couple of config files: ​+Head into the ''​tce'' ​folder so we can create a couple of config files: ​
  
-  cd /​mnt/​mmcblk0p2/​tce/options+  cd /​mnt/​mmcblk0p2/​tce
  
-Load the extension with:+First, load the extension with:
  
   tce-load -i dnsmasq.tcz   tce-load -i dnsmasq.tcz
Line 277: Line 283:
  
   sudo vi dnsmasq.conf   sudo vi dnsmasq.conf
 +
 +Add the following to the file:
  
 <​code>​ <​code>​
Line 301: Line 309:
 ===== Persisting hostapd and dnsmasq between reboots ===== ===== Persisting hostapd and dnsmasq between reboots =====
  
-Edit the ''/​mnt/​mmcblk0p2/​tce/​onboot.lst''​ to make it as:+Edit the ''​onboot.lst''​ file with: ''​sudo vi /​mnt/​mmcblk0p2/​tce/​onboot.lst''​ to make it as:
  
 <​code>​ <​code>​
Line 311: Line 319:
 </​code>​ </​code>​
  
-Add the following to the bottom of the ''/​opt/​bootlocal.sh'' ​file:+Edit the ''​bootlocal.sh''​ file with ''​sudo vi /​opt/​bootlocal.sh'' ​and add the following to the bottom:
  
 <​code>​ <​code>​
Line 344: Line 352:
   tce-load -i gmp.tcz   tce-load -i gmp.tcz
  
-Create a samba folder and a ''​smb.conf''​ config file at ''​usr/​local/​etc/​samba/'':​+Create a samba folder and a ''​smb.conf''​ config file with ''​sudo vi usr/​local/​etc/​samba/​smb.conf'':​
  
 <​code>​ <​code>​
Line 389: Line 397:
 This will persist the samba folder and the ''​smb.conf''​ for all future reboots. This will persist the samba folder and the ''​smb.conf''​ for all future reboots.
  
-Start Samba to test and to create the required default files.+Start Samba to test and to create the required default files:
  
   /​usr/​local/​etc/​init.d/​samba4 start   /​usr/​local/​etc/​init.d/​samba4 start
  
-Then to have this work on startup, add the same ''​samba4''​ line above into the ''​bootlocal.sh''​ script with:+Then to have this work on startup, add the same ''​samba4''​ line above into the bottom of the ''​bootlocal.sh''​ script with:
  
   sudo vi /​opt/​bootlocal.sh   sudo vi /​opt/​bootlocal.sh
Line 432: Line 440:
 {{ :​airflash:​file-network.png?​nolink |}} {{ :​airflash:​file-network.png?​nolink |}}
  
-You will see a share and should be able to browse ​into a mounted /mnt/sda.+You will see a share and should be able to browse ​the files inside.
  
 {{ :​airflash:​sharing-sda1.png?​nolink |}} {{ :​airflash:​sharing-sda1.png?​nolink |}}
Line 449: Line 457:
 Create the following file at: Create the following file at:
  
-  /​etc/​udev/​rules.d/​999-usb-automount.rules+  ​sudo vi /​etc/​udev/​rules.d/​999-usb-automount.rules
  
 Add the following to the file: Add the following to the file:
Line 462: Line 470:
 </​code>​ </​code>​
  
 +I'll explain the above briefly. If a USB flash drive is inserted (add), it's name will be mounted and added to the usershare folder. If the flash drive is removed (remove), the usershare will be deleted, ''​fuser''​ will drop any usages to the share, ''​umount''​ with unmount the share and ''​rmdir''​ will remove the share folder from ''/​mnt''​. This gives us the most robust set up for inserting and removing random flash drives and USB sticks.
  
-Add the path to your rules file+Add the following ​path: 
   ​   ​
   etc/​udev/​rules.d/​999-usb-automount.rules   etc/​udev/​rules.d/​999-usb-automount.rules
   ​   ​
-to the .filetool.lst file with:+to the bottom of the ''​.filetool.lst'' ​file with:
  
   sudo vi /​opt/​.filetool.lst   sudo vi /​opt/​.filetool.lst
Line 473: Line 482:
   filetool.sh -b   filetool.sh -b
  
-Connecting a USB stick should make the drive appear when browsing \\10.0.0.1+Connecting a USB stick should make the drive appear when browsing ​''​\\10.0.0.1''​
  
-Congratulations! You have successfully built an AirFlash. I hope you enjoy using it, and that it becomes a handy tool for a variety of situations.+**Congratulations! You have successfully built an AirFlash.** I hope you enjoy using it, and that it becomes a handy tool for a variety of situations.
  
 Who knows, maybe even your IT department would appreciate having one on hand. Who knows, maybe even your IT department would appreciate having one on hand.
airflash.txt ยท Last modified: 2021/09/04 09:49 by sausage