I'm using Ubuntu 18.04 for development on VM VirtualBox on windows 10 pro host
I've compacted the virtual hard drive previously by following the steps from here:
https://www.howtogeek.com/312883/how-to-shrink-a-virtualbox-virtual-machine-and-free-up-disk-space/
apart from the usual updates – I have not messed around with it, (recently just had installed the update for virtualbox gues additions)
previously, I only had one /dev/sda1 showing up – today I had three and when I attempt to run zerofree on any of those, I get that the device is mounted in rw
I have followed some instructions here as well to stop some services and try to remount- but it didnt work
it still says mount point is busy
I'm unsure if this happened because of a recent update ?
I also tested by uninstalling the vmware guest additions – but it didn't work
Suggestions ?
Best Answer
As mentioned in one of the comments, you have three partitions mounted (sda1, sda2 and sda3) and several temporary filesystems used for other purposes.
The manual for
zerofree
indicates that if you want to run this on a filesystem, then that filesystem must be either mounted readonly, or unmounted. When you are running Ubuntu, it is certain that the root partition/
, which is/dev/sda1
on your computer, is mounted thus the command will give a failure.If you want to run
zerofree
on/dev/sda1
you will need to either boot from an alternate device, uch as a bootable USB or ISO image, or perform a chroot to an alternate linux image. The link that you reference has specific instructions for you, on how to run this program on your root partition. Please re-read their instructions on how to use this program in Linux:zerofree
2019-01-22
The current version Ubuntu makes running
zerofree
difficult from the recovery session - in this case, it is easier to run this program from a live USB:zerofree
, if it is not already installed, with the commandsudo apt install zerofree