Making a RAM disk larger than 8 Mbytes

modified: 29 Jun 2006

[Minix 3 logo]
For MINIX 3 go to http://www.minix3.org. (Minix 3 released Oct 2005)

Making a RAM disk larger than 8 Mbytes

You can set a boot parameter to have Minix create a RAM disk larger than 8 Mbytes, and if you don't copy the root file system to the RAM disk you can then use mkfs to make a file system that uses all the RAM you have reserved. But if you try to copy from a standard floppy disk to a large RAM disk, you will find that only 8 Mbytes will actually be used. The reason is that the file system you copy from the floppy disk has only one block, 1024 bytes or 8192 bits, for its zone bitmap. The solution to the 8MB RAM disk limit is to enlarge the zone bitmap on the floppy disk by supplying an appropriate option to the mkfs program.

Here is Kees Bot's explanation of how to do it:

If you want to create a file system on a floppy that has many bitmap blocks then this should work:

        mkfs -t /dev/fd0 65535
        de -w /dev/fd0
        (Type PageDown, arrow down to reach the V1 or V2 "number of
        zones" field with 65535 in it.  Type 's' 1440 ENTER.)

Now you have a floppy file system that FS can expand up to 65536 blocks. (I used 65535 instead of 65536 to make it easier to find and change. With 65536 you'll see 0 and 1 at the V2 field.)

If you use a script to fill a floppy then change the mkfs as above, and run 'de' later. Maybe you can even forget about 'de', I don't think FS minds if it hits the end of the image device early. It's just not right somehow.

How many i-nodes?

When a file system is created using mkfs a number of i-nodes proportional to the size of the medium are created if you don't explicitly specify a number with the -i option.

These are the default mkfs actions:

 size   i-nodes         blocks
                   free    used   fd-free 
-----   -------   ------  ------  --------
  720K    240       700      20
 1024K    352       997      27
 1200K    400      1170      30
 1440K    480      1405      35      1405
 2048K    688      2000      48      1392
 4096K   1376      4005      91      1349
 8192K   2736      8016     176      1264
16384K   5472     16036     348      1092
32768K   8192     32427     521       919 
65536K  10928     64840     696       744   

The last column above is the number of free blocks you will have if you create the file system data structures on a floppy disk.

How many i-nodes do you need?

Here are actual i-node usages of a few systems:

pre-install 2.0.3 system (root.mnx + usr.mnx):   229
a complete installed Minix 2.0.3 dosminix       3170 
minix1.hampshire (2.0.2, 1.9G disk) total:     10747
    "            / + /usr + /usr/local only:    6968                    

How much floppy space do you need?

A Minix 2.0.4 install disk uses 359 (of 480) + 694 (of 720) blocks on /dev/fd0p0 and /dev/fd0p2, for a total of 1053 blocks. So we can easily make an install disk that initializes a 16M RAM disk with 5472 i-nodes.


All material on this site not otherwise attributed is copyright ©1994-2006 Albert S. Woodhull
Click here for information on copying and other use.
Mail comments on this page to: Al Woodhull <asw@woodhull.com>
[Viewable With Any Browser]
Valid CSS!
[Valid XHTML 1.0!]