237pages on
this wiki
Add New Page
Talk0 Share
Usage: [[mkFile]].exe [-s] [-r] [-k] [-m] [-g] filename filesize
        where filename is the name of the file to create
        filesize if the size of the file.
        -s means create a sparse file ( only supported on ntfs 5 or greater )
        -r means resize an existing file
        -k -m -g means the size is in KB, MB, or GB

For example:

mkFile.exe -s -g root_device 10

This will create a sparse file named root_device that is 10 GB in size. Since the file is sparse, it will actually only use a few bytes on the disk. If root_device already exists, mkFile.exe will fail.

mkFile.exe -s -r -g root_device 20

This will re-size the existing root_device file to 20 GB. if root_device doesn't already exist or if it is larger than 20 GB, mkFile will fail. The -s option will set the sparse flag on the file. All the new space created will be sparse. Note that you cannot resize a file to a smaller size - even if the newly allocated space is not written to.

mkFile works by using the Win32 API's Set File Pointer Ex and SetEndOfFile to create/re-size a file. Since it doesn't actually write any data to the file it is very fast - even when creating non-sparse files. Also, when re-sizing a file, there is no danger of overwriting your existing data.


~+Resizing your root_fs with this tool+~

It is possible to resize a root_fs with this, using the ExpandingRoot guide.

1. Shutdown your colinux instance

2. Make a copy of your root_fs - this will be the new larger version

3. Resize this with

mkFile.exe -s -r -g root_fs_new 20

replacing root_fs_new with your copies name, and 20 with the desired size in gigabytes of your new image.

4. Follow on from the fifth step in ExpandingRoot

MassTranslated on 25 Dec 2004.
MassTranslated on Sun Apr 23 17:36:31 UTC 2006

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki