Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.
The superblock is the part of an ext2 or ext3 filesystem that contains the metadata — information about filesystem type, size, status and so on. Without the superblock, you’re in trouble in terms of data loss. Linux therefore has multiple copies of the superblock in different locations. Thus, even if you get a “bad superblock” error, you can still rescue your filesystem, as described here.
Note that before doing any of the below the filesystem must be unmounted!
If the problem filesystem is /, you must boot off a LiveCD or
rescue disk.
First, get the superblock information for the problem filesystem.
dumpe2fs /dev/hda2 | grep superblock
|
(^4dumpe5^ handles both ext2 and ext3 happily). The output will look a bit like this:
Primary superblock at 0, Group descriptors at 1-3
Backup superblock at 32768, Group descriptors at 32769-32771
Backup superblock at 98304, Group descriptors at 98305-98307
Backup superblock at 163840, Group descriptors at 163841-163843
[ etc ... ]
|
Superblocks have standard locations in a default system, but it’s always a
good idea to check the information anyway. So, you now have a list of backup
superblocks to use in place of your bad primary superblock.
The next step is to pass in a backup superblock as an option tofsck:
fsck will probably ask you to confirm a few fixes. After
it’s run, try mounting the filesystem as usual (with mount). If this
still doesn’t work, try passing the backup superblock as an argument:
mount sb=32768 /dev/hda2 /mnt
|
And now you’ve sorted your disk out: Make sure you back it up!
This article was first published on ServerWatch.com.
RELATED NEWS AND ANALYSIS
-
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
-
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
-
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
-
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
-
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
-
Top 10 AIOps Companies
FEATURE | By Samuel Greengard,
November 05, 2020
-
What is Text Analysis?
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
-
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
-
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
-
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
-
Top 10 Chatbot Platforms
FEATURE | By Cynthia Harvey,
October 07, 2020
-
Finding a Career Path in AI
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
-
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
-
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
-
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
-
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
-
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
-
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
-
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
-
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020