View Full Version : [ubuntu] Zero out free space for Virtual PC 7
johannes2510
September 21st, 2008, 12:41 PM
Hi!
First sorry for my english...
I have installed Ubuntu 7.10 on a G5 dual virtualized with Virtual PC 7 (and run well but slow). Now in the virtual HD I have some free space and according with the manual of VP I can recover that space, with a tool of VP, but I need first to "zero out" the free space. I have serch for but I have not find a solution.
Any ideas?
Thanks in advance.
johannes2510
September 22nd, 2008, 05:23 PM
I have found this:
http://www.linuxsecurity.com/content/view/117638/49/
"To eliminate the traces of old removed files, one might want to wipe the empty space. The simple method is to use a standard Linux "dd" utility. To wipe the empty space on /home partition use:
dd if=/dev/zero of=/home/bigfile
sync
rm /home/bigfile
sync
I have no try... It's safe?
cyberdork33
September 22nd, 2008, 08:32 PM
I have found this:
http://www.linuxsecurity.com/content/view/117638/49/
"To eliminate the traces of old removed files, one might want to wipe the empty space. The simple method is to use a standard Linux "dd" utility. To wipe the empty space on /home partition use:
dd if=/dev/zero of=/home/bigfile
sync
rm /home/bigfile
sync
I have no try... It's safe?
it should be safe, but I am not sure if you will get any closer to your desired outcome. All that does is create a big file full of zeros on your virtual hard drive, then you delete it.
What exactly are you trying to accomplish? I don't think I understand the problem...
johannes2510
September 23rd, 2008, 02:33 AM
What exactly are you trying to accomplish? I don't think I understand the problem...
Thanks for answer!
I want shrink the Ubuntu virtual disk for recover free space from virtual machine to Mac HD with a tool of Virtual PC, but according with Virtual PC manual I need first zero out the free space and I don't know how do that.
tiresia
September 23rd, 2008, 04:17 AM
I think 'dd' should work quite good for you. You could use also 'shred'
I found a Link for you, just to get an idea how this utilities work
http://www.gamedev.net/community/forums/topic.asp?topic_id=507595&whichpage=1
Anyway there is another one, that seems to be thought right for you purpose 'zerotools'
http://koltsoff.com/pub/zerotools/
I never tried it!
Anyway you can try all of these. Just make a backup of your disk image. If it is in your 'Documents' make just a copy of it :) - Buona fortuna!
johannes2510
September 23rd, 2008, 04:47 AM
Anyway you can try all of these. Just make a backup of your disk image. If it is in your 'Documents' make just a copy of it :) - Buona fortuna!
Danke! :)
For the links but I will try with dd.
For backups I have duplicate the virtual hd so don't worry.
I will tell you the result....
Ok, report:
run dd seems fine. Virtual hd grow from 4 gig to 9....
run virtual pc shrink tool and the hd still at 9 gig.
Restore hd from backup.
Ideas?
cyberdork33
September 23rd, 2008, 08:27 AM
Danke! :)
For the links but I will try with dd.
For backups I have duplicate the virtual hd so don't worry.
I will tell you the result....
Ok, report:
run dd seems fine. Virtual hd grow from 4 gig to 9....
run virtual pc shrink tool and the hd still at 9 gig.
Restore hd from backup.
Ideas?
I think you should try the other posted tools. That dd command will create and file and that is not the same as zeroing the disk...
You also might check in the virtualization forum to see if there is something there that can help you.
johannes2510
September 23rd, 2008, 01:11 PM
http://www.gamedev.net/community/forums/topic.asp?topic_id=507595&whichpage=1
Anyway there is another one, that seems to be thought right for you purpose 'zerotools'
http://koltsoff.com/pub/zerotools/
I never tried it!
Seems too hard for me....
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.