I'm a total novice that made a mistake while trying to learn about Linux.

While trying to figure out how to mount my NTFS data drive (with all my back up photos, music, etc. on it) to a new Ubuntu 18.04 LTS machine, I blindly followed a video and did:

mkfs.ntfs -L USBServerData /dev/sdb1

I looked and discovered that I may be reformatting my only drive with this info on it. When the process was at 8%, I was jumping around having a fit and knocked the external drive housing down and it unplugged. Now, I've tried to plug it back in and the drive isn't being discovered or mounted in my Unitek USB HDD Docking station when I plug it into my Lubuntu computer to double check. I wonder if I partially wrote a new data table thing but didn't erase my data?

I haven't plugged in or used the HDD since, in an effort to not overwrite any of the data.

Please give step by step instructions (prefer to use and learn on command line) for:

  1. Cloning the drive to another HDD so I can try to fix the clone without totally killing the data on the original.
  2. Recovering hopefully all of the data on the entire HDD. Backing it up to a new HDD & reusing the old drive in a new capacity.
  3. Mounting the HDD in a new Linux machine as a secondary drive so I can use this drive as a local drive on the new machine.

Sorry for being so clueless. Thank you for any help you can offer.

My Computers

I'm using the following laptops to access the remote (headless) computers that I messed up.

  1. Old Toshiba running Lubuntu 18.04 LTS.
  2. Windows 10 using SSH and Ubuntu 18.04 LTS.
  3. The headless server I'm trying to make and load up with the old HD data is an old Acer Revo running Ubuntu Server 20.04 and NextCloud (all working fine, currently a new install)
  4. the headless server I was trying to stick the data drive on to unload it to the new NextCloud server:
  5. New little Ubuntu 18.04 LTS Server mini PC that I have SandStorm.io on (that I may have now messed up)
  6. RPi with Ngnix reverse proxy server, PiVPN and I'm about to put on a Firewall & Pi Hole. I'm trying to learn how to use computers and Linux.
  • Welcome to Ask Ubuntu! I recommend that you edit this to clarify what Ubuntu release is running on the system you ran that mkfs.ntfs command on. I'm not sure how important that is for this question, but currently the release is given as "18.20 LTS." As there is no such release, I think you mean either 18.04 LTS or 20.04 LTS, but I'm not sure which. – Eliah Kagan Jun 12 at 20:18
  • Thank you, Eliah. I ran mkfs.ntfs on the mini PC running Ubuntu Server 18.84 LTS. – Rob Y Jun 12 at 22:37

You can use testdisk you shall need another disk with enough free space to store recovered data. Here the benefit is that you can recover the data with your directory structure and same directory/ file names.

boot into Ubuntu from USB disk open terminal and run:

sudo apt-get install testdisk

after completion of installation type testdisk in terminal and follow instruction from here. Read instructions carefully. With testdisk command it may be possible for you to recover your Windows partition.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.