This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:beaglebone [2018/05/18 08:10] – oemb1905 | computing:beaglebone [2024/09/08 14:07] (current) – 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' | ||
- | | + | |
+ | |||
+ | Once the device powers off, remove the microSD card or it will flash the eMMC again and again. | ||
+ | for shell access by editing your ssh config: | ||
+ | |||
+ | 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. | ||
- | Now that the image has been turned into an installer, you may put the microSD card into the Beagle Bone (without power). | + | vi / |
+ | < | ||
+ | auto eth0 | ||
+ | iface eth0 inet dhcp | ||
+ | <comment out any other paramaters besides loopback> | ||
- | If there is a fourth pin, usually red, do not use. | + | It is now time to strip the bb of the stock apps, etc. |
| | ||
- | | + | |
- | | + | |
+ | 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 /etc/hosts | ||
+ | vi / | ||
+ | vi / | ||
+ | |||
+ | 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. | ||
+ | |||
+ | {{ : | ||
+ | --- // |