LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2018, 05:22 PM   #1
Jsonic2634
LQ Newbie
 
Registered: Jun 2018
Posts: 1

Rep: Reputation: Disabled
Unhappy Trying to repair a HDD and am getting this error message


e2fsck /dev/sda
e2fsck 1.42.13 (17-May-2015)
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/sda

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
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>
or
e2fsck -b 32768 <device>



How do I fix the super block, also, i am getting i/o errors when attempting to format the drive. the drive is a internal 320gb hdd.
 
Old 06-05-2018, 11:36 PM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,417

Rep: Reputation: 238Reputation: 238Reputation: 238
One e2fscks a volume, not a drive. What does
Code:
e2fsck /dev/sda1
return? (or whatever partition you want to check).
 
1 members found this post helpful.
Old 06-06-2018, 02:39 AM   #3
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 2,509

Rep: Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826
/dev/sda1 could be a swap partition, so if what RandomTroll wrote returns another error, do e2fsck /dev/sda2. You can first run
Code:
fdisk -l /dev/sda
to see which partition is swap.
 
Old 06-06-2018, 11:58 PM   #4
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 476

Rep: Reputation: Disabled
fsck does not fix hard drives, it attempts to fix filesystem errors. A filesystem is a higher, logical layer on top of a hard drive hardware device. If you're getting i/o errors, your drive might be broken and you may need to replace it. If you need to learn more about its status, I suggest looking into smartctl.
 
Old 06-07-2018, 01:46 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,537
Blog Entries: 9

Rep: Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048
additionally, fsck should not be used on mounted filesystems.
https://serverfault.com/questions/29...nted-partition
 
Old 06-07-2018, 02:33 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,353

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
Also, the filesystem is on a block device which could be a partition, like sda1, or it could be on a logical volume. lsblk will list all block devices.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message portable hdd actinide Linux - Security 1 02-06-2018 03:06 PM
repair programm for chrased HDD spidey-linux Programming 6 04-23-2017 10:12 AM
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, pl deva420patra Linux - Server 4 11-23-2016 07:40 AM
No error/message display when HDD of RAID take out & 1 of 2hotplug power cord unplug arikyeoh Linux - Hardware 0 07-25-2007 03:10 PM
Repair NTFS HDD mrblack General 2 06-16-2006 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration