# Bestcrypt: FAT16, FAT32/VFAT

## Apollo77

I just installed Bestcrypt. I want to create containers that can be mounted from my Gentoo box or from my Wintendo XP box. I can create the container fine, but when I try to format it I get this:

# bcformat -t fat32 myfile

Enter password:

mkfs.fat32: No such file or directory

I have also tried:

# bcformat -t vfat myfile

Enter password:

mkfs.vfat: No such file or directory

I even tried leaving the -t option out (defaults to msdos ... supposedly):

# bcformat myfile

Filesystem type not specified. Msdos used.

Enter password:

mkfs.msdos: No such file or directory

Ok, so what's going on here? In /sbin I have mkfs.ext2, mkfs.ext3, mkfs.minix, mkreiserfs, mkswap, mkfs.cramfs, mkfs.bfs, mkfs, and mke2fs. BUT ... nothing resembling FAT32. What file do I need and where can I get it? I've searched the forums and Google -- nothing.

Apollo[/i]

----------

## skunk

you should emerge app-admin/dosfstools

----------

## Apollo77

Thank you skunk! That's exactly what I needed. Problem solved.

Apollo

----------

## micron

I've emerged successfully dosfstools but I'm still unable to create a container in vfat, fat,...

Any ideas  :Question: 

----------

## mingotta

It worked for me.

I needed to create a fat32 filesystem but when I did

mkfs -t vfat /dev/hdc5

it would say it couldn't find mkfs.vfat.

After I emerged dosfstools they were installed and I could perform the fs creation.

----------

## micron

 *mingotta wrote:*   

> After I emerged dosfstools they were installed and I could perform the fs creation.

 

I forgot to say that I'm able to create a fat32 filesystem, but bestcrypt still gives me the error messagge  :Shocked: 

----------

## mingotta

A quick note, perhaps it can be of some avail to you:

I found out that unless you specify -F 32 in the command 

```
mkfs -t vfat -F 32 -n 4backup -c -v /dev/hdc2
```

 *Quote:*   

> mkdosfs  will automatically select between 12 and 16 bit, whatever fits better for the filesystem size.  32 bit FAT (FAT32 format) must (still) be selected explicitly if you want it.

 

... mkfs.vfat man page.

In addition to that, mounting the file system correctly is crucial:

I mount mine with this /etc/fstab entry:

```
/dev/hdc2    /spazio        vfat    auto,iocharset=iso8859-15,codepage=850,umask=0    0 0
```

I don't know where you're from but unless you're from an strictly english-speaking country, you're going to need to change the default iocharset and codepage settings, and also add the umask=0 option to make everyone able to read/write it.

I didn't know about the possibility to crypt a fat32 file system until I discovered this post. I took a quick look at the http://www.jetico.com/ web site. It's a commercial product though. Have you ever tried it on a different distro than Gentoo? Or perhaps you got it working on Gentoo? Keep me posted because I might want to give it a try in the future.

----------

## micron

You haven't  understand the problem.

I'm able to create and mount a vfat file system, the real problem is the creation of a bestcrypt container formatted using fat filesystem.

```
bctool format foo -t vfat

Enter password:

mkfs.msdos: No such file or directory

```

 *mingotta wrote:*   

> Have you ever tried it on a different distro than Gentoo? Or perhaps you got it working on Gentoo? Keep me posted because I might want to give it a try in the future.

 

Under slackware it works, only under gentoo I got this error  :Evil or Very Mad: 

----------

## mingotta

I had understood correctly, only I thought perhaps you couldn't get it working because you had omitted the -F 32 option while bestcrypt needs a fat32 formatted file system.

If you find the binary when issueing the which mkfs.msdos command, then my guess is it's a $PATH related problem.

----------

## micron

 *mingotta wrote:*   

> If you find the binary when issueing the which mkfs.msdos command, then my guess is it's a $PATH related problem.

 

The binary of mkfs.msdos is in my PATH, I can call it without any problem.

So what's the problem?  :Confused: 

----------

## Orion-X

*BUMP*   :Sad: 

Has anyone found a solution to this?  I too am having the exact same problem.

And, dosfstools is emerged the directories mkfs.msdos and friends are in are in $PATH

Gentoo 1.4, bestcrypt 1.2_p6, kernel 2.4.22-gentoo-r5

-Orion-X

----------

## Orion-X

Just after I made the above post, I thought to myself, "What if bctool (bestcrypt) is looking for mkfs.* in a hard coded location instead of reading $PATH?"

Turns out this is exactly what seems to be happening.  So:

```

ln -s /usr/sbin/mkdosfs /sbin/mkfs.msdos

ln -s /usr/sbin/mkdosfs /sbin/mkfs.vfat

```

does the trick    :Very Happy:   .  Simple, and I'm now kicking myself for not thinking of it sooner   :Embarassed: 

Cheers,

Orion-X

----------

## afabco

Thank you.  Having same problem, and I didn't think of that either.

----------

## afabco

Thank you.  Having same problem, and I didn't think of that either.

Seems to work now.

----------

