mount error 12 = Cannot allocate memory - SOLVED! (Was "wrong newsgroup" subject)

Ohmster <notareal@emailaddress.> wrote in


The good
thing is that it is fixed, from a Linux point of view and this is a
Linux newsgroup. I will be a good netizen and report back here what
the fix was when I find it to get it into the newsgroup archives to
help others. There ain't hardly crap out there on the net for this
problem, although others have mentioned it.


I am posting this for the benefits of any others that are confounded by
the mount error:
mount error 12 = Cannot allocate memory

Okay, this is what was wrong with the mount.cifs command and what I did
to correct it. This is the error you receive in Linux when you try to
mount a Windows XP, 2000, or NT share and it fails:

mount error 12 = Cannot allocate memory

This is not a Linux problem, but the Windows machine is the one that is
causing it and refusing to allow the mount. I found this by running tail
on the messages file in one term and then running the command in another
terminal window, then watching the tail command to see what errors were
generated by the mount commmand.

The command that generates the error:

[root@ohmster ~]# mount -t cifs //missy/ohmster_music /mnt/test -o
mount error 12 = Cannot allocate memory
Refer to the mount.cifs(8) manual page ( mount.cifs)
[root@ohmster ~]#

The tail results that showed me the error:

[root@ohmster samba]# tail -f /var/log/messages
Oct 23 21:15:40 ohmster kernel: CIFS VFS: cifs_mount failed w/return
code = -12
Oct 23 21:19:43 ohmster kernel: Status code returned 0xc0000205
Oct 23 21:19:43 ohmster kernel: CIFS VFS: cifs_mount failed w/return
code = -12
[root@ohmster samba]#

The NT_STATUS message gave it away, this shows that a Windows based NT
machine caused the error, not a Linux machine.

Read on for the fix.

The Windows Fix, A.K.A.
The Solution!

Check the Event Log on the Windows machine that fails to allow it's share
to be mounted under System. Look for a red X, and the word Error. The
Source is Srv. The error will be:

The server's configuration parameter "irpstacksize" is too small for the
server to use a local device. Please increase the value of this

If you have this error on the Windows machine that fails to have it's
share mounted, then do the following...

This key in the system registry must be modifed or created:


If the key is there, increase it a bit to say 15 or 18. If the key does
not exist, as in my case, create a new DWORD Valute. Name it
IRPStackSize. Double click on it to edit the value, put a check on the
Decimal radio button for the Base so that you can see the parameter value
as a decimal value and not a hexidecimal value. Give the new key a value
of 15 and reboot. If that is not enough, raise it a litte to let's say 18
and then reboot again. The problem is solved. Go mount your samba shares.

theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.

Relevant Pages

  • blog post: Tips for Windows users making the switch to Linux
    ... TEN TIPS FOR WINDOWS USERS MAKING THE SWITCH TO LINUX ... It took me two months to wean myself off my Windows machine for good. ...
  • Samba share in DMZ
    ... Our customer is wanting to have an Linux HTTP server that ... Windows COM+ service (running on Windows 2000 advanced Server or ... IIS of the Windows machine (this was our first proposal, ... We understand it is possible to secure Samba. ...
  • Re: FTP very slow send but fast get
    ... > the media setting for a Linux ethernet interface from the shell prompt. ... > What kind of NICs are you using, both Windows and Linux? ... card in that machine that I'm not using. ... I also changed the card in the windows machine to full duplex and then ...
  • Transfer problems between Linux and Windows machine
    ... I am having some strange issues with transfer speeds between my linux box ... The windows boxes transfer fine between each other.. ... Download using FTP from ... ON WINDOWS MACHINE: ...
  • Re: Future of IT in Lebanon
    ... working knowledge of Indian programmers DNA, nor of their intuitive Java ... > So Longhorn is not an experiment and Linux is an experiment? ... another chapter in the Windows story, and the Microsoft marketing machine is ... > application opens, Check the about, it says Microsoft Visual Basic 6.3. ...