How can I format an encrypted hard drive in Ubuntu?

11,718

Assuming you have a computer that runs Ubuntu or an Ubuntu community flavour,

  • an installed system,
  • a live or persistent live system:

If you wipe the first mibibyte, overwrite it with zeros, the data on the [rest of] the drive does not make any difference, and you can use any tool for this purpose.

  • You can wipe the first mibibyte in a safe way with mkusb.

  • After that you can [install and] use gparted or some command line tools to create the partition table with partitions and file systems that you want. It might even work without wiping the first mibibyte (depending of on the data in that part of the drive).

Links:

Share:
11,718

Related videos on Youtube

louiesanchezdj
Author by

louiesanchezdj

Updated on September 18, 2022

Comments

  • louiesanchezdj
    louiesanchezdj over 1 year

    some time ago, a laptop broke down. I managed to save the ram, the processor and the hard drive, that disk had a Window$ 10 installed and is encrypted by BIOS. Instead of throwing it, I would like to format it and put a casing to be able to use it as an external disk.

    How could I do this? Thanks.

    • EODCraft Staff
      EODCraft Staff almost 6 years
      What have you tryed? GPart is a good option. gparted.org/download.php
    • Chai T. Rex
      Chai T. Rex almost 6 years
      If you don’t want to save any data on it, you can usually blank the disk with a Linux live CD and sudo dd if=/dev/zero of=/dev/…. Replace /dev/… with the disk’s device file, and make sure it’s the right disk or you’ll zap something else.
    • louiesanchezdj
      louiesanchezdj almost 6 years
      Usually, I use the "discs" tool that comes by default in Ubuntu, but sometimes it fails to erase or format to a disk. I will try with what you have told me, and if not, I'll try it with gparted. Thanks.
  • louiesanchezdj
    louiesanchezdj almost 6 years
    Now I use Kubuntu, I left Ubuntu because I did not like new gnome-shell customization. I also have another pc with Debian. I have been using Linux for more than five years. But I have not gotten serious with Linux until I started Debian a few months ago. I will test the solutions you have given me to see if I solve it. Thanks for the quick answers.
  • sudodus
    sudodus almost 6 years
    @louiesanchezdj, This method should work with all current versions of Kubuntu (and I think also with Debian Jessie and Stretch). Good luck :-)