How to create a recovery partition? I have a Sony Xperia SP with 'Bootloader unlock allowed: No'. I want to flash a custom ROM to the device but there seems to be no recovery partition on it, so I cannot install TWRP or use fastboot. Using adb and ls -l yields (output cropped):

...
dr-xr-xr-x root     root              1970-01-01 01:00 proc
-rw-r--r-- root     root         2109 1970-01-01 01:00 property_contexts
drwxr-xr-x root     root              1970-01-01 01:00 res
drwx------ root     root              2014-05-11 12:44 root
drwxr-x--- root     root              1970-01-25 01:39 sbin
lrwxrwxrwx root     root              1970-01-25 01:39 sdcard -&gt; /storage/emulated/legacy
lrwxrwxrwx root     root              1970-01-25 01:39 sdcard1 -&gt; /storage/removable/sdcard1
...


ls -al /dev/block/platform/msm_sdcc.1/by-name yields:

lrwxrwxrwx root     root              1970-01-25 01:39 Boot -&gt; /dev/block/mmcblk0p2
lrwxrwxrwx root     root              1970-01-25 01:39 Boot2 -&gt; /dev/block/mmcblk0p3
lrwxrwxrwx root     root              1970-01-25 01:39 Cache -&gt; /dev/block/mmcblk0p14
lrwxrwxrwx root     root              1970-01-25 01:39 FOTAKernel -&gt; /dev/block/mmcblk0p11
lrwxrwxrwx root     root              1970-01-25 01:39 Kernel -&gt; /dev/block/mmcblk0p4
lrwxrwxrwx root     root              1970-01-25 01:39 LTALabel -&gt; /dev/block/mmcblk0p12
lrwxrwxrwx root     root              1970-01-25 01:39 System -&gt; /dev/block/mmcblk0p13
lrwxrwxrwx root     root              1970-01-25 01:39 TA -&gt; /dev/block/mmcblk0p1
lrwxrwxrwx root     root              1970-01-25 01:39 TZ -&gt; /dev/block/mmcblk0p5
lrwxrwxrwx root     root              1970-01-25 01:39 Userdata -&gt; /dev/block/mmcblk0p15
lrwxrwxrwx root     root              1970-01-25 01:39 apps_log -&gt; /dev/block/mmcblk0p10
lrwxrwxrwx root     root              1970-01-25 01:39 fsg -&gt; /dev/block/mmcblk0p8
lrwxrwxrwx root     root              1970-01-25 01:39 modemst1 -&gt; /dev/block/mmcblk0p6
lrwxrwxrwx root     root              1970-01-25 01:39 modemst2 -&gt; /dev/block/mmcblk0p7
lrwxrwxrwx root     root              1970-01-25 01:39 ramdump -&gt; /dev/block/mmcblk0p9


My question is: Is it possible to create a new recovery partition, and if so, how does it have to be done? Or is it possible to flash a custom ROM without this partition? Thanks.
Is it possible to create a new recovery partition, and if so, how does
  it have to be done?


No, it is not possible...  later Sony devices use what is called "Recovery in Boot" and recovery resides inside the boot partition... Makes it much more difficult to install TWRP or other custom recovery or software because a custom boot image (kernel) is required.


  Or is it possible to flash a custom ROM without this partition?


Yes you can, in fact it is a requirement since stock software won't work with TWRP installed (the boot image fails validation, at least last time I looked), because there is a way to patch the boot partition and install TWRP.

So is the question how to install TWRP? No, that isn't really it either because with a locked bootloader you cannot. 

This is a journey you can take with help in a more relevant place... I already answered your questions as asked, but will give you some references to start reading about all the steps required.

Unlock bootloader

Official TWRP information

Install TWRP and FOTAkernel