On 10/18/2014 12:41 PM, Alan Feuerbacher wrote:
On 10/18/2014 11:49 AM, Bruce Dubbs wrote:
Alan Feuerbacher wrote:
When I tried to begin working with my BLFS installation this morning, I
found that the normally blanked screen would not fire up into Linux. So
I powered the machine off and restarted. The usual Linux systemd
messages started up, then stopped with this message:

---[ end Kernel panic - not syncing: VRS: Unable to mount root fs on
unknow-block(8,19).

This smells to me like the hard drive (/dev/sdb) went bad, but that's
probably a wild guess.

I also let the machine boot up into Fedora, which is installed on
/dev/sda. I tried to get into the BLFS chroot environment, but when I
tried to mount the LFS sytem on /dev/sdb I got an error message that it
could not do it for several possible reasons, including "bad block".

Any suggestions for what I should look for?

It does indeed sound like a bad drive.  A couple of things to check:

Does /dev/sdb exist?  What about the partitions (/dev/sdb?)

Does fdisk/gdisk see the partition table?

If so, does a fsck on the partitions identify problems?

I ran both fdisk and gdisk on /dev/sda and /dev/sdb, which indicated no
issues. I also ran blkid and lsblk, with no issues indicated.

After some net searching (please note that I'm a complete tyro at this)
I found references to "badblocks", which after running now for several
hours has spit out 4 block? numbers. More searching, plus looking at man
pages, indicated that perhaps running e2fsch with appropriate switches
would be the way to go. Apparently that program can fix some problems
with the -p switch, but I hesitate to run that without much better
understanding of the consequences.

Online I found a link to recovery tools:

http://www.techrepublic.com/blog/10-things/10-linux-rescue-tools-for-recovering-linux-windows-or-mac-machines/


The references to Knoppix and Trinity Rescue Kit look promising.

Do you LFS guys have any experience with these tools?

I'm hoping that my past almost two months of installing LFS and BLFS
stuff won't be lost.

Well, I managed to solve this problem.

First I decided to go ahead and run "e2fsck -c -v /dev/sdb". The response was:

############
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
############

I tried the program's suggestion and got the same response.

Then I remembered that earlier today, I had successfully mounted /boot on /dev/sdb1, which indicated that that piece of the drive was ok. So I ran the above e2fsck command on /dev/sdb1, and it gave me a bunch of messages including:

################
/dev/sdb1: Updating bad block inode.
. . .
/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
################

That indicated that e2fsck was able to fix some problems, so I ran it on /dev/sdb3 where / is. This gave a bunch of messages including:

################
/dev/sdb3: recovering journal
Error reading block 13171437 (Attempt to read block from filesystem resulted in short read). Ignore error<y>? yes
Force rewrite<y>? yes
Clearing orphaned inode 6422535 . . .
. . .
Checking for bad blocks (read-only test0: done
/dev/sdb3: Updating bad block inode.
. . .
Free blocks count wrong . . .
Fix<y>? yes
Free inodes count wrong . . .
Fix<y>? yes

/dev/sdb3: ***** FILE SYSTEM WAS MODIFIED *****
. . .
################

Finally I tried running e2fsck on /dev/sdb again, and got the same-as-above message "Bad magic number in super-block".

So I figured I'd just see if I could mount the /dev/sdb1 (/boot) and /dev/sdb3 (/) filesystems again, and this time it worked! I proceeded with the rest of the BLFS get-back-to-chroot commands, including mounting all the filesystems like $LFS/proc, and it all seemed to work.

Finally I was able to reboot into LFS, which started XFCE without a hitch.

Alan
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to