1. Home
  2. System Administration
  3. Variphy OVA Administration
  4. Variphy OVA /boot Partition storage cleanup
  1. Home
  2. System Administration
  3. Server Management
  4. Variphy OVA /boot Partition storage cleanup
  1. Home
  2. Technology
  3. Linux
  4. Variphy OVA /boot Partition storage cleanup

Variphy OVA /boot Partition storage cleanup

Overview

The Variphy Linux platform deploys a /boot partition for the operating system which contains all the boot files, kernels, etc.

This partition can potentially get filled up to 100% capacity, while having no impact to the application at all.

Resolution

We have created a script that should help automatically resolve this issue. Since we are dealing with files that affect how (or whether) the VM initializes, we must be extremely cautious. Please use the following process when resolving /boot storage issues.

1. First, determine if /boot storage has been 100% utilized with the df -h /boot command:

Use% is 100% for the /boot file system, so we are likely in a situation where we cannot install new packages or run updates for the boot partition.

2. Take a VM snapshot. This is a very important step as it will provide a safety net if anything should go wrong when we run the script.

Worst case scenario is that the VM will no longer startup upon reboot. If this happens, you can revert to the snapshot.

3. Upload the embedded ‘cleanup-boot-partition.sh’ script file (cleanup-boot-parition.sh) through an SFTP client to the Variphy Linux directory /opt/variphy/scripts/ – Do Not Alter This File

Cleanup-boot-partition.sh Script File

Click on the above hypertext to download the script file

Check the directory to confirm file upload

4. Make the script executable with chmod +x /opt/variphy/scripts/cleanup-boot-partition.sh

5. Double check that you made a VM snapshot.

6. Run the script with sudo /opt/variphy/scripts/cleanup-boot-partition.sh

The script will make sure you want to continue. Type y or Y and enter to continue.

This will take a few minutes to run through all the system kernels and elements deemed necessary for removal.

7. At this point, /boot should no longer be 100% utilized: df -h /boot


8. At the end of the script, you may see Reboot recommended. This is probably due to the Linux kernel being updated (in this tutorial, Currently running kernel: 4.4.0-145 is older than Current Grub default kernel: 4.4.0-150). Reboot with ‘sudo reboot now’:

Once the VM starts up, you should be able ssh back into the VM.

Optional Steps (Recommended)

1. Assuming you have now ssh’ed back into the VM, let’s run updates and upgrade packages. Run sudo apt-get update to refresh the list of packages from the Internet.

2. Run sudo apt-get upgrade to upgrade any packages with updates.

Note that if you see something responds that a resource is temporarily unavailable, something might be running in the background. If that happens, just wait a minute or two and try again.

3. You might run into this screen, which is updating unattended-upgrades. If so, choose install the package maintainer’s version.

If you see this screen and select install the package maintainer’s version, then you will want to rerun sudo /opt/variphy/scripts/cleanup-boot-partition.sh after upgrades complete. This time there should be far less output.

4. The script may recommend we restart again, but after a final sudo reboot now, everything should be good to go.

If you have additional questions or would like assistance please submit a request to support@variphy.comPlease note that our normal support hours are Monday through Friday, 7:00 a.m. to 4:00 p.m. Pacific Time, excluding US holidays. After hours support may be arranged with advanced notice.

Updated on November 10, 2022

Was this article helpful?

Related Articles