blob: ee6bea9b1d018c27e589721ca62949083f392fa2 [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 Silverman09c401f2014-02-08 12:12:31 -0800519. Configure partition automounting.
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.
Brian Silverman09c401f2014-02-08 12:12:31 -080059 Another thing to add is:
60 "/dev/mmcblk0p1 /boot/uboot msdos defaults 0 2"
61 This mounts the uboot partition. (mmcblk0 is the eMMC when there's
62 no uSD card present.)
Daniel Petti31268f72014-01-20 11:27:28 -08006310. Set up logging.
64 Fairly straightforward here. We want it to log to the uSD card, so:
65 `mkdir ~/tmp`
66 `mkdir /media/driver/sdcard/robot_logs`
Daniel Petti95b74892014-01-20 14:29:03 -080067 `ln -s /media/driver/sdcard/robot_logs ~/tmp/robot_logs`
Daniel Petti97abf962014-01-20 11:34:14 -08006811. Set the correct date.
69 `date` to check if date is correct.
70 `date -s <date string>` to set it if it isn't.
Brian Silverman09c401f2014-02-08 12:12:31 -08007112. Make it export UART1 on boot.
72 Add the following to /boot/uboot/uenv.txt:
73 "optargs=capemgr.enable_partno=BB-UART1"
7413. Download the code!
Daniel Petti31268f72014-01-20 11:27:28 -08007550. Clone the image to the rest of the disks.
Daniel Petti95b74892014-01-20 14:29:03 -080076 Boot up from a uSD card.
77 `dd if=/dev/mmcblk1 | gzip -c > BBB.img.gz`
78 You can then scp this image to your computer.
79 (Perhaps you want to give it a more descriptive name?)
80 Use this image to flash a new uSD card.