PDA

View Full Version : Hard Drive - error code 2000-0142 & FSCK LUKS



Noel Brookham
19th November 2014, 04:39 AM
First and foremost, I've a novice Fedora user.

Coming home to find my computer powered off after a power interruption. I Powering on my system, and instantly got very concerned. Fedora 20 would not load after entering my encryption key; all I had on the screen was;

Give Root password for maintenance (or type Control-D to continue):
[root@(none) ~]$

After recovering from a flood of some unsavory emotions and not knowing very much command-line commands, I started addressing the issues.

1) Reboot and get into the system Bios. If you you have a newer system there is a possibly you can troubleshoot hard drive issues from there. Error Code 0142 or Error Code 2000-0142, bad sector on hard drive. This is not all that bad and potentially a recoverable situation.

2) Get your Live CD out or download that latest live CD from the FedoraProject. Boot from the live CD, you might have to hit F12 after powering on your system to get the option to boot from your CD/DVD drive. Once you've successfully booted from the Live CD you have a wonderful tool in Utilities called Disks. This is a graphical interface (GUI) that eliminates a lot of the pain staking command lines and discovery processes in resolving issues. You can Unlock your encrypted drive. You'll be prompted for your encryption key to do so. Additionally, this Disks utility will display partition paths, type of format (LVM, LUKS, EXT's, Etc...).

3) With the Disks utility open, you can launch Terminal, and enter the FSCK command directly. The Disks utility displayed the actual path that I needed to FSCK to get me back up and running. For my situation the command was;
FSCK /dev/mapper/fedora-home
(Without any FSCK switches, you'll be prompted to fix discovered errors, enter Y to fix everything.)
Without this Disks utility I would have ended up wiping the entire drive and reinstalling, losing a years worth of movies, music, pictures, and other data.

All comments welcome to help out us beginners...

Ciao