This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
computing:beaglebone [2018/05/18 07:31] – created oemb1905 | computing:beaglebone [2024/09/08 14:07] (current) – oemb1905 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ------------------------------------------- | ||
+ | * **beagleboneblack** | ||
+ | * **Jonathan Haack** | ||
+ | * **Haack' | ||
+ | * **netcmnd@jonathanhaack.com** | ||
- | |||
- | ------------------------------------------- | ||
- | #**Beagle Bone Black w/ Debian** | ||
------------------------------------------- | ------------------------------------------- | ||
- | To locate device if auto-mounted | + | ==Installing Debian on Beagle Boards== |
- | sudo dmesg | + | |
+ | Insert microsd on host workstation, | ||
+ | |||
+ | 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 | ||
| | ||
- | {{: | + | Edit logs and cron to limit writes |
+ | |||
+ | cd /var/log && rm lastlog && ln -s /dev/null lastlog | ||
+ | cd /etc/cron.daily && mv man-db man-db.disabled [if it exists] | ||
- | When working with serial connections such as the Beagle Bone Black, and otherwise, screen can be helpful. | + | To find latest writes |
- | ssh -p ### -t user@host.com screen -DRO | + | Verify /etc/fstab configuration, |
- | Using screen with usb to serial adapter | + | UUID=57e4a3f6-7951-40ae-ad25-b445959e1c30 |
+ | debugfs | ||
- | sudo 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 | ||
- | Some other common speeds are 9600, 57600, 38400, 19200 | + | / |
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Removing bloat update | ||
| | ||
+ | sudo systemctl stop cloud9.service cloud9.socket | ||
+ | sudo systemctl disable cloud9.service cloud9.socket | ||
+ | sudo rm -rf / | ||
+ | sudo systemctl daemon-reload | ||
+ | sudo systemctl stop bonescript-autorun.service bonescript.service bonescript.socket | ||
+ | sudo systemctl disable bonescript-autorun.service bonescript.service bonescript.socket | ||
+ | sudo rm -rf / | ||
+ | sudo systemctl daemon-reload | ||
+ | sudo apt remove -purge apache2* nginx* | ||
+ | cd /opt/ | ||
+ | rm -rf * | ||
+ | sudo apt autoremove | ||
+ | |||
+ | Debian Bullseye sources.list | ||
+ | |||
+ | deb http:// | ||
+ | #deb-src http:// | ||
+ | deb http:// | ||
+ | #deb-src http:// | ||
+ | deb http:// | ||
+ | #deb-src http:// | ||
+ | deb [arch=armhf] http:// | ||
+ | #deb-src [arch=armhf] http:// | ||
+ | |||
+ | Here is the pin layout for serial to USB adapters. | ||
+ | |||
+ | {{ : | ||
+ | --- // |