I'm creating a home server. After successfully installing Ubuntu Server, I realized I mounted a partition on /var.. how to I unmount it and make it use the main bootable partition instead? I wanted the partition currently mounted on /var to be a samba share, so I made a folder in /media called share and mounted it to that as well for now.. is that the right way to do it?
The simplest and most portable way is to edit /etc/fstab. It'll be a little trickier because you shouldn't yank /var out from under the feet of a running system. It's probably easiest to do from a live/install/rescue CD, but it might be possible to wing it on a running system as well. I get the feeling that you are relatively new to Linux though, so you probably shouldn't go that route. Rather, use the rescue mode of the installation media you used to install the system (it can be selected on the boot menu you get when you boot from the CD).
The system should come up just fine, and you now have a spare partition that used to be /var. Depending on how you edited your fstab, it may be mounted somewhere else or not.