This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
computing:beaglebone [2018/05/18 08:10] – oemb1905 | computing:beaglebone [2019/04/19 19:02] – oemb1905 | ||
---|---|---|---|
Line 6: | Line 6: | ||
------------------------------------------- | ------------------------------------------- | ||
+ | ==Installing Debian on Beagle Boards== | ||
- | To locate device if auto-mounted | + | Insert microsd on host workstation, |
- | sudo dmesg | + | |
+ | sudo dmesg | ||
umount / | umount / | ||
- | Optional: use fdisk to remove | + | Write the debian image to the SD Card using dd command |
sudo dd of=/ | sudo dd of=/ | ||
- | After this, pull out SD card. Plug back in. Locate where it mounted, prepare to edit file to allow it to run the installer upon boot. This is located in boot/ | + | Pull out the SD card and then put back in so that it mounts read/write and then edit: |
- | cmdline=init=/ | + | |
+ | | ||
- | Get out of the directory asap. | + | Use screen and a serial usb adapter to oversee |
+ | The adapter' | ||
- | | + | |
- | Now that the image has been turned into an installer, you may put the microSD card into the Beagle Bone (without power). | + | Once the device powers off, remove |
+ | for shell access by editing your ssh config: | ||
- | If there is a fourth pin, usually red, do not use. | + | vi / |
+ | < | ||
+ | |||
+ | Add a password for root, then test the shell access, add the public keysto the authorized_keys file | ||
+ | |||
+ | ssh root@xx.xx.xx.xx | ||
+ | ssh-copy-id root@xx.xx.xx.xx | ||
+ | vi / | ||
+ | |||
+ | ==Clean Up Post-Install== | ||
+ | |||
+ | Install deborphan in order to remove hanging dependencies from apps that we will later strip. | ||
+ | |||
+ | apt-get install screen deborphan ntp | ||
+ | |||
+ | The new version has an ntp server, but retaining here in case setting up legacy system. | ||
+ | |||
+ | vi / | ||
+ | < | ||
+ | auto eth0 | ||
+ | iface eth0 inet dhcp | ||
+ | <comment out any other paramaters besides loopback> | ||
+ | |||
+ | It is now time to strip the bb of the stock apps, etc. If you prefer to use ssh over serial, then use screen as follows: | ||
| | ||
- | | + | |
- | | + | |
+ | Now, let's remove the unnecessary packages (as root) - but bear in mind that these may change in future releases: | ||
+ | |||
+ | | ||
+ | apt remove --purge c9-core-installer bonescript bone101 | ||
+ | |||
+ | Sometimes ssh hangs at this stage, so if so, use serial. | ||
+ | |||
+ | apt-get --purge autoremove | ||
+ | apt-get --purge remove `deborphan` | ||
+ | |||
+ | Run this last command a few times until everything is removed. | ||
+ | |||
+ | apt-get dist-upgrade | ||
+ | apt-get clean | ||
+ | |||
+ | Change hostname, remove the splash/motd | ||
+ | |||
+ | vi / | ||
+ | vi / | ||
+ | vi /etc/issue.net to remove the goofy ssh splash | ||
| | ||
- | {{:computing:b1.jpg?400|}} | + | Edit logs and cron to limit writes |
+ | |||
+ | cd /var/log && rm lastlog && ln -s /dev/null lastlog | ||
+ | cd / | ||
+ | |||
+ | To find latest writes to disk: find / -mount -newermt 14:44:00 [to see what logs are post-updates, | ||
+ | |||
+ | Verify /etc/fstab configuration, | ||
- | When working with serial connections such as the Beagle Bone Black, and otherwise, screen can be helpful. | + | UUID=57e4a3f6-7951-40ae-ad25-b445959e1c30 |
+ | debugfs | ||
- | ssh -p ### -t user@host.com screen | + | #If we use an external sdcard, we are less concerned with re-writes, so enable the logs on the sdcard (create directories for each location below, mountpoints, |
+ | UUID=eb885f2f-28a4-49a6-99c9-3f8b0b7a871d /sdcard ext4 noatime, | ||
- | Using screen with usb to serial adapter | + | / |
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
- | sudo screen | + | This tutorial is a designated " |
- | Some other common speeds are 9600, 57600, 38400, 19200 | + | --- // |
| | ||