blob: 079a327952e2260bc78babada4d44b0a7e54241e [file] [log] [blame]
Daniel Petti31268f72014-01-20 11:27:28 -08001This file contains notes on setting up a new BBB image.
2Doing it right requires knowing what you're doing as a Debian sysadmin, so the
3main goal of this file is to avoid forgetting anything.
4
5Daniel last updated this on 2014-01-20 with Debian Wheezy.
6
71. Install Debian stable.
8 Follow the instructions here:
9 http://blogs.bu.edu/mhirsch/2013/11/install-debian-7-to-emmc-internal-flash-drive-of-beaglebone-black/
10 Create a "driver" user.
112. Install aos.conf and starter.
12 I just changed aos.conf to give driver permissions instead of the group.
133. Install and configure exim4.
Daniel Petti95b74892014-01-20 14:29:03 -080014 TODO (daniel): We might not need this.
Daniel Petti31268f72014-01-20 11:27:28 -080015 `apt-get install exim4-config`
16 `dpkg-reconfigure exim4-config` and select the option for making minimal
17 DNS queries (it also says some junk about modems).
184. Configure the network.
19 Edit /etc/network/interfaces to give it the right static IP address.
20 Set up eth1 like the default eth0 in case the NIC gets assigned that (see
21 #8 below). That shouldn't be a problem any more, but it's probably good
22 to be on the safe side because it can be a pain to find a screen to fix
23 it otherwise.
245. Install stuff.
25 This includes the realtime kernel.
26 Note that at the time of this writing, you can't apt-get install the
27 realtime kernel packages directly on the beaglebone.
28 You must download them on your computer, copy them to the beaglebone,
29 and install them using dpkg -i.
30 <http://robotics.mvla.net/files/frc971/packages/>.
31 After you do this, you will still need to modify the zImage
32 symlink to point to the right kernel.
33 `rm /boot/zImage`
34 `ln -s /boot/vmlinuz-3.8.13.9-rt20+ /boot/zImage`
35 After you reboot, you should be running the rt kernel.
36 (Check it with `uname -r`.)
37 Besides the realtime kernel packages, you'll figure everything else out
38 as you start trying to run stuff.
396. Make SSH logins faster.
40 Add the line "UseDNS no" to /etc/ssh/sshd_config.
417. Make it so that the programming team can log in without passwords.
42 Everybody will have to run `ssh-copy-id -i ~/.ssh/id_rsa.pub BBB` (see
43 <http://www.debian-administration.org/articles/152> for details).
448. Make udev stop being annoying and naming NICs eth1.
45 udev wants to remember the ethernet NIC from each device and name the one
46 in a new BBB eth1, which breaks stuff. If that happens, removing
47 /etc/udev/rules.d/70-persistent-net.rules will make it autogenerate a
48 new one and fix it.
49 To prevent this problem from happening in the first place, follow the
50 directions in 10-net-eth0.rules.
519. Make it automount the uSD card.
Daniel Petti95b74892014-01-20 14:29:03 -080052 Open /etc/fstab on the bbb and remove the last two lines, which the
53 comments indicate mount both partitions on the uSD card.
54 Replace them with this line:
55 "/dev/mmcblk0p2 /media/driver/sdcard ext4 defaults,nobootwait 0 0"
Daniel Petti31268f72014-01-20 11:27:28 -080056 Obviously, replace mmcblk0p2 with the actual handle for the partition
57 on your uSD card that you want to mount, and make sure that
58 /media/driver/sdcard exists.
Daniel Petti31268f72014-01-20 11:27:28 -08005910. Set up logging.
60 Fairly straightforward here. We want it to log to the uSD card, so:
61 `mkdir ~/tmp`
62 `mkdir /media/driver/sdcard/robot_logs`
Daniel Petti95b74892014-01-20 14:29:03 -080063 `ln -s /media/driver/sdcard/robot_logs ~/tmp/robot_logs`
Daniel Petti97abf962014-01-20 11:34:14 -08006411. Set the correct date.
65 `date` to check if date is correct.
66 `date -s <date string>` to set it if it isn't.
Daniel Petti31268f72014-01-20 11:27:28 -08006711. Download the code!
6850. Clone the image to the rest of the disks.
Daniel Petti95b74892014-01-20 14:29:03 -080069 Boot up from a uSD card.
70 `dd if=/dev/mmcblk1 | gzip -c > BBB.img.gz`
71 You can then scp this image to your computer.
72 (Perhaps you want to give it a more descriptive name?)
73 Use this image to flash a new uSD card.