Question

FSCK Bad Superblock?

Asked by: Kayjon

When I do an FSCK on a drive, I get the following.  Is this normal?  This is normally a boot disk but it won't boot, so we're trying to fix it.... (note that this is a raid-0 drive)

xserve:~ root# fsck -fy /dev/disk3
** /dev/rdisk3
BAD SUPER BLOCK: MAGIC NUMBER WRONG

LOOK FOR ALTERNATE SUPERBLOCKS? yes

SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE
-b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE
SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8).


Thanks

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-11-02 at 13:22:09ID21617223
Tags

bad

,

super

,

superblock

,

fsck

Topics

Apple Operating Systems

,

Apple

Participating Experts
3
Points
250
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Corrupt Superblock
    I run RedHat Linux 4.1 on a 486 machine with all the usual stuff. This morning, I had a kernel panic due to a disk error on my boot partition, and now I can't reboot. I booted from my "rescue" disk, and was able to mount the suspect partition. When I try to run f...
  2. Bad superblock?
    Hi, My system got messed up really bad. It lost the /usr directory. The directory mounted a partition on my second harddrive. I keep getting this message to run e2fsck -b 8193 <dev>. When I run 'e2fsck -b 8193 /dev/hdb2' (second partition on second harddrive) it tells m...
  3. URGENT: Bad superblock
    Runnung FreeBSD 3.3 I have the following scenario: The filesystem won't boot. When I try to mount (/dev/da0s2) it from an emergency boot disk I get a "Incorrect Superblock" error. When I try to run fsck it gives me an error about wrong magic number. Here is the part...
  4. fsck problem
    Hi there: Maybe my computer was attacked by virus. It turned to black screen suddenly, and then when I reboot the machine. It told me to run fsck, and "fix or repair" file system manually. After I run %fsck /dev/hda1 It told me: "Couldn't find ext2 superbloc...
  5. howto fsck a ext3 fs
    i had some issues with an upgrade. I installed a drive, partitioned it, formated it, copied my /var/spool over. Mail server ran great for oh 2 weeks. drive went south, i cant cd /var/spool/mail now just gives an error: -bash: cd: mail: Input/output error i would like to ru...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: pike480Posted on 2005-11-02 at 16:36:13ID: 15213441

you can try re-writing the file system with "newfs" in terminal or "tunefs." Both may require a unmounted unbooted file system to work.

note - I've never seen the error in OS X and never used the above commands.

I would first try using DiskWarrior on your drive to see if that fixes things before trying either tunefs or newfs.

 

by: BobHBPosted on 2005-11-23 at 12:44:28ID: 15353225

Hello Kayjon - is this still an active problem?  Are you still stymied by it or have you found a solution?  I'd be willing to give you my thoughts if this issue is still around.

 

by: jondriscollPosted on 2005-12-07 at 07:08:15ID: 15436522

I have this issue with a Firewire daa drive (non-boot)
when I run
 bash :~ sudo mount /dev/disk1s14 /mnt
I get
/dev/disk1s14 on /mnt: Incorrect super block.

Ant way to replace the super block?

- jd

 

by: BobHBPosted on 2005-12-07 at 08:06:51ID: 15437125

I'm going to give a Solaris answer (ATT Unix), and not a Macintosh answer (BSD Unix), so I would recommend checking out what I'm about to say to see if it is relevant or needs modification for a Mac. I am at work and my Mac is at home, and I normally don't work at this level on my Mac. But  I believe that the disk structure in both types of Unix are identical at this level.

The Superblock lives in the 16 disk sectors (sectors 16-31) that follow the boot block.  Since jondriscoll's disk is a non-boot disk we don't know if the boot block is as hosed as the Superblock, or how much of the disk is messed up as well.  But there is a backup Superblock which begins at sector 32.  There are others as well; more about that in a moment.

You can fsck your harddrive using the backup Superblock.  In Solaris format you would enter (this is Mac-style syntax, and not the Solaris syntax)

fsck -o b=32 /dev/dsk1s14

Using a backup Superblock, fsck compares actual file system information with the backup one specified, and if there is a discrepancy fsck then attempts to rebuild the primary Superblock.

If the backup Superblock at sector 32 is unusable, you should be able to find others.  pike480 was close to the answer when he recommended using newfs, but he (correctly) stated that this would create a new file system, thus destroying all data on your disk.

There is an option which newfs has though which will list ALL Superblocks on your harddrive. These are created when your harddrive first has its filesystem installed.  Having gotten that information, you could use fsck with any of the backup Superblocks to rebuild the primary Superblock.

To get a list of all Superblocks (again, in Mac dialect) type in 'fsck -N /dev/dsk1s14'.  On Solaris the output (truncated) looks like (and note that in line 6 you are given the syntax you would use to fsck with a backup Superblock):

# newfs -N c0t0d0s2
Cylinder groups must have a multiple of 16 cylinders with the given parameters
Rounded cgsize up to 256
/dev/rdsk/c0t0d0s2:     71127180 sectors in 24620 cylinders of 27 tracks, 107 sectors
        34730.1MB in 770 cyl groups (32 c/g, 45.14MB/g, 5632 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 92592, 185152, 277712, 370272, 462832, 555392, 647952, 740512, 833072,
 925632, 1018192, 1110752, 1203312, 1295872, 1388432, 1480992, 1573552,
 1666112, 1758672, 1851232, 1943792, 2036352, 2128912, 2221472, 2314032, ...snip...

As I said, I do this stuff with Solaris, and try to avoid it with my Mac, but I believe it will work.  Good luck and please let me know the outcome.

 

by: jondriscollPosted on 2005-12-08 at 06:15:00ID: 15444408

Hmm. Thanks for the info.
Tried what you suggested,

guests-Computer:~ root# newfs  -N /dev/disk1s14
Warning: Block size and bytes per inode restrict cylinders per group to 4.
Warning: inode blocks/cyl group (975) >= data blocks (519) in last
    cylinder group. This implies 4152 sector(s) cannot be allocated.
disk1s14:       57022080 sectors in 6988 cylinders of 255 tracks, 32 sectors
        27842.8MB in 1747 cyl groups (4 c/g, 15.94MB/g, 3968 i/g)
super-block backups (for fsck -b #) at:
 32, 32704, 65376, 98048, 130720, 163392, 196064, 228736,
 261408, 294080, 326752, 359424, 392096, 424768, 457440, 490112,
 522784, 555456, 588128, 620800, 653472, 686144, 718816, 751488,
 784160, 816832, 849504, 882176, 914848, 947520, 980192, 1012864,
 1045536, 1078208, 1110880, 1143552, 1176224, 1208896, 1241568, 1274240, ... snip ...

guests-Computer:~ root# fsck -b 32704 /dev/disk1s14
Alternate super block location: 32704
** /dev/rdisk1s14
BAD SUPER BLOCK: MAGIC NUMBER WRONG
guests-Computer:~ root#

So, what does the "MAGIC NUMBER WRONG" mean, and what can I do about that?

Thanks in advance,
- jd

 

by: BobHBPosted on 2005-12-08 at 06:42:19ID: 15444674

Hi jd,

Let's drop back one square and review: Is this a new disk?  Did (or can) you run the manufactuer's format utility?  You may really need to run the 'newfs' command if you haven't done so already.  Can you mount the drive and its partitions with disktool?    

 

by: jondriscollPosted on 2005-12-08 at 06:46:22ID: 15444712

not a new disk.
manufacturers format?
I have data on this disk that I'd like to keep.... but I may be unlucky, I think.
formatting will "delete" the data, yes?

this is a firewire drive, with 4 partitions.
3 of the 4 partitions are mounting a.o.k.
all are hfs.

just rebooted, and only three of the four came back up.
/dev/rdisk1s14 looks a little hosed for some reason!

- jd

 

by: BobHBPosted on 2005-12-08 at 08:06:02ID: 15445532

You asked if formatting a drive will delete the data.  The answer is yes, it will.  So will the newfs command, so let's avoid those until the bitter end. Two further thoughts:

1) Print out the partition map on your firewire drive and post it here:

sudo pdisk /dev/disk1 -dump [where disk1 is your firewire disk name]

2) Try mounting the drive with  'mount -t hfs /dev/disk1s14 /mnt'     where -t specifies a file type; its equivalent in Solaris (-F) over-rides the /etc/vfstab description of the file type (which is /etc/fstab in OS X).  I'm not certain that this will work, but it is worth a try

