0

My USB disc has a hidden encrypted partition. I can't even see it in no software. I tried almost everything in windows. I want to format the whole disc at low level and reuse all the capacity. is there any tool or commands in Linux on how to do it?

Edit: I'm using Ubuntu 16.04 - Gparted does't show the hidden partition. and the exact total cap.

The total capacity of the USB disc is 4GB. but It is showed as a 1GB Drive. and I'm not able to wipe the whole disc including the encrypted partition, since it is not shown anywhere.

Gparted Window Screenshot

I think there should be something like fdisk. i. e. when a file is hidden or password protected, you can't use that part of the drive unless you have the password. but if you format the partition or fdisk the drive and recreate the partition it is gone no matter how it was encrypted. now in this case I'm looking for a command or software to format this Drive in that low level. to wipe the encrypted part. and reuse the whole disc. but the problem is there is no tool available to determine there's a hidden partition to try and zero it.

I'm wondering if hdparm can do the trick. though I don't know how.

Dmesg Report When I Insert The USB Disc

idVendor=090c, idProduct=1000
  • Is this a Sandisk drive with their "optional encryption"? – negusp Nov 17 '16 at 13:10
  • No. I used a software 5 or 6 years ago, and created an encrypted partition on the USB disc (3 GB). when I entered the password the partition was shown. now I've lost the password and just want to make the disc back to factory state and it's original 4 GB size. and be sure that the hidden partition is wiped. – Amirhossain Nov 17 '16 at 14:09
  • What USB Stick type and vendor is it. – Luckyrings Nov 17 '16 at 20:08
  • 1
    It's a USB 2.0 VERICO Cube 4 GB. – Amirhossain Nov 17 '16 at 20:40
  • can you show device information of gparted please and also output of what gives command dmesg when you plug the usb stick, I add screenshot of mine to my answer – Luckyrings Nov 18 '16 at 9:00
-1

Plug in the disk and check in dmesg the device name (e.g. /dev/sdb, /dev/sdc etc...) (run command $ dmesg in terminal and read last lines).

To wipe it out, do following:

$ sudo dd if=/dev/zero of=/dev/your_device_eg_sdb bs=1M

This will fill the whole device with zeros. Yes and be careful do not format the system disk or other data disk!

  • 1
    Unfortunately Didn't Work. dd: error writing '/dev/sdd': No space left on device 1033+0 records in 1032+0 records out 1082634240 bytes (1.1 GB, 1.0 GiB) copied, 0.287651 s, 3.8 GB/s – Amirhossain Nov 17 '16 at 13:02
  • maybe check again what dmesg says? According to output it seems that dd have written something, can you try plug/unplug the drive and see are the partitions gone? What is the drive size? – Madars Vi Nov 17 '16 at 13:06
  • 1
    try sudo fdisk -l /dev/sdd – Madars Vi Nov 17 '16 at 14:24
  • 1
    Disk /dev/sdd: 1 GiB, 1082634240 bytes, 2114520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes – Amirhossain Nov 17 '16 at 14:25
  • 1
    OS does not see more than 1 GB. Where did you get that flash drive? I know there might be some fake Chinese drives that reports bigger size, than they are. – Madars Vi Nov 17 '16 at 14:28
-1

If you run Ubuntu from the live DVD or an USB Stick, or you have it already somewhere installed, then you will have two options:

  • You can use a graphical tool "Gparted" - it is a powerful tool but it is not installed by default on Ubuntu.

Installing it in console by typing:

sudo apt-get install gparted

Then run it from the starter menu.

  • the second way is, to use the integrated graphical Ubuntu Drive Manager called "Disks" which can do almost the same and it might be easier to use. It can be started also from the menu.

But be careful, both tools are powerfull, you might check twice to not format the wrong disk. The internal hard disk is usually called "/dev/sda".

Example output of device information of gparted (menu:view->device information):

enter image description here

  • I am using Ubuntu 16.04. and I have tried GPARTED app. but it does not show the hidden partition so I am not able to format it. – Amirhossain Nov 17 '16 at 12:20
  • So there is possible no hidden partion. Can you upload a screenshot to your question how the partion looks like. – Luckyrings Nov 17 '16 at 14:35
  • I made the hidden partition Myself! and I've been using it for some time. there was a tiny portable App I used to encrypt and make the hidden partition like 6 years ago, I can also upload the application if that helps! but that was for windows. – Amirhossain Nov 17 '16 at 14:39
  • Yes that would be helpful. What name of application you have been using for making that partion? – Luckyrings Nov 17 '16 at 14:41
  • I saw the screenshot,.The disk 1 GB size. It doesn't look that it was bigger. I have no answer to help you more. – Luckyrings Nov 17 '16 at 20:08

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.