User talk:Martin

From SingletonMillerWiki
Revision as of 10:46, 9 June 2013 by Martin (Talk | contribs) (rebuild from a backup)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

vanilla pi build server

This creates a self updating and backing build server, writing backup to a network share. The purpose is to leave this pi running and to create the most up to date backups.

  1. burn vanilla image to disk
    dd bs=4M if=~/Downloads/2013-05-25-wheezy-raspbian.img of=/dev/sdc
  2. mount the boot partition, edit config.txt, enable HDMItoVGA cable HDMItoVGASetup
  3. plug into Pi, added monitor and keyboard to pi
  4. do first boot setup, expand flash, enable camera, <advanced> enable SSH, change hostname and set the correct timezone
  5. reboot
  6. ssh into the Pi
    1. disable screen blanking / timeout Disable_Screen_Blanking
    2. edit /etc/hosts to manually added other network addresses
    3. install LDAP client and setup LDAP_Client_Setup
    4. test LDAP authentication
    5. add LDAP user to sudo
    6. install autofs Accessing_Network_Shares
    7. automount LDAP shares Accessing_Network_Shares#Autofs_for_LDAP
  7. give at least one LDAP user sudo privs AddingUsers:RPi#Raspian
  8. remove 'pi' user AddingUsers:RPi#Consider_removing_Pi_altogether
  9. install autoback script Auto_Update_Backup
  10. test camera Camera_Module_Setup
  11. install codec keys (can have more than on keys so file)

rebuild from a backup

Instructions to rebuild a pi or clone a new pi from a previous build server backup

  1. mount the backup location
  2. cd ~
  3. unzip backup image
     cp /media/nfsshares/Public/RPi_autobuild_backup/backup_20130608_225618.img.tar.gz ~/Downloads 
    tar -zxvf ~/Downloads/backup_rpiv102-20130609_005114.tar.gz --strip 4
  4. burn the image
    sudo dd bs=4M if=~/Downloads/backup_20130608_225618.img of=/dev/<sdc>
  5. boot the SD in the new Pi
  6. update ssh keys if needed
    ssh-keygen -f "/home/jack/.ssh/known_hosts" -R 192.168.0.20
  7. ssh to the new pi as an LDAP user with sudo privs, update the ssh keys
  8. use raspi-config to use whole SD card and (advanced) change hostname
  9. remove autobackup script in /etc/cron.daily.
    sudo rm /etc/cron.daily/AutoUpdateBackup