Ubuntu uses libimobiledevice, a software library which handles iPod, iPad and iPhone devices. iPhone 4S comes with iOS 5. The version of libimobiledevice that ships with Ubuntu id not support devices running iOS 5, however there have been an update released.

Also, if it worked in the first place, but then you reset the iPhone (used Erase all Content and Settings option in the Reset menu in Settings) and it stopped mounting, then the solution is to remove the ~/.config/libimobiledevice/ directory and then replug your iPhone.