User Tools

Site Tools


modop:minipi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
modop:minipi [2020/11/25 17:00] rootmodop:minipi [2020/11/25 17:38] (current) root
Line 28: Line 28:
 # Disable HDMI on startup # Disable HDMI on startup
 echo "/usr/bin/tvservice -o" >> /etc/rc.local echo "/usr/bin/tvservice -o" >> /etc/rc.local
 +
 +# Disable unneccesary services
 +systemctl disable keyboard-setup.service
 +systemctl disable rpi-eeprom-update.service
 </code> </code>
  
 ===== Read only ===== ===== Read only =====
  
 +<code bash>
 +# Move some system files
 +cp /etc/resolv.conf /tmp/dhcpcd.resolv.conf
 +rm -rf /var/lib/dhcp /var/lib/dhcpcd5 /var/run /var/spool /var/lock /etc/resolv.conf
 +ln -s /tmp /var/lib/dhcp
 +ln -s /tmp /var/lib/dhcpcd5
 +ln -s /tmp /var/run
 +ln -s /tmp /var/spool
 +ln -s /tmp /var/lock
 +ln -s /tmp/dhcpcd.resolv.conf /etc/resolv.conf
 +
 +# Update dhcpcd5.service
 +sed -i 's/PIDFile=\/run\/dhcp/PIDFile=\/var\/run\/dhcp/' /etc/systemd/system/dhcpcd5.service 
 +
 +# Update the random-seed unit file
 +mv /var/lib/systemd/random-seed /tmp/random-seed 
 +ln -s /tmp/random-seed /var/lib/systemd/random-seed
 +sed -i '/^\[Service\]$/a ExecStartPre=/bin/echo "" >/tmp/random-seed' /lib/systemd/system/systemd-random-seed.service
 +
 +# Update fstab
 +grep '\/tmp' /etc/fstab &> /dev/null || echo "tmpfs           /tmp            tmpfs   nosuid,nodev               0" >> /etc/fstab
 +grep '\/var' /etc/fstab &> /dev/null || echo "tmpfs           /var/log        tmpfs   nosuid,nodev               0" >> /etc/fstab
 +grep '\/var\/tmp' /etc/fstab &> /dev/null || echo "tmpfs           /var/tmp        tmpfs   nosuid,nodev               0" >> /etc/fstab
 +
 +# Reload systemd units
 +systemctl daemon-reload
 +</code>
modop/minipi.1606320023.txt.gz · Last modified: 2020/11/25 17:00 by root

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki