Ubuntu (and Linux in general) does not require particularly fast disk drive. I you are running memory-intensive applications or have small RAM in your comp you should put swap on SDD and all other Ubuntu filesystems on HDD.
In such case you should have at least 3 partitions available for your Ubuntu installations:
- 1st for swap - preferably on SDD
- 2nd for /boot
- 3rd for everything else - I usually use it to create LVM volume so I can keep things separated while having some flexibility
Here is my favourite partitioning example:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root--lv 10190136 1775676 7873788 19% /
/dev/mapper/ubuntu--vg-usr--lv 103081248 6285284 91536700 7% /usr
/dev/mapper/ubuntu--vg-srv--lv 999320 1284 929224 1% /srv
/dev/sda2 516024 368440 121372 76% /boot
/dev/mapper/ubuntu--vg-tmp--lv 10190136 23568 9625896 1% /tmp
/dev/mapper/ubuntu--vg-opt--lv 10190136 207132 9442332 3% /opt
/dev/mapper/ubuntu--vg-home--lv 2535216 643960 1761172 27% /home
/dev/mapper/ubuntu--vg-var--lv 20511356 1361992 18168300 7% /var
Please note /boot on a separate partition.
You can search for "Ubuntu custom partitioning" or review this question for reference: How to use manual partitioning during installation?
The proposed scheme has also the advantage, that if you remove HDD and move it to another PC you just loose swap, but Ubuntu stays usable - you can import volume group and mount filesystems or you even may be able to boot it up and use.
(depending on hardware similarities)