Tuesday, March 3

Raspberry Pi's & Minibian Wheezy

Raspberry Pi
The Raspberry Pi is an inexpensive micro computer running on the strong arm processor set. Though I am waiting for my Raspberry Pi2s to arrive, I am using the older Raspberry Pi B model. 512mb of Ram, 700mhz processor.

Operating System
After testing many of the Linux distros I have decided to use a minimalist distro and add what I need to it, rather then removing "extras" that I don't need.

Tips, Tricks, and Links

  • Base Operating System
    • 2015-02-18-wheezy-minibian (SourceForge.net)
      • 167 MB download
      • 488 MB uncompressed IMG file
        Should fit on a single 512 MB SD card, though after trying a few I was unable to find a 512 MB SD card that was big enough. It fit quite nicely onto a 1 GB SD card.
      • 2 Partitions on SD Card
        1.  50 MB Fat16
          For Booting, and initial firmware
        2. 460 MB ext2
          Linux file system
  • Setup Steps
    1. Copy 2015-02-18.wheezy-minibian.img to SD Card
    2. Boot Raspberry Pi with SD Card
    3. Login
      • Username: root
      • Password: raspberry
    4. Shell Commands (Updating System)
      1. rm /etc/ssh/ssh_host_* && dpkg -reconfigure openssh-server
        Regenerates RSA/DSA keys for openSSH
      2. apt-get clean
        Removes unused files, temporarily frees up file space
      3. apt-get update
        Updates the apt-get stored library files to latest versions
      4. apt-get install nano sudo rpi-update raspi-config usbutils dosfstools -y
        Installs nano, sudo, rpi-update, raspi-config, usbutils, dosfstools libraries
      5. apt-get clean
        Cleans up files
      6. rpi-update && reboot
        Updates the Raspberry Pi's firmware, and bios files and reboots the system
      7. apt-get upgrade -y
        Upgrades current version of apt-get
      8. apt-get dist-upgrade -y
        Upgrades any necessary files from the Distro
      9. apt-get install firmware-linux-nonfree -y
        Installs Wireless Firmware if necessary
    5. Shell Commands (Resize SD Card to fit)
      1. raspi-config
      2. Select Advanced Options
      3. Select Expand Filesystem
        After selecting this, it will ask you to reboot, confirm, and after a reboot the Linux will be using the complete size of the SD Card it is on
    6. Shell Commands (Adding Software)
      1. apt-get install mc tmux samba nodejs -y
        1. mc "Midnight Commander"
          A Norton Commander style clone file manager for Linux
        2. tmux "Terminal Multiplexor"
          Lets you switch easily between serveral programs in one terminal.
        3. samba ""
          Allows your Raspberry Pi be visible on a Windows network
        4. nodejs "NodeJS"
    7. Shell Commands (Adding Users)
      1. adduser superuser
        Creating a seperate root user
      2. usermod -G sudo superuser
        Adds the user "superuser" to the sudo group
  • Reserve Extra Memory for Linux Kernel
    • Modify the file /etc/sysctl.conf
      Add the following line
    • vm.min_free_kbytes=8192
    • vm.min_free_kbytes=12288
  • Useful Linux Commands
    • free -m
      Displays RAM usage
    • df -h
      Displays filesystem stats

Other Links to check out
  • http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html
  • http://elinux.org/RPi_Debian_Auto_Login
  • http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html
  • http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html


Post a Comment