duncanr at optimation.com.au
Mon Mar 3 10:26:56 EST 2003
Perhaps you could use a loopback mount to do this, if you have 1G or so free:
- tar up the filesystem you wish to export (tar -l to avoid mounts)
- Note the size of the tar file. This will be more than the size of your target
- Create a file full of zeroes of the above-noted size (dd from /dev/zero)
- mke2fs that file
- loopback-mount that file
- cd to the loopback mount
- restore your tar
The file should now be the image you want.
Cheers ... Duncan.
On Sun, Mar 02, 2003 at 05:52:45PM +1100, Andrew Donehue wrote:
> Hi All!
> I am after a program that will go through an ext2 based
> filesystem and look for any deleted files, and actually zero out the
> contents of that deleted file on the hdd..... The reason for this is.....
> I spent about 10hrs setting up a server the way I like it, I seem to be
> setting up 4+ of these a month, so instead of wasting 10hrs each time, I
> disk dumped the hdd (everything - the hardware is always the same) - ran
> it through gzip, and sent it to a file.... The server install is only
> about 400MB in size, but I stuffed up in the initial one, and had to
> delete some files..... problem is that dd only looks at bits, it doesn't
> care that the file was deleted.... it still compresses the contents of
> the file... (that is left over after a normal delete... only a marker to
> the file is deleted...) - and my image is about 4GB in size!
> I should be able to fit the image onto a CD (as the OS install is
> around 400MB....) - the remaining is the compressed files that I
> deleted.... (unrequired junk)
> I have seen programs around that do deletes and replace with random
> data, but I was after one that went over the old space and zero'ed out
> any spare space.... Any suggestions?
More information about the linux