Sunday, 7 July 2013

Disable power saving mode

In case you want to disable power saving mode on your RaspberryPI:

Add the following to /etc/rc.local

  /usr/bin/setterm -blank 0 -powerdown off

Saturday, 6 July 2013

Move OS to a USB HDD

General notes that worked for me

Unmount the device.
  sudo umount /dev/sda1

Delete existing partitions and create a new primary partition.
  sudo fdisk /dev/sda1

Format and check the device.
  sudo mkfs.ext4 /dev/sda1
  sudo e2fsck /dev/sda1

Mount and copy the OS from the SD card.
  sudo mount /dev/sda1 /media/hdd
  sudo dd if=/dev/root of=/dev/sda1 bs=4M

Delete and add the partion (with same settings as previous partitioning).
  sudo fdisk /dev/sda1

Resize the device
  sudo resize2fs /dev/sda1

Edit FSTAB on the device.
  sudo nano /media/hdd/etc/fstab

  proc            /proc           proc    defaults          0       0
  /dev/mmcblk0p1  /boot           vfat    defaults          0       2
  /dev/sda1       /               ext4    defaults,noatime  0       1

Change boot parameters on the SD card so that the USB HDD is used as main device for OS.
  sudo nano /boot/cmdline.txt

  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootfstype=ext4 elevator=deadline rootwait

Reboot :)
  sudo reboot


Reference: http://c-mobberley.com/wordpress/index.php/2013/04/13/moving-raspberry-pi-root-folders-from-sd-card-to-usb-hdd/

Install Raspian onto an SD card using a MAC

Open a terminal window and use the following commands:

  diskutil list
  diskutil unmountDisk /dev/disk2
  sudo dd bs=1m if=2013-05-25-wheezy-raspbian.img of=/dev/disk2

Note: replace "disk2" with the id of the SD card. If you are unsure, remove the card and use diskutil list, then insert the card and use the diskutil list command to see the additional device.