User Tools

Site Tools


scraps


Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scraps [2024/01/21 19:37] – [Disable power button shutdown] adminscraps [2025/03/13 13:08] (current) millerjs
Line 51: Line 51:
 </code> </code>
  
-===== Quick Pi ID =====+===== cycle systemd logs ===== 
 +<code>sudo journalctl --rotate ; sudo journalctl --vacuum-time=1s</code> 
 + 
 +==== show systemd logs from boot ==== 
 +<code>sudo journalctl -b</code> 
 + 
 +===== Raspberry Pi ===== 
 +==== Quick Pi ID ====
  
 Easy way to get a quick visual indicator to ID a Pi you're remoted into: Easy way to get a quick visual indicator to ID a Pi you're remoted into:
Line 69: Line 76:
 </code> </code>
  
-===== Raspberry Pi Heartbeat ===== +==== Heartbeat LED ===
 set in config.txt set in config.txt
  
Line 78: Line 84:
 </code> </code>
  
 +==== Grow partition on first boot ====
 +Add to the end of /boot/cmdline.txt
 +
 +<code>
 +quiet init=/usr/lib/raspi-config/init_resize.sh
 +</code>
 ===== chronyc tracking ===== ===== chronyc tracking =====
  
Line 206: Line 218:
 allow allow
 cmdallow cmdallow
 +</code>
 +
 +===== Set NIC to promiscuous mode at boot =====
 +Using systemd:
 +
 +`/etc/systemd/system/promisc-eth0.service`
 +
 +<code>
 +[Unit]
 +Description=Control promiscuous mode for interface eth0
 +After=network.target
 +
 +[Service]
 +Type=oneshot
 +ExecStart=/usr/bin/ip link set eth0 promisc on
 +ExecStop=/usr/bin/ip link set eth0 promisc off
 +RemainAfterExit=yes
 +
 +[Install]
 +WantedBy=multi-user.target
 +</code>
 +
 +===== Proxmox =====
 +==== re-number VM ====
 +
 +1) shut down VM
 +2) rename the storage
 +<code>zfs rename pool1/vms/vm-112-disk-0 pool1/vms/vm-1001-disk-0</code>
 +3) rename the configuration file
 +<code>
 +export vgNAME=vg-images newVMID=173 oldVMID=175 ;  \
 +sed -i "s/$oldVMID/$newVMID/g" /etc/pve/qemu-server/$oldVMID.conf; mv /etc/pve/qemu-server/$oldVMID.conf /etc/pve/qemu-server/$newVMID.conf; \
 +unset vgNAME newVMID oldVMID;
 </code> </code>
scraps.1705865842.txt.gz · Last modified: 2024/11/14 02:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki