How to Resolve “mount error(12): Cannot allocate memory” on a Windows Share

[Copied from http://jlcoady.net/windows/how-to-resolve-mount-error12-cannot-allocate-memory-windows-share because it's so useful.]

If you mount a Windows 7 share using Samba/CIFS you may run into “mount error(12): Cannot allocate memory” if you are using very large files on the Windows machine. Looks like in certain situations Windows needs to be told to run as a file server and to expect large files. You can read more details at Large Files are locking up Windows 7 32 bit and 64 bit, but the solution is to make two registry edits and then restart a service:

  1. Set “HKLMSYSTEMCurrentControlSetControlSession ManagerMemory ManagementLargeSystemCache” to “1″.
  2. Set “HKLMSYSTEMCurrentControlSetServicesLanmanServerParametersSize” to “3″.
  3. Restart the “server” service.

Once you have done that you should be able to mount the share using a command like “sudo mount -a” or just reboot the Linux machine.

Agere DSP / Martian modem on Ubuntu 10.10

Dial-up modems have always been a pain on Linux.  I got this one working though.

System: old PC running Ubuntu 10.10 (yes, still).

Modem: PCI card with Agere DSP chipset — i.e. a 'winmodem'.

Scanmodem reveals that it will work with the 'martian' driver, which is available on Ubuntu as packages 'martian' and 'martian-source'.

Having installed the packages, there is still some work to do which has to be repeated every time the Linux kernel gets updated:

  1. Make sure that you've got the linux-headers-xx package that matches your current kernel.
  2. As root:
    cd /usr/src/modules/martian-modem/source
    make
    make install
    depmod -a
    modprobe martian-dev

  3. Now you can run 'martian-modem –daemon' which sets up the modem as /dev/ttySM0
  4. I found that, after rebooting, it all Just Worked — /dev/ttySM0 was there and accessible.
  5. So I could set up Gnome PPP to use /dev/ttySM0
  6. Sorted.

(Those instructions are fairly minimal, but you should get the idea.)

Arch Linux, XFCE, and UK Keyboards

I know Arch Linux doesn't hold your hand like other distros do, but I think it could make setting the keyboard layout easier.

Firstly, set the locale in rc.conf:

    ...
    KEYMAP="uk"
    LOCALE="en_GB.UTF-8"
    ...

and then reboot.  Reboot?  Surely there's a better way, but I don't know what it is.

Edit /etc/locale.gen to uncomment the ones you want to use — en_GB.UTF-8 and en_GB in my case.

Then you can run

    # locale > /etc/locale.conf

For 'normal' sorting of ls listings etc., edit /etc/locale.conf and set

    LC_COLLATE="C"

That should sort things out on the console.

For XFCE, it's tricky because the Applications Menu / Settings / Keyboard seems to be ignored.  So refer to https://wiki.archlinux.org/index.php/Xorg#Setting_Keyboard_Layout_With_Hot-Plugging and add this to /etc/X11/xorg.conf:

    Section "InputClass"
        Identifier             "Keyboard Defaults"
        MatchIsKeyboard        "yes"
        Option                 "XkbLayout" "gb"
    EndSection

and restart X.