Skip to content

rern/rOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,646 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rOS - DIY rAudio

Build rAudio - Audio player and renderer for Raspberry Pi

  • For all Raspberry Pis:
  • Create rAudio from latest releases of Arch Linux Arm
  • Interactive interface
  • Options:
    • Run ROOT partition on USB drive
    • Run on USB only - no SD card (boot from USB)
    • Pre-configure Wi-Fi connection
    • Exclude features (can be as light as possible in terms of build time and disk space)
  • Take less than 15 minutes for the whole process with a decent download speed.

Procedure

  • Prepare partitions
    • Create BOOT and ROOT
  • Create Arch Linux Arm + rAudio
    • Use wired LAN connection if possible
      • Use router assigned IP address if possible
        • Router may take some time to broadcast hostname of DHCP Raspberry Pi
      • Optional - Pre-configure Wi-Fi connection
    • Select features
    • Download Arch Linux Arm
    • Write BOOT and ROOT
    • SSH connect PC to Raspberry Pi
    • Upgrade kernel and default packages
    • Install feature packages
    • Install web user interface
    • Configure
    • Set defaults
  • Optionals
    • Setup Wi-Fi auto-connect
    • Create image file
  • Expert mode (1 command line )
    • For those who know how to read and confirm syntax of SD card partitions.
    • For Alternative 1: Micro SD card only
     bash <( wget -qO - https://github.com/rern/rOS/raw/main/create.sh )
    • If the SD card was not recognized, use GParted to wipe all partitions.

dialog1 dialog2

Need

  • PC - Linux - any distro
    • or on USB e.g., Manjaro - Arch Linux
    • or on Raspberry Pi itself (If no GUI, fdisk and mount skills needed.)
    • or on VirtualBox on Windows (with network set as Bridge Adapter) - Slowest
  • Raspberry Pi
  • Network connection to Raspberry Pi
    • Wired LAN
    • Optional: Wi-Fi (if necessary)
  • Media:
    • Micro SD card
      • Optional: Micro SD card + USB drive
      • Optional: USB drive only

Prepare partitions

  • On Linux PC
  • Make sure no partitions labelled as BOOT or ROOT
  • Open GParted app (Manjaro root password: manjaro)
  • 3 options:
    • Micro SD card only
    • Micro SD card + USB drive
    • USB drive only

Option 1: Micro SD card only

  • 4GB+ (shoule be at least class 10 or U1)
  • Unmount > Delete all partitions (make sure it's the micro SD card)
  • Create partitions:
    No. Size Type Format Label
    1 300MiB primary fat32 BOOT
    2 (the rest) primary ext4 ROOT

Option 2: Micro SD card + USB drive

  • Micro SD card - 300MB+
    • Unmount > Delete all partitions (Caution: make sure it's the SD card)
    • Create a partition:
      No. Size Type Format Label
      1 300MiB primary fat32 BOOT
  • USB drive - 4GB+
    • Blank:
      • Unmount > Delete all partitions (Caution: make sure it's the USB drive)
      • Create partitions:
        No. Size Type Format Label
        1 4000MiB primary ext4 ROOT
        2 (the rest) primary ext4 (any)
    • Not blabk:
      • No need to reformat or change format of existing partition
      • Resize the existing to get 5000MiB unallocated space (anywhere - at the end, middle or start of the disk)
      • Create a partition in the space:
        No. Size Type Format Label
        (any) (existing) primary (any) (any)
        (any) 4000MiB primary ext4 ROOT

Option 3: USB drive only

  • Not for Raspberry Pi Zero, 1
  • Suitable for faster-than-SD-card drives.
  • Normal hard drive needs external power, e.g., powered USB hub, to have it spin up 5+ seconds before boot.
  • Boot takes 10+ seconds longer (detect no sd card > read boot loader into memory > boot)
  • Enable USB mass storage boot
  • Create partitions: (Drive with existing data must be resized and rearranged respectively.)
    No. Size Type Format Label
    1 300MiB primary fat32 BOOT
    2 4000MiB primary ext4 ROOT
    3 (the rest) primary ext4 (any)

Create Arch Linux Arm + rAudio

  • Open Files app (File Manager on Manjaro)
  • Click BOOT and ROOT to mount
  • Note each path in location bar or hover mouse over BOOT and ROOT for confirmation
  • Switch user to root
su
  • Create script
bash <( wget -qO - https://github.com/rern/rOS/raw/main/create-alarm.sh )
  • RPi 2 and 3 get the same ArchLinuxARM-rpi-2-latest.tar.gz
  • Errors or too slow download: press Ctrl+C and run ./create-alarm.sh again (while in Create Arch Linux Arm mode only)
  • If there're other applications running and "Create Arch Linux Arm" progress was stalled, open another terminal and run sync command.

Optionals

Setup Wi-Fi auto-connect for headless/no screen (if not set during build)

  • On Linux or Windows
  • Insert micro SD card
  • 3 alternatives:
    1. From existing
      • Backup the profile file from /etc/netctl/PROFILE
      • Rename it to wifi then copy it to BOOT before power on.
    2. Edit template file - name and password
      • Open wifi0 in BOOT with text editor
      • Edit SSID and Key
      • Save as wifi
    3. Generate a complex profile - static IP, hidden SSID
  • Move micro SD card to Raspberry Pi
  • Power on

Create image file (Micro SD card mode only)

  • Once started rAudio successfully
  • SSH to RPi
  • Reset for image
ssh root@<RPI IP>
bash <( wget -qO - https://github.com/rern/rOS/raw/main/reset.sh )
  • Shutdown
  • Move micro SD card to Linux
  • Create compressed image file
bash <( wget -qO - https://github.com/rern/rOS/raw/main/imagecreate.sh )

LED flashes - errors
Decode: https://support.pishop.ca/article/33-raspberry-pi-act-led-error-patterns

Fix - Error: Known host keys on SSH

sed -i "/IP_ADDRESS/ d" ~/.ssh/known_hosts

About

Raspberry Pi audio player

Resources

Stars

Watchers

Forks

Languages