244
OK. We can mount such file systems, but how are they constructed in the
first place? This, of course requires a *nix environment. The tools are dd and
losetup, and the process goes something like this:
First it is necessary to create an empty file of the desired size. This is done
with dd and the zero device in a command like:
dd if=/dev/zero of=/../image.file bs=1k count=100000
This will create a file with 100 MB of space. Note that the file size is equivalent
to the partition size when creating partitions on a block device like the hard
disk. This file will thus hold a file system that can reach 100 MB in size before
 device full  errors occur.
Before a file system can be created on this image file and mounted, it needs
to be made to look like a block device. This is done with the losetup program
in the following fashion:
losetup /dev/loop0 /../image.file
There are 8 loop devices to choose from, so you may need to check to see
if a particular device is already in use. losetup /dev/loopN, where N ranges
between 0 and 7, will return the status of the Nth loop device if it is mounted
and will return an error message if it is not.
Now that /dev/loop0 is a legitimate block device, mke2fs (or any of the other
file system creation utilities) can be used to create a file system on the looped
image file with a command like:
mke2fs  c /dev/loop() 100000
The  c option checks the device for bad blocks and the value on the end
specifies how many blocks are on the file system. These two options can
be left off the command line and results will be seen faster, but there is no
guarantee that the resultant file system will be useful. Take the time to check
for bad blocks. It is time you will not spend looking for the cause of problems






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

affordable web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved