The first line with msdos partition is not present when the SSD is disconnected.
My only clue is the output Error: /dev/sda: unrecognised disk label of parted command above.
How do I solve it? I read online it can be that the enclosure is the issue but I am not sure.
Would you please tell me what the above command does? My plan with the new SSD is to clone my old SSD to it and to replace the old one. So would the above command affect the future cloning process in any way?
If your new disk is formatted in a way your computer doesn’t recognize, it could be causing your error. Honestly that error can be caused by many things, but I think it might be a good place to start.
Parted should be used with extreme caution on disks that contain data because changing partitions and stuff can cause data loss. In your case, since it is a new disk you have nothing to lose.
If you are going to use the new disk to backup another drive like you mentioned, I would start by setting up your new disk with the same type of partition table (looks like GPT from your outout above).
If you have never used parted before, GParted might actually be easier to get started with because it has a GUI. It is just as robust a program and can do all the same stuff.
Thank you for the detailed explanation. Opening the SSD with parted as you suggested indeed brings me to an interactive interface with a welcome message. It does look like it successfully opens the ssd.
That enclosure looks nice! I don’t see any reason that device would not be compatible but it’s always good to rule out basic stuff like that.
The only strange thing about the output your are getting is the error message. I’d say give it a shot to see if you can get it fixed in parted.
help will show you what options are available. I would start with trying to get a GPT label on it, then make a full-disk partition.
mklabel gpt
print to verify the partition table.
mkpart will help you set up the partiton. If you type in the commands one at a time, parted will prompt you for each step but I think you want something along the lines of mkpart primary 0% 100%. The percentages are an easy way to tell parted you want to start the partition at the beginning of the drive and finish at the end (instead of specifying byte-specific location on the disk).
You can set up a filesystem in parted if you want as well, but I wouldn’t even bother if you are going to clone another drive (it’s just going to write over it).