I want to put 6GB of RAM in a motherboard that supports 4. I heard something about using the excess RAM as a RAM disk and formatting that partition as SWAP, but that doesn't seen like it will work. I am using Linux. Can anyone help me on this?
This is not possible. If your motherboard only supports 4 GB of RAM, then your OS can only see 4 GB. The OS can only use the RAM that the hardware is capable of addressing.
If the OS is 32 bit and the hardware is 64 bit (allowing for more that 4 GB), it can still only address 4 GB of RAM.
If the OS and hardware is 64 bit, but the motherboard manufacturer limited the memory to 4, then you still will be unable to access the other 2. Manufacturers will not lay down traces to all the memory. They do this to lower end motherboards as a cost cutting measure.
If the motherboard truly only supports 4GB of RAM and there is nothing you can do about it as the limitation is to do with how many address lines are wired up to memory and it is a hard physical limit.
If on the other hand the motherboard only claims to support 4GB but you can find evidence on the internet stating that people have been able to use more than 4GB then you can do 1 of two things.
Out of those two you are miles better off just reinstalling the 64-bit OS, less pain and hassle after you've gotten your main apps installed.
As I say though, if your motherboard truly is limited (and a lot of olders boards are) then you will simply be throwing money down the drain as your processor will not be able to touch the extra memory.