3) Run fsck several times with some options, namely b=1241568 (alternate superblock), -m (check only, do not repair) -p f (force check regardless of superblock flag).  Again, these are Solaris options, but they will probably work.  You do have an inode problem, but that is not the issue here; it can be fixed later.

Run:

fsck -o b=1241568 m
fsck -o b=1241568 f



 

by: jondriscollPosted on 2005-12-08 at 13:12:27ID: 15448161

Item 1: sudo pdisk /dev

guests-Computer:~ jon$ sudo pdisk /dev/rdisk1 -dump
/dev/rdisk1  map block size=512
   #:                 type name                  length   base      ( size )
   1:  Apple_partition_map Apple                     63 @ 1        
   2:       Apple_Driver43*Macintosh                 56 @ 64      
   3:       Apple_Driver43*Macintosh                 56 @ 120      
   4:     Apple_Driver_ATA*Macintosh                 56 @ 176      
   5:     Apple_Driver_ATA*Macintosh                 56 @ 232      
   6:       Apple_FWDriver Macintosh                512 @ 288      
   7:   Apple_Driver_IOKit Macintosh                512 @ 800      
   8:        Apple_Patches Patch Partition          512 @ 1312    
   9:           Apple_Free                            0+@ 1824    
  10:            Apple_HFS Apple_HFS_Untitled_2  79941584 @ 263968    ( 38.1G)
  11:           Apple_Boot eXternal booter        17408 @ 80205552  (  8.5M)
  12:            Apple_HFS Apple_UFS_Untitled_3  20253864 @ 80222960  (  9.7G)
  13:           Apple_Free                            0+@ 100476824
  14:            Apple_HFS Apple_HFS_Untitled_4  57026232 @ 100738968 ( 27.2G)
  15:           Apple_Boot eXternal booter        17408 @ 157765200 (  8.5M)
  16:            Apple_HFS Apple_UFS_Untitled_5  76659024 @ 157782608 ( 36.6G)
  17:           Apple_Free                            0+@ 234441632

Device block size=512, Number of Blocks=234441648
DeviceType=0x0, DeviceId=0x0
Drivers-
1: @ 64 for 23, type=0x1
2: @ 120 for 36, type=0xffff
3: @ 176 for 21, type=0x701
4: @ 232 for 34, type=0xf8ff

Item 2: mount -t hfs
guests-Computer:~ jon$ sudo mount -t hfs /dev/disk1s14 /mnt
mount_hfs: Invalid argument

Item 3:
multiple fsck's makes no difference, it seems!

Please note, I am running OS X 10.3.9
Thanks again for your continued help!

- jd

 

by: BobHBPosted on 2005-12-09 at 09:01:25ID: 15453824

jd,

I'm seeing that your drive is a mixture of UFS and HFS partitions.  Did you use an Apple utility (disktool, for example) to partition this drive, and did you do the partitioning before you loaded data?  

I'm beginning to think that your disk1s14 (which is slice - or partition - 14), aka Apple_HFS_Untitled_4, got stepped on big-time.  Since you can't do mount it or do anything even with alternate Superblocks, your data may have gotten hosed also.

Let's not give up hope, yet.  Try this mount command:

hfs.util -m disk1s14 /mnt

And if that doesn't work use the same command with a capital 'M' which is a deprecated option but which is also a force mount:   hfs.util -M disk1s14 /mnt

Let me know what happens.

 

by: jondriscollPosted on 2005-12-10 at 16:48:34ID: 15460600

Hmm.
This is dragging on, heh!

Q: Did you use an Apple utility?
A: Yep. Disk Utility.
 
Q: did you do the partitioning before you loaded data?
A: yep. "partitioned" using diskutil, then created data.

Odd point maybe.
When I look at the output of pdisk, I see 2 x HFS and 2 x UFS - as above in this thread.
When I browse the info in the partition tab for the disk in "disk utility"  all of the 4 partitions are labeled as Mac OS Extended (Journalled). Don't know if this could be significant or not...

I tried running
sudo /System/Library/Filesystems/hfs.fs/hfs.util -m disk1s14 /mnt
and just got the usage statement
"
usage: /System/Library/Filesystems/hfs.fs/hfs.util action_arg device_arg [mount_point_arg] [Flags]
action_arg:
       -p (Probe for mounting)
       -m (Mount)
       -u (Unmount)
       -M (Force Mount)
       -a (Adopt permissions)
       -J (Make a file system journaled)
       -U (Turn off journaling on a file system)
       -I (Get size & location of journaling on a file system)
device_arg:
       device we are acting upon (for example, 'disk0s2')
       if '-J' or '-U' is specified, this should be the
       name of the file system we're to act on (for example, '/Volumes/foo' or '/')
mount_point_arg:
       required for Mount and Force Mount
Flags:
       required for Mount, Force Mount and Probe
       indicates removable or fixed (for example 'fixed')
       indicates readonly or writable (for example 'readonly')
       indicates suid or nosuid (for example 'suid')
       indicates dev or nodev (for example 'dev')
Examples:
       /System/Library/Filesystems/hfs.fs/hfs.util -p disk0s2 fixed writable
       /System/Library/Filesystems/hfs.fs/hfs.util -m disk0s2 /my/hfs removable readonly nosuid nodev
"
I then tried
sudo /System/Library/Filesystems/hfs.fs/hfs.util -m /dev/disk1s14 /mnt writable
with the same result.

I must have the syntax wrong somewhere.....
Any thoughts?

[ I'm thinking erase and start again! ] - don't want to waste too much more of your time...

Cheers,
- jd



 

by: BobHBPosted on 2005-12-12 at 11:51:02ID: 15468923

Did you turn journaling on when you partitioned the drive?  I believe journaling is turned on as a default only with OS X Server, otherwise you have to explicitly turn it on.

There might be an issue with the pdisk utility which might be used by Disk Utility to create partitions.  I don't know if Disk Utility in fact does use pdisk but the problem is that older versions (10.2.x?) had a 15 partition limit (your drive has 17).  Thus one man page for pdisk has the following:

http://www.osxfaq.com/man/8/pdisk.ws
       Creating  more  than  fifteen  partitions  is not advised.
       There is currently a bug in the some (all?) of the kernels
       which  causes  access  to the whole disk fail if more than
       fifteen partitions are in the map.

But the current man page for pdisk does not have this warning:  http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/pdisk.8.html

There is a good explanation of this issue at http://www.macosxhints.com/article.php?story=2002062501132315&query=pdisk

As I said, I don't really know if Disk Utility uses pdisk in the background or not.  But the long and the short of it is, unless you want to use the next hint, I think you should just "erase and start again" as you recognized above.

If you are really "into it" you could try this technique for using the unix dd copy-and-convert-a-file command
http://www.macosxhints.com/article.php?story=20050720092514388&query=pdisk

(As an aside, I enjoyed this thread, and hope it was helpful to you.  It took me into different territory, yet conceptually it was similar to topics I should know for disaster-recovery scenarios where I work. I would have liked to have solved your problem, believe me! It was no idle exercise for me, and all I can say is "Good luck!")

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...