Seems like a disk problem: so hardware.
Depending on how bad the problem is with the disk, there may still be hope to recover most if not all of the data.
The thing says that the problem is on the /dev/sda1
partition, which is the root filesystem.
With Ubuntu, it's a traditional choice to install the root filesystem in one partition, while installing user data, the so-called home
filesystem on another, dedicated partition.
If this user-data-oriented home
section is indeed located on its separate, dedicated partition, then there is a very high chance of full recovery of data.
If however the home
section was installed together with the (now-problematic) root filesystem (on the same partition), the outlook may be quite different.
One thing to keep in mind: it's best to exhaust all options at copying the data out before running the fsck
repair utility on a partition containing user data, because there is some chance that fsck
ends up not being able to repair the partition, and then it would leave you in a worst state than before.
So it's a kind of all-or-nothing with fsck
.
Update on this last sentece: according to high number of upvotes on this answer (suggested by @steeldriver), there seems to be a decent chance that fsck
can deal with the problem.
Nevertheless, even in the case of success, there should be a lesson learned, and from then on important data should be regularly backed up to an independent device.
For the data recovery attempt, I would use a Live USB device, the one, or a similar one, that was used to install the OS in the first place.
These Live USB installer devices have a function: "Try Ubunutu without installing". If you use this feature, it gives you an Ubuntu operating system running on the computer that's operating entirely from the USB device, bypassing the faulty hard drive.
While using this USB-provided OS instance, it is possible to "mount" (connect) the internal HDD's partition that contains the user data (if it's indeed a dedicated partition separate from the problematic root filesystem). From then on it would be only a matter of attaching another storage medium to which the files can be copied.
fsck
(something likechkdsk
command in Windows). It is best to runfsck
from a live USB/DVD. – user68186 Feb 12 '21 at 14:46fsck /dev/sda1
. If it fails, I would recommend a backup of the important data then a clean install of the OS. If that fails, then you could be looking at a bad drive. – Terrance Feb 12 '21 at 15:07fsck
fails on that partition, then how could one backup the data? – Levente Feb 12 '21 at 15:10fsck
on it, from a live USB session? – Levente Feb 12 '21 at 15:31