Raspberry Pi Setup
Friday October 14th 2016, 6:13 am
Filed under: Raspberry Pi

1. Current lineup is:
* $20 for RPi A+ (1 x 700MHz, 256MB RAM)
* $40 for RPi 2B (4 x 900MHz, 1GB RAM).
They both have the same GPU, but the 2B is by far the best value because you can assign the GPU much more RAM. This guide is for a 2B with at least 8GB storage.

2. Basic RPi 2B kit with power supply, case, SD card, wifi dongle, and some cables can be had for $60-70. I used a Canakit. Generally cheaper than acquiring each accessory separately. Good for a fast first-time setup; if you need to, you can invest in better components later.

3. Some useful hardware accessories; a compatility list is maintained at …
* faster SD cards can greatly improve system performance.
* The image quality of the in-house PiCam camera accessory isn’t exceptional, but with a direct bus connection it’ll run faster than third-party USB cameras. It also comes in an infrared version.
* An HDMI dummy dongle fools the OS into thinking a monitor is connected, which can speed things up when running headless and sharing the main display.

4. NOOBS is the boot utility, Raspian is the OS. If your RPi didn’t ship with a preformatted SD card, you’ll need to install it yourself from … Default install settings are fine.

5. The first time you set up, you’ll need a keyboard, mouse, and monitor. (Well, strictly speaking the mouse is optional.)

6. First thing, run sudo rpi-update (firmware) and then sudo apt-get update/upgrade.

7. Then run raspi-config:
* Change the default password
* Enable ssh
* increase GPU memory to 1/4 of total (if working with graphics). You can go higher by editing the config file …
* Change hostname (don’t use an underscore, or you’ll have to fix the hostname by editing the config files … and … )
* Enable camera, if you have one.

8. Wifi will not autostart the first time. Add auto wlan0 to config … now it will try wifi at boot.

9. If you’d like to preload ssids to connect to, enter them into the config file …

10. Reboot and test your network connection and ssh.

11. Install vnc server. Most guides use tightvncserver, which lets multiple users connect to their own desktops but can’t share the main screen. For most cases x11vnc, which shares only the main screen and runs much faster, is a better choice;

12. Add lines … to config … so vnc will run on boot.

13. Reboot and test vnc.

14. To connect headless more easily, you can set a static IP. Or if you have access to your router, you can reserve one for the Pi’s ethernet or wifi MAC address.

15. Right now, no popular RPi VNC viewer will let you view OpenGL graphics–apps will run, but the window will be invisible to you. To work with OpenGL you’ll need a monitor connected.

OPTIONAL
16. Vnc without a firewall is extremely insecure; even if you keep nothing of value on the RPi, it could still be used to attack your network. So install ufw.

17. Before starting ufw, tell it to allow the ports you’ll be using–for example, 22 and 80. (But don’t allow the unencrypted VNC port, usually 5900 or 5901–we want to block that!) You can also tell uwf to allow all ports on a trusted local network.

18. Start ufw. If you get something wrong and lock yourself out, connect a keyboard, mouse, and monitor and check ufw status. If you get stuck you can always disable ufw; it’ll stay off until you enable it again.

19. Reboot and confirm that you’re asked for your user and pass when you start a VNC session over SSH.

20. Reboot once more and confirm that everything’s working. Now you can disconnect your keyboard, mouse, and monitor and run your RPi headless.

21. Hard part’s over. Next, add some software tools, for example:
* Btsync
* Gphoto
* ffmpeg
* VLC
* imagemagick
* PureData

22. Finally, set up dev environments for your favorite programming languages. The RPi comes with Python, but here are some more options:

* JavaScript:
Chromium
Node.js
Sublime Text

* Ruby

* C++:
openFrameworks
CodeBlocks

* Java:
Processing

Comments Off on Raspberry Pi Setup


Clone Your Windows Boot Drive
Friday October 14th 2016, 6:11 am
Filed under: Windows

I. Prepare the New Disk
1. Connect your new disk as a secondary disk.
2. In DiskManager, create a 200MB hidden NTFS partition (no drive letter) on your new disk.
3. Right-click the hidden partition and mark it Active.
4. Then create a regular NTFS partition (with drive letter) filling the rest of the space.

II. Clone Old Disk to New
5. Install DriveImage XML and choose Drive to Drive or Restore and clone your disk. Ignore warnings.

III. Make the New Disk Bootable
6. Follow these instructions to create a Windows recovery usb and use it to make the new drive bootable.

IV. Cleanup
11. Scan your new boot disk for errors.
12. If the cloned disk complains about not having a genuine version of Windows, open a prompt as Administrator and type:
SLMGR -REARM

Further Reading:
http://www.sevenforums.com/tutorials/104341-bootmgr-missing-fix.html
http://www.whatvwant.com/this-copy-of-windows-is-not-genuine-easy-solution/

Comments Off on Clone Your Windows Boot Drive