You are not logged in.

#1 2016-08-27 00:37:45

luser
Member
Registered: 2016-08-27
Posts: 114

[SOLVED] Working root partition fails fsck

My working root partition fails fsck at boot but loads everything successfully. I am using it now.
I couldn't fully read the quickly passing fsck error message during boot, however, it really seems to be hosed.

If I boot to the install and #fsck /dev/sdb3

it tells me that my superblocks are corrupted. I listed and checked them all, and they were all bad. Frankly, I'm surprised my system works at all, and I am expecting trouble soon.

So, my problem is that I have the partitions backed up under Windows Acronis 2016, but I can't seem to restore just the files, and restoring the partition preserves the problem.

I wonder if I can solve the problem by using the installation DVD to boot ARCH, then mount an external USB drive, put an EXT4 partition on it, then copy all files and folder structure from the root partition to the usb drive, then apply mks.ext4 to the root, using the -U parm to preserve the file system UUID, and then copy all the files and folders back to it.

What would be the simplest way to copy the files over and back, and are there any problems that I would be likely to encounter with this approach?

I've used Windows for decades, since well, before it was Windows, but linux is new to me. So, I am hoping the answer to this is pretty simple.

I was hoping someone would point me in the right direction, but couldn't wait to try something. It seems to be working . . .

In case anyone else is in the same predicament, this is what I did:

sdxy is my damaged root partition
sdzw is the partition on my backup drive

boot arch installation DVD.
mkdir -p /mnt/oldroot
mkdir -p /mnt/bakroot
mount /dev/sdxy /mnt/oldroot
mount /dev/sdzw /mnt/bakroot
cp -ax /mnt/oldroot/* /mnt/bakroot
umount /mnt/oldroot
mkfs.ext4 -U MYROOTUUID /dev/sdxy
e2label /dev/sdxy root
fsck /dev/sdxy
(it passed)
mount /dev/sdxy /mnt/oldroot
cp -ax /mnt/bakroot/* /mnt/oldroot
umount  /mnt/oldroot
umount  /mnt/bakroot
shutdown

After removing the DVD and starting the machine it loads and my root partition no longer fails the fsck.

If anyone sees any flaws in this methodology, please advise ASAP. I believe I have preserved the file attributes, permissions, and links, and so far the evidence is that I have. . . but I haven't been in this arena long enough to be sure there is nothing I've overlooked.

Last edited by luser (2017-02-12 23:55:22)


luser: an epithet applied by Windows users to linux users

Offline

#2 2016-08-27 21:44:28

luser
Member
Registered: 2016-08-27
Posts: 114

Re: [SOLVED] Working root partition fails fsck

I believe I have solved my own problem myself, but I cannot figure out how to mark it solved so far.

I thought perhaps the problem is zero replies and that if I replied to myself, the option to mark it solved might be available.


luser: an epithet applied by Windows users to linux users

Offline

#3 2016-08-27 22:40:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Working root partition fails fsck

https://wiki.archlinux.org/index.php/Co … way_street


You can mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2016-08-28 16:54:36

luser
Member
Registered: 2016-08-27
Posts: 114

Re: [SOLVED] Working root partition fails fsck

Thank you. I've done that.

I'm editing this post to note that for the second time on a different system, I have had the same problem and applied the same solution to resolve it.

It seems really odd that there isn't some sort of utility designed to deal with this issue. fsck doesn't help, and I don't know what else there is that might actually fix the bad superblock issue short of reformatting the partition as I am doing.

In windows, chkdsk fixes some pretty serious file system problems, but fsck just gives up on this one. I wasn't expecting that, since the disk is clearly still quite readable. If it weren't, my solution would fail.

Last edited by luser (2017-02-13 02:25:28)


luser: an epithet applied by Windows users to linux users

Offline

Board footer

Powered by FluxBB