This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:beaglebone [2018/07/28 15:48] – 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' | ||
- | | + | |
- | 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: | ||
- | On a typical serial to USB adapter, and almost all others, the colors are white (receive), green (transmit), black (ground), red (5V power). | + | 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, prepare | ||
+ | |||
+ | 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. | ||
| | ||
- | | + | |
+ | |||
+ | Now, let's remove the unnecessary packages (as root) - but bear in mind that these may change in future releases: | ||
+ | |||
+ | for i in c9-core-installer udhcpd chromium-codecs-ffmpeg-extra connman lximage-qt lxmenu-data pcmanfm-qt qupzilla xserver-xorg-core " | ||
+ | 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] | ||
- | Once the Beagle Bone is set up, one can leverage the screen command with ssh to tunnel | + | To find latest writes |
- | ssh -p 222 -t user@host.com screen -DRO | + | Verify /etc/fstab configuration, |
+ | UUID=57e4a3f6-7951-40ae-ad25-b445959e1c30 | ||
+ | debugfs | ||
- | Some other common speeds | + | #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, etc.) |
+ | UUID=eb885f2f-28a4-49a6-99c9-3f8b0b7a871d /sdcard ext4 noatime,nofail, | ||
+ | |||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | 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. | ||
+ | |||
+ | {{ : | ||
+ | --- // |