After 1 day of googling and try&error I give up and ask for help.
Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs connected to my Mac. SDD is connected through Thunderbold. Choosing SDD from startup manager as the boot drive has no effect and iMac continuous to boot from the slow internal HDD. I guess the problem is caused by the identical UUIDs of both drives. Before editing /etc/fstab to prevent the internal HDD from mounting I need to change the UUID. How can I do that? Moreover I am confused by the fact that each partition has a volume UUID and a partition UUID - which one has to be changed? both? or only one of them?
Full story: I want to use an external SSD connected to my iMac through Thunderbold as my primary boot drive. Further I want to deactivate the internal HDD drive without opening my iMac. I cloned the internal HDD with dd command while I booted into the iMac from Ubuntu 18.04 live USB stick. When I try to use tune2fs to change UUID I get different errors depending on which partition I touch.
sbd1
sudo tune2fs -U random /dev/sdb1
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
/dev/sdb1 contains a vfat file system labelled 'EFI'
sdb2
sudo tune2fs -U random /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2 contains a hfsplus file system labelled 'Macintosh HD'
sdb3
sudo tune2fs -U random /dev/sdb3
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb3
/dev/sdb3 contains a hfsplus file system labelled 'Recovery HD'
sbd4
sudo tune2fs -U random /dev/sdb4
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb4
/dev/sdb4 contains a ntfs file system labelled 'BOOTCAMP'
UPDATE:
I took the risk and tried gdisk to change UUIDs of the partitions on the external SSD. I used x and f options of gdisk to randomize the SSD's disk&partition UUIDs. Checking the result back on OSX using diskutil info disk1s1, ...disk1s2 etc. it seems that this has changed each Partition UUID of all partitions. But the Volume UUID of all 4 partitions remained unchanged. (The Data did not get lost btw.). But I still have the issue that my iMac does not boot from the external SSD. :(