Difference between revisions of "Ubuntu Server LTS"

From World Wide Wiegert Wiki - WWWW
Jump to: navigation, search
(Created page with "# How to disable cloud-init in Ubuntu ## Prevent start - Create an empty file to prevent the service from starting sudo touch /etc/cloud/cloud-init.disabled ## Uninstall - Disable all services (uncheck everything except "None"): sudo dpkg-reconfigure cloud-init - Uninstall the package and delete the folders sudo dpkg-reconfigure cloud-init sudo apt-get purge cloud-init sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/ - Restart the computer sud...")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
# How to disable cloud-init in Ubuntu
= RPi related stuff =
== 4G usb modem ==
qmicli -d /dev/cdc-wdm0 --wds-reset
qmicli --device=/dev/cdc-wdm0 --wds-start-network="apn=4g.tele2.se" --wds-follow-network  &
sleep 5 && systemctl restart systemd-networkd &
'''Reset USB'''
echo 0 | sudo tee /sys/bus/usb/devices/1-1/authorized
sleep 3
echo 1 | sudo tee /sys/bus/usb/devices/1-1/authorized


## Prevent start
== Bluetooth ==
sudo hciattach /dev/ttyAMA0 bcm43xx 921600 -  # TWO TIMES!! WHY? Better use the pi-bluetooth package


- Create an empty file to prevent the service from starting
apt install pi-bluetooth
systemctl enable hciuart.service
Manage:
hcitool dev
bluetoothctl
* https://simpleit.rocks/linux/shell/connect-to-bluetooth-from-cli/


sudo touch /etc/cloud/cloud-init.disabled
== How to disable cloud-init in Ubuntu ==
'''Prevent start'''
* Create an empty file to prevent the service from starting
sudo touch /etc/cloud/cloud-init.disabled


## Uninstall
'''Uninstall'''
* Disable all services (uncheck everything except "None"):
sudo dpkg-reconfigure cloud-init
* Uninstall the package and delete the folders
sudo dpkg-reconfigure cloud-init
sudo apt-get purge cloud-init
sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
* Restart the computer
sudo reboot


- Disable all services (uncheck everything except "None"):
'''Sources'''
 
* https://gist.github.com/zoilomora/f862f76335f5f53644a1b8e55fe98320
sudo dpkg-reconfigure cloud-init
* https://cloudinit.readthedocs.io/en/latest/topics/boot.html#generator
 
* https://www.blackmoreops.com/2019/04/19/remove-cloud-init-from-ubuntu/
- Uninstall the package and delete the folders
 
sudo dpkg-reconfigure cloud-init
sudo apt-get purge cloud-init
sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
 
- Restart the computer
 
sudo reboot
 
## Sources
- https://gist.github.com/zoilomora/f862f76335f5f53644a1b8e55fe98320
- https://cloudinit.readthedocs.io/en/latest/topics/boot.html#generator
- https://www.blackmoreops.com/2019/04/19/remove-cloud-init-from-ubuntu/

Latest revision as of 21:55, 5 July 2022

RPi related stuff

4G usb modem

qmicli -d /dev/cdc-wdm0 --wds-reset
qmicli --device=/dev/cdc-wdm0 --wds-start-network="apn=4g.tele2.se" --wds-follow-network  &
sleep 5 && systemctl restart systemd-networkd &

Reset USB

echo 0 | sudo tee /sys/bus/usb/devices/1-1/authorized
sleep 3
echo 1 | sudo tee /sys/bus/usb/devices/1-1/authorized

Bluetooth

sudo hciattach /dev/ttyAMA0 bcm43xx 921600 -   # TWO TIMES!! WHY? Better use the pi-bluetooth package
apt install pi-bluetooth
systemctl enable hciuart.service

Manage:

hcitool dev
bluetoothctl

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting
sudo touch /etc/cloud/cloud-init.disabled

Uninstall

  • Disable all services (uncheck everything except "None"):
sudo dpkg-reconfigure cloud-init
  • Uninstall the package and delete the folders
sudo dpkg-reconfigure cloud-init
sudo apt-get purge cloud-init
sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
  • Restart the computer
sudo reboot

Sources