My situation is the following. I had Ubuntu 14 installed on this machine, which stopped responding. (Precisely: After a suspension it refused my password for a few times and it refused to shut down. After forcing the shut down I restarted it but there was no OS on the machine anymore.)

I burned Ubuntu 16.04 LTS on a USB-stick and I'm now in the "try mode", the reason I'm not immediately installing is that I would like to recover the data I had on the previous system. But, I don't seem able to do so. Indeed:

  1. My hard drive was partitioned into

    • /dev/sda and /dev/sdb, but Disk utility only sees /dev/sda.
  2. On the other hand GParted sees both the partitions, but when I try to recover data it says that I need gpart. If I try

    • sudo apt-get install gpart

the outcome is

Reading package lists... Done Building dependency tree Reading state information... Done Package gpart is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'gpart' has no installation candidate

(I already upgraded and updated apt-get)

  1. I then tried to move to Testdisk, but if I try to install it

    • sudo apt-get install testdisk

the outcome is

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package testdisk

  1. And if I now try to update apt-get

    • sudo apt-get update

the outcome is

Ign:1 cdrom://Ubuntu 16.04.1 LTS Xenial Xerus - Release amd64 (20160719) xenial InRelease

Hit:2 cdrom://Ubuntu 16.04.1 LTS Xenial Xerus - Release amd64 (20160719) xenial Release

Hit:4 http://archive.ubuntu.com/ubuntu xenial InRelease

Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]

Get:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]

Fetched 204 kB in 0s (464 kB/s)

** (appstreamcli:31465): CRITICAL **: Error while moving old database out of the way.

AppStream cache update failed.

Reading package lists... Done

Overall I feel pretty much stuck. Is there a way I can install gpart or testdisk? Is it possible that a malicious virus already deleted all my data after kicking me out of the way? What could be the causes why apt-get is not working?

Thank you very much for your time!

  • 2
    When in doubt check the Ubuntu Package Search and you'll discover that in this case you need to enable the universe repository Then proceed to install testdisk as in your previous attempt. Some (if not all) of your data is likely recoverable. You might try this answer to attempt to recover your data
    – Elder Geek
    Dec 21, 2016 at 19:40
  • gpart is also in the universe repository
    – Elder Geek
    Dec 21, 2016 at 19:57

1 Answer 1


Instead of using gparted you can use the command line application fdisk or cfdisk.

If the second partition really happens to be not present, I assume you need to use some recoverytools as for example foremost. I recommend to take the problematic drive out of the computer if possible and plugg it into another computer, since you will need free space as much as at least your lost data was.


One thing I noticed to what you wrote in 1.

/dev/sda and /dev/sdb are drives. Each of them can be partitioned by itself. the partitions are named /dev/sda1 /dev/sda2 or /dev/sdb1 and so on.

So you had two drives on the system.

I'm not sure what you mean with

GParted sees both partitions

since the named paths were drives not the partitions on the drives.

sudo fdisk -l /dev/sdX (replace X for a or b) should list you the partitions on the drives.

  • Your answer is more like a collection of three comments. However you do not have enough reputation to post comments. Dec 21, 2016 at 20:54
  • 1
    I encourage you to expand your answer with further detail perhaps outlining how to use/obtain fdisk, cfdisk and foremost to acheive the desired result.
    – Elder Geek
    Dec 21, 2016 at 22:52
  • 1
    Hello and welcome to AskUbuntu! This answer, while it may theoretically answer the question, contains very little detail about how to do things. Please check out our how to answer page, and edit your answer to include more information as to how to use the tools you've mentioned to solve the problem at hand.
    – Kaz Wolfe
    Dec 21, 2016 at 23:27
  • fdisk is an interactive application and it has a “nicer“ menu-based user interface than cfdisk which has a verb-based user interface. Dec 21, 2016 at 23:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .