How to increase space on a Ubuntu boot partition

When trying to install programs on my Ubuntu server but the server is not allowing me to do that because the boot partition ‘/dev/sda1’ is full. 100% used of 464M

/dev/sda1       236M   236M  0M  100% /boot

How can I increase the space on that partition?

By default Ubuntu has a small /boot partition. When you have auto updates enabled this can cause some issues as newer kernels are not automatically purged.

You can add the following to your crontab to run every Sunday night at 11:30PM to clean out old kernels. You can do so by running crontab -e as root and adding the following line at the bottom of that file.


30 23 * * 6 apt-get autoremove

You will also want to reboot every so often so newer kernels are being used and newer kernels are not causing the issues. I would suggest rebooting at your earliest convenience and running


# apt-get autoremove 

to load the newest kernel and delete the older kernels already installed on your server.

However, once rebooted and the autoremove command is done more disk space will be free.

Info

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            990M  4.0K  990M   1% /dev
tmpfs           201M  716K  200M   1% /run
/dev/dm-0        15G  1.9G   12G  14% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none           1001M     0 1001M   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/sda1       236M   72M  152M  32% /boot

$ du -shcx /boot/*
1.2M /boot/abi-3.16.0-30-generic
1.2M /boot/abi-3.16.0-77-generic
169K /boot/config-3.16.0-30-generic
169K /boot/config-3.16.0-77-generic
6.7M /boot/grub
21M /boot/initrd.img-3.16.0-30-generic
21M /boot/initrd.img-3.16.0-77-generic
du: cannot read directory ‘/boot/lost+found’: Permission denied
12K /boot/lost+found
174K /boot/memtest86+.bin
175K /boot/memtest86+.elf
176K /boot/memtest86+_multiboot.bin
3.4M /boot/System.map-3.16.0-30-generic
3.4M /boot/System.map-3.16.0-77-generic
6.1M /boot/vmlinuz-3.16.0-30-generic
6.2M /boot/vmlinuz-3.16.0-77-generic
70M total

	

/var/cpanel/secdatadir/ip.pag file massive

Source: https://forums.cpanel.net/threads/var-cpanel-secdatadir-ip-pag-file-massive.565591/

This can add to server load and slow loading times as it gets scanned every page load.

You also might want to disable mod_unique_id for modsec too. It will prevent that file from growing and being scanned.

Clear the file
yum install ea-modsec-sdbm-util
Should also help keep that file in check if he chooses not to disable it

TLS 1.2 On Windows 2008

Window 2008 does support TLS 1.2. There is a free program that will help with the installation.

https://www.nartac.com/Products/IISCrypto

Running the program and saving should ensure the proper TLS setting is running on your server. A reboot will be required after applying these settings to your server.

Find and Start/Stop VM on ESXI

How to find and Start/Stop VM on ESXI.
SSH to the ESXI server.

# esxcli vm process list
# esxcli vm process list
WebHost
   World ID: 35689
   Process ID: 0
   VMX Cartel ID: 35686
   UUID: 56 4d 72 7c da 4c 82 f1-9f 10 9c e3 d6 7d a4 9d
   Display Name: WebHost
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/WebHost/WebHost.vmx

Windows
   World ID: 4150543
   Process ID: 0
   VMX Cartel ID: 4150542
   UUID: 56 4d 49 5f 12 7e 26 96-d8 31 37 05 21 64 5d 46
   Display Name: Windows
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/Windows/Windows.vmx

Monitor
   World ID: 2487010
   Process ID: 0
   VMX Cartel ID: 2487009
   UUID: 56 4d 99 de b0 13 a1 76-bd 2d 95 8a be 25 35 39
   Display Name: Monitor
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/Monitor/Monitor.vmx

Mail
   World ID: 2487029
   Process ID: 0
   VMX Cartel ID: 2487028
   UUID: 56 4d 4f 88 c8 bf a6 37-b5 5b 96 6f b4 23 c5 fb
   Display Name: Mail
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/Mail/Mail.vmx

Stop a VM:

# esxcli vm process kill -t soft --world-id 4150543

Review to verify the VM is off:

 # esxcli vm process list
WebHost
   World ID: 35689
   Process ID: 0
   VMX Cartel ID: 35686
   UUID: 56 4d 72 7c da 4c 82 f1-9f 10 9c e3 d6 7d a4 9d
   Display Name: WebHost
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/WebHost/WebHost.vmx

Monitor
   World ID: 2487010
   Process ID: 0
   VMX Cartel ID: 2487009
   UUID: 56 4d 99 de b0 13 a1 76-bd 2d 95 8a be 25 35 39
   Display Name: Monitor
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/Monitor/Monitor.vmx

Mail
   World ID: 2487029
   Process ID: 0
   VMX Cartel ID: 2487028
   UUID: 56 4d 4f 88 c8 bf a6 37-b5 5b 96 6f b4 23 c5 fb
   Display Name: Mail
   Config File: /vmfs/volumes/54c1dfef-00e03f4b-784e-6805ca0a3085/Mail/Mail.vmx

How to start a Guest VM from Command line:

Get a list of VMs on a host using the command:


# vim-cmd vmsvc/getallvms 
Vmid    Name                   File                       Guest OS          Version   Annotation
32     Monitor   [datastore1] Monitor/Monitor.vmx   centos64Guest           vmx-08
44     Mail      [datastore1] Mail/Mail.vmx         ubuntu64Guest           vmx-08
58     WebHost   [datastore1] WebHost/WebHost.vmx   centos64Guest           vmx-08
61     Plesk     [datastore1] Plesk/Plesk.vmx       centos64Guest           vmx-08
62     Windows   [datastore1] Windows/Windows.vmx   windows8Server64Guest   vmx-08

NOTE: The important fields will be the the VMID of your desired VM

Double check the power state of the VM:


vim-cmd vmsvc/power.getstate <vmid>

# vim-cmd vmsvc/power.getstate 62
Retrieved runtime info
Powered off

Start


vim-cmd vmsvc/power.on <vmid>
# vim-cmd vmsvc/power.on 62
Powering on VM:

Log in with an SSH private key on Linux

Using a text editor, create a file in which to store your private key. This example uses the file private_key.txt.
To edit the file in nano, type the following command


# nano deployment_key.txt

Paste the private key into the file. Be sure to include the BEGIN and END lines.

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAx9ODcgSZFhPnZmW/VGWy/bXLKFBhOoTP9k4dhcJq17ZuG9KB
...
-----END RSA PRIVATE KEY-----

Run the following command to change the file permissions to 600 to secure the key. You can also set them to 400. This step is required:


# chmod 600 deployment_key.txt

Use the key to log in to the SSH client as shown in the following example, which loads the key in file private_key.txt, and logs in as user demo,to IP 192.237.248.66:


# ssh -i private_key.txt demo@192.237.248.66

When the prompt to confirm the connection request is displayed, type yes and then press Enter.

If your SSH key requires a password, enter it when prompted to complete the connection.