Skip to content

Instantly share code, notes, and snippets.

@BillyNate
Last active March 2, 2024 19:34
Show Gist options
  • Save BillyNate/13732d02c41378f1c630fa914fe63378 to your computer and use it in GitHub Desktop.
Save BillyNate/13732d02c41378f1c630fa914fe63378 to your computer and use it in GitHub Desktop.

Setup with TinyCore Linux (RAM only OS) on Raspberry Pi Zero W on Windows

These are the steps taken to setup piCore 14 on a Raspberry Pi with only Wi-Fi (no ethernet)
Newer version might work as well (or maybe even better), but have not been tested.

Set up piCore

  1. Download the piCore image
  2. Unpack the .zip file and write the .img file to the SD-Card (using Raspberry Pi Imager for example)
  3. Move the SD-Card to the Pi, plug in a keyboard and a screen, plug in the power source
  4. Execute backup shell command after the first boot to save generated unique SSH keys which will be used during next boots.
  5. Expand the partition:
    1. Start the partition tool: sudo fdisk -u /dev/mmcblk0
    2. List partitions with p command and write down the StartLBA of the second partition
    3. Delete second partition with d than recreate it with n command
      Select p for Primary Partition and 2 for Partition Number
      Use the same starting sector as deleted had and use the default value for Last Cylinder
      Exit fdisk with w command
    4. Reboot the Pi: sudo reboot
    5. After reboot expand the partition: sudo resize2fs /dev/mmcblk0p2 (may take a while)
  6. Run uname -rm to get your kernel version and architecture, write this down
  7. Shut down the Pi and move the SD-Card back to the pc
  8. Download needed extensions to the boot partition of the SD-Card from http://tinycorelinux.net/14.x/armv6/tcz/
    Make sure the architecture matches with the output of step 6
    Append the filename to get the full url:
    • firmware-rpi-wifi.tcz
    • wifi.tcz
    • wireless_tools.tcz
    • wireless-5.4.51-piCore.tcz <-- make sure this matches with the kernel version of step 6
    • wpa_supplicant.tcz
    • libnl.tcz
    • readline.tcz
    • ncurses.tcz
  9. Move the SD-Card to the Pi again and have it boot
  10. Mount the boot partition: mount /mnt/mmcblk0p1
  11. Move extension: mv /mnt/mmcblk0p1/*.tcz /mnt/mmvblk0p2/tce/optional/
  12. Install extensions: tce-load -i /mnt/mmvblk0p2/tce/optional/*.tcz
  13. Add extensions to /mnt/mmcblk0p2/tce/onboot.lst:
    • firmware-rpi-wifi.tcz
    • wifi.tcz
  14. Generate the checksums and download the dep files:
    for F in /mnt/mmvblk0p2/tce/optional/*.tcz; do
      md5sum $F > ${F}.md5.txt
    done
    tce-audit updatedeps
    tce-update
    
  15. Configure wifi: sudo wifi.sh
  16. To connect Wi-Fi at boot, add wifi.sh -a &> /home/tc/wifi.log & to /opt/bootlocal.sh
  17. Save changes: backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment