LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Possible Corrupt Filesystem Prevents Booting (https://www.linuxquestions.org/questions/linux-kernel-70/possible-corrupt-filesystem-prevents-booting-4175590711/)

GNewbie 10-03-2016 07:32 PM

Possible Corrupt Filesystem Prevents Booting
 
Hi All, I woke up to my computer not being able to boot Linux Mint.

This is the error I found...

[ 18.818---] ata3.00: statua: { DRDY ERR }
[ 18.818---] ata3.00: error { UNC }
[ 18.818---] ata3.00: configured for UDMA/133
[ 18.818---] sd 2:0:0:0: [sda] unhandled sense code
[ 18.818---] sd 2:0:0:0: [sda]
[ 18.818---] Result" hhostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 18.818---] sd 2:0:0:0: [sda]
[ 18.818---] Add. Sense: Unrecovered rread error - auto reallocate failed
[ 18.818---] sd 2:0:0:0: [sda] CDB:
[ 18.818---] Read(10): 28 00 04 99 39 e8 00 00 08 00
[ 18.818---] end_request: I/O error, dev sda, sector 77150696
[ 18.818---] Buffer I/O error on device sda7, logical block 61
[ 18.819---] ata3: EH complete

BusyBopx v1.20.2 (Ubuntu 1:1.20.0-8.1ubuntu1) built-in shell (asdh)
Enter 'help' for a list of built-in commands

(initramfs)

The "---" represent changing numbers I didn't think were important.

I tried using gparted's check function, but it failed.

I also tried using e2fsck as well, but that led to a number of problems that required rewrites and I decided to quit that after about 4 iterations because I didn't want to lose my data.

The partition is encrypted and it will not mount when i try to mount it with a live cd.

I would appreciate anyone who can help with the following:

1. Troubleshooting guidance.
2. I've read there are ways to check the drive to without mounting it. Details or a link would be appreciated.
3. How to backup up files. I don't need to back it all up, but i do have a few files that were recently updated that I'd like to back up. This includes Thunderbird email (I think that comes with Mint).

TIA...

syg00 10-03-2016 10:25 PM

Some of that (your description) is confusing:
- what did you run e2fsck against ?. - presuming not the encrypted partition.
- are you using full partition encryption (the so-called "full disk encryption" in Mint) ?. Or are you using encryptfs to just encrypt /home ?.
- is /home on a separate partition ?.

The short answer is that you will not be able to backup your data until you can mount it successfully. If the data is encrypted, you obviously can't read it until it is both opened and mounted - that's the whole point of encryption.
You can do all that from a liveCD if the data are valid - in all senses of the word. The hardware must respond validly, the container must be opened (with pass{word,phrase}) and the filesystem mounted.
Usually better to have a backup before these things happen.

GNewbie 10-04-2016 12:07 AM

Hi syg00,

I don't know the encryption details other than to say that I used whatever was standard with Mint (sounds like full encryption is the standard based on what you said). The Mint version is probably 4-5 years old, if not longer.)

I ran e2fsck against /dev/sda7, which is the encrypted home partition.

Now that I think about it, though, maybe that doesn't make sense because Linux might be able to load without the home partition working (or not, just thinking about why you would bring up that point).

When I used gparted, two partitions, sda5 and sda7 had error flags. Maybe I need to run gparted from live cd and see what sda5 is and try to fix it to see if I can get it back up and running and go from there.

Yes, I'm guilty of procrastination that I now regret.

Thanks for the reply.

syg00 10-04-2016 12:18 AM

Erk - I don't know what Mint did back then re encryption. e2fschk should only run against a recognisable filesystem. Run up the liveCD and from a terminal run this and post the output (use sudo in need)
Code:

lsblk -f -o +size

GNewbie 10-04-2016 10:33 AM

Quote:

Originally Posted by syg00 (Post 5613543)
Erk - I don't know what Mint did back then re encryption. e2fschk should only run against a recognisable filesystem. Run up the liveCD and from a terminal run this and post the output (use sudo in need)
Code:

lsblk -f -o +size

Here is the output using terminal in Ubuntu 10.4 LTS:

No command 'lsblk' found, did you mean:
Command 'lslk' from package 'lslk' (universe)
llsblk: command not found

I'm going to try and boot Parted magic and see if I get a different result.

sundialsvcs 10-04-2016 10:56 AM

From the error message description in the first post, I'd say that the drive is bad. The on-board hardware of the drive (so-called "SMART") was not able to "spare out" the bad sector.

You should immediately strive to get the data off of the drive and then probably repair the filesystem structure on the new drive.

GNewbie 10-04-2016 11:23 AM

Quote:

Originally Posted by sundialsvcs (Post 5613753)
From the error message description in the first post, I'd say that the drive is bad. The on-board hardware of the drive (so-called "SMART") was not able to "spare out" the bad sector.

You should immediately strive to get the data off of the drive and then probably repair the filesystem structure on the new drive.

Hi Sun, how do I go about getting the data off the drive?

Is there anything here that can help me out?

http://unix.stackexchange.com/questi...a-failing-disk

How about this?

http://www.sj-vs.net/forcing-a-hard-...e-bad-sectors/

TIA.

GNewbie 10-04-2016 12:04 PM

I could not boot Parted Magic. When i tried to run it from memory or from CD, it just looped back to the menu without ever running.

syg00 10-04-2016 07:15 PM

No point trying parted - first thing it does is scan the disk(s). Systemrescuecd would be a better option if you have another machine to create the liveCD/USB on.
That will also have the lsblk command - that Mint CD you tried is way too old.

The best way to copy off the disk is to use ddrescue - it will retry failing reads in reverse to see if it can scrape the data. It will be on systemrescue, but you will need another device to clone onto - at least as big as the apparently failed drive.

GNewbie 10-05-2016 10:17 AM

Quote:

Originally Posted by syg00 (Post 5613986)
No point trying parted - first thing it does is scan the disk(s). Systemrescuecd would be a better option if you have another machine to create the liveCD/USB on.
That will also have the lsblk command - that Mint CD you tried is way too old.

The best way to copy off the disk is to use ddrescue - it will retry failing reads in reverse to see if it can scrape the data. It will be on systemrescue, but you will need another device to clone onto - at least as big as the apparently failed drive.

I'm burning systemrescuecd right now. Can back up the partitions to a portable external usb drive just to get the files i want off of it? I guess I would then have to mirror the drive to an internal hard drive to stick back in the computer, but that's not a problem as soon as i order another hard drive.

GNewbie 10-05-2016 11:49 AM

Quote:

Originally Posted by syg00 (Post 5613543)
Erk - I don't know what Mint did back then re encryption. e2fschk should only run against a recognisable filesystem. Run up the liveCD and from a terminal run this and post the output (use sudo in need)
Code:

lsblk -f -o +size

Hi syg,

Here is the output:

root@sysresccd /root % lsblk -f -o +size
NAME FSTYPE LABEL UUID MOUNTPOINT SIZE
sda 931.5G
├─sda1 ext4 a1e05889-c8a7-4373-b54a-0a0dfd8a71e2 476M
├─sda2 1K
├─sda5 ext4 100f8716-048c-460e-abc9-913fa2d09c6c 14G
├─sda6 22.4G
└─sda7 838.2G
sr0 iso9660 sysrcd-4.8.3
2016-10-02-07-25-26-00 /livemnt/b 475.7M
loop0 squashf /livemnt/s 353.1M
root@sysresccd /root %

syg00 10-06-2016 05:02 AM

In future, use [code] tags - here's why:
Code:

root@sysresccd /root % lsblk -f -o +size
NAME  FSTYPE  LABEL      UUID                                MOUNTPOINT  SIZE
sda                                                                      931.5G
├─sda1 ext4              a1e05889-c8a7-4373-b54a-0a0dfd8a71e2              476M
├─sda2                                                                        1K
├─sda5 ext4              100f8716-048c-460e-abc9-913fa2d09c6c              14G
├─sda6                                                                    22.4G
└─sda7                                                                    838.2G

That doesn't look good - the encrypted partition should show as "crypto_LUKS" (under FSTYPE) according to my tests. If that header can't be recognised, you can't even start to open/mount it. I'd say your data is gone.

GNewbie 10-06-2016 01:30 PM

Quote:

Originally Posted by syg00 (Post 5614593)
In future, use [code] tags - here's why:
Code:

root@sysresccd /root % lsblk -f -o +size
NAME  FSTYPE  LABEL      UUID                                MOUNTPOINT  SIZE
sda                                                                      931.5G
├─sda1 ext4              a1e05889-c8a7-4373-b54a-0a0dfd8a71e2              476M
├─sda2                                                                        1K
├─sda5 ext4              100f8716-048c-460e-abc9-913fa2d09c6c              14G
├─sda6                                                                    22.4G
└─sda7                                                                    838.2G

That doesn't look good - the encrypted partition should show as "crypto_LUKS" (under FSTYPE) according to my tests. If that header can't be recognised, you can't even start to open/mount it. I'd say your data is gone.

Hi syg, does it make a difference if the drive wasn't encrypted? It is possible that my encryption idea came from a prior install. In short, I'm not 100% sure it was encrypted.

I still want to try and ddrescue the drive and try to recover data just in case it wasn't encrypted.

My current problem is that I'm getting errors when trying to partition a 4TB USB hard drive with gparted. It has a Microsoft reserved partition and when I was trying to resive the other partition it resulted in the following libparted error dialogue box:

"The backup GPT table is corrupt, but the primary appears OK, so that will be used."

Later on it hung up and spit out the following in an error file...

========================================================================
GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2
Shrink /dev/sda2 from 3.64 TiB to 4.88 GiB 00:00:11 ( ERROR )

calibrate /dev/sda2 00:00:11 ( SUCCESS )

path: /dev/sda2 (partition)
start: 264192
end: 7814035455
size: 7813771264 (3.64 TiB)
check file system on /dev/sda2 for errors and (if possible) fix them 00:00:00 ( ERROR )

ntfsresize -i -f -v /dev/sda2 00:00:00 ( ERROR )

ntfsresize v2015.3.14AR.1 (libntfs-3g)
ERROR(2): Failed to check '/dev/sda2' mount state: No such file or directory
Probably /etc/mtab is missing. It's too risky to continue. You might try
an another Linux distro.
libparted messages ( INFO )

The backup GPT table is corrupt, but the primary appears OK, so that will be used.
========================================================================

Do you have any advice as to how I can proceed with partitioning my 4TB USB ddrescue destination drive?

TIA...

GNewbie 10-08-2016 12:52 PM

For the sake of expediency, as well as my sanity, I simply deleted the Microsoft partition that kicked out the error and partitioned the external drive to set the stage to run ddrescue onto a partition on the new drive.

I'm using a LiveCD.

Assume that my computer's corrupted HD partition is sda7 and the destination drive partition is sdb3.

Does my ddrescue command look like this...

Code:

ddrescue -d -r1 /dev/sda7 /dev/sdb3 homepartition.img homepartition.log
Where homepartition.img is the image of the sda7 partition saved on sdb3 and homepartition.log is the log file, which is saved on sdb3, of all the problem areas found while ddrescue was perusing through the sda7 partition.

Also, does this output from dmesg |tail reveal anything significant?

Code:

mint@mint ~ $ sudo dmesg |tail
[ 2808.481008] nouveau 0000:01:00.0: gr:        00409610: f7f70000
[ 2808.481013] nouveau 0000:01:00.0: gr: TRAP_TEXTURE - TP2: 00000003 [ FAULT]
[ 2808.481017] nouveau 0000:01:00.0: gr: magic set 3:
[ 2808.481021] nouveau 0000:01:00.0: gr:        00409e04: dc0a6201
[ 2808.481025] nouveau 0000:01:00.0: gr:        00409e08: f700f7f7
[ 2808.481029] nouveau 0000:01:00.0: gr:        00409e0c: 40000430
[ 2808.481033] nouveau 0000:01:00.0: gr:        00409e10: f7f70000
[ 2808.481038] nouveau 0000:01:00.0: gr: TRAP_TEXTURE - TP3: 00000003 [ FAULT]
[ 2808.481044] nouveau 0000:01:00.0: gr: 00200000 [] ch 6 [001f8f9000 cinnamon[2913]] subc 3 class 8597 mthd 1b0c data 1000f010
[ 2808.481060] nouveau 0000:01:00.0: fb: trapped read at f700f7f700 on channel 6 [1f8f9000 cinnamon[2913]] engine 00 [PGRAPH] client 0a [TEXTURE] subclient 00 [] reason 00000000 [PT_NOT_PRESENT]
mint@mint ~ $


Teufel 10-08-2016 01:06 PM

seems your HDD has bad blocks.
I'd run smartctl (the part of smartmontools package) on this drive:
Code:

smartctl -x /dev/sdX
to check for damaged sectors (especially Current_Pending_Sector parameter value).
From the previously posted info it seems that the drive is damaged


All times are GMT -5. The time now is 03:50 PM.