Last active
December 18, 2015 00:09
-
-
Save guumaster/5694322 to your computer and use it in GitHub Desktop.
Reduce VirtualBox VDI image size.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install zerofree program: | |
sudo apt-get install zerofree | |
2. Reboot Ubuntu. | |
3. Press <Shift> to enter grub menu. | |
4. From grub menu select "recovery mode". | |
5. Select "root" from Recovery Menu. | |
6. Check to see disk names: | |
df | |
7. Mount the disk as read only: | |
mount -n -o remount,ro -t ext2 /dev/sda1 / | |
8. Make zeros: | |
zerofree /dev/sda1 | |
9. Shutdown Ubuntu: | |
halt | |
10. From Windows host execute: | |
"VirtualBox\VBoxManage" modifyhd <disk_name>.vdi compact | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment