blob: 1adaccde5070693e4caf332e5caddc1953d15b9b [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.
Brian Silverman15acbc92014-02-08 13:25:04 -0800519. Set up /etc/fstab sanely.
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.
Brian Silverman15acbc92014-02-08 13:25:04 -080054 Because the uSD card shows up as /dev/mmcblk0 and pushes the internal emmc
55 to /dev/mmcblk1 when it's plugged in, using those names for the two of them
56 doesn't work very well. Instead, we use /dev/disk/by-path.
57 Add "/dev/disk/by-path/platform-mmc.14-part1 /boot/uboot msdos defaults 0 2"
58 to mount the uboot partition.
59 Also add
60 "/dev/disk/by-path/platform-mmc.5-part1 /home/driver/tmp/robot_logs ext4 defaults,noatime,data=writeback 0 0"
61 to mount the uSD card in the right place for the logs to go to it.
Daniel Petti31268f72014-01-20 11:27:28 -08006210. Set up logging.
63 Fairly straightforward here. We want it to log to the uSD card, so:
64 `mkdir ~/tmp`
65 `mkdir /media/driver/sdcard/robot_logs`
Daniel Petti95b74892014-01-20 14:29:03 -080066 `ln -s /media/driver/sdcard/robot_logs ~/tmp/robot_logs`
Daniel Petti97abf962014-01-20 11:34:14 -08006711. Set the correct date.
68 `date` to check if date is correct.
69 `date -s <date string>` to set it if it isn't.
Brian Silverman0b882522014-02-16 15:47:34 -08007012. Fix the locale setup for SSHing in.
Brian Silverman15acbc92014-02-08 13:25:04 -080071 `dpkg-reconfigure locales`, leave it with "en_US.UTF-8" only being
72 enabled, and then select "None" instead of that for the default in
73 the second screen.
7430. Download the code!
7550. Clone the image to the rest of the BBBs.
Daniel Petti95b74892014-01-20 14:29:03 -080076 Boot up from a uSD card.
77 `dd if=/dev/mmcblk1 | gzip -c > BBB.img.gz`
Brian Silverman15acbc92014-02-08 13:25:04 -080078 You can then copy this image to your computer.
79 Use this image to flash other uSD cards and/or BBBs.