fsck: "Bad super block: magic number wrong"

One of my 750 Gig FireWire drives behaves peculiarly, all the files stopped opening on it. Disk Utility doesn't see anything wrong, DiskWarrior 4 didn't fix the HD's behavior, DataRescue II was willing to rescue files... but 750 Gigs' worth? Who has that big of a spare HD.

So I booted in Safe mode and ran the following fsck command from Terminal:
/sbin/fsck -f /dev/disk3s3

I received the following answer:
"BAD SUPER BLOCK: MAGIC NUMBER WRONG
LOOK FOR ALTERNATE SUPERBLOCKS? no"

My UNIX knowledge pretty much ended at this. I surmise from the answer that I won the UNIX "corrupted directory" jackpot. Does anyone know what commands I should enter to look for alternate superblocks or perform some other remedial action here? Thank you in advance

Dual G5 + Single G5 + 2 clamshell IBooks, Mac OS X (10.4.10)

Posted on Nov 25, 2007 10:15 AM

Reply
19 replies

Nov 25, 2007 6:21 PM in response to Djun Kim

Today I tried the same command with the _hfs added. To my greatest surprise, fsck replied that one of my other HDs needs repair. Apparently, the disk3s3 identifier was reassigned to that other HD since the last boot. So I looked up what's the identifier for the sick HD today. It's disk7s3. OK, I ran the /sbin/fsck_hfs -f /dev/disk7s3 command. The results:

Fsck reports that the sick drive is OK, and that my other, OK drive "needs repair".
Disk Utility sees no problem on either drive in spite that files still don't open on the sick drive.

Nov 27, 2007 2:30 AM in response to George Kopeczky

George,

I'm unfamiliar with safe mode, but familiar with single-user mode (which is usually used for these kinds of things on the boot disk). I trust 'safe mode' doesn't automatically mount your firewire disk, but loads the kernel extensions for your Firewire bus.

When in doubt, try the debugging option on the whole disk, /sbin/fsck_hfs -f -d /dev/disk3 (or 7).

Bruce

Nov 27, 2007 10:31 PM in response to Bruce Bathurst

Hello Bruce,

Thank you for your help. The sick disk came up as disk6 today. Running the /sbin/fsck_hfs -f -d /dev/disk6 command from terminal resulted in the following answer:

** /dev/rdisk6 (NO WRITE)
Block 2 is not an MDB or Volume Header
Block 1465149166 is not an MDB or Volume Header
unknown volume type
primary MDB is at block 0 0x00
alternate MDB is at block 0 0x00
primary VHB is at block 0 0x00
alternate VHB is at block 0 0x00
sector size = 512 0x200
VolumeObject flags = 0x01
total sectors for volume = 1465149168 0x575466f0
total sectors for embedded volume = 0 0x00

It's amazing how nicely the HD works on the face of it, and how totaled every of its files seems to be at the same time. Did we stumble into some disk corrupting UNIX bug? The weird thing is, it seems to affect only a single HD out of 9 on this G5.

Nov 27, 2007 11:15 PM in response to George Kopeczky

At the same time, if I target the disk's only existing volume directly with a:
/sbin/fsck_hfs -f -d /dev/disk6s3

I get:
** /dev/rdisk6s3
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume Csajok 4 appears to be OK.

I'm starting to have a hunch what may be going on: some two weeks ago I installed MacFUSE and NTFS-3g to be able to write files to a transportable 230 Gig PC HD. Perhaps that's what tangling up the communication lines here... Tomorrow I'll try to see what happens if I uninstall both.

Nov 28, 2007 1:31 AM in response to George Kopeczky

George,

Sadly, I'm not that familiar with Macs. However, a few facts might give you some ideas.

1. Apple is diligent in making sure MacOSX works, but it cares very little about Darwin's commands. No backup programs were ever updated to HFS+ but 'fsck_hfs; and 'ditto', a replacement for 'cp'! Clearly fsck_hfs couldn't identify the disk's format, but MacOSX could.

2. You probably partitioned the disk to support volumes of different file systems. One possibility is ext2, Linux's file system, known also as Apple UNIXSVR2. So, why didn't fsck recognize it? I'm not sure. Unix, historically, has been run on processor with 'big-endian' words.

3. Microsoft formats are designed for an Intel processor, and are likely written in little-endian. It's possible that you need an Intel Mac to open files written with one, and you are attempting to open use a disk prepared for an Intel Mac with a PPC Mac, or vice versa. The tradition is for Linux, for example, to write big-endian files, even from an Intel processor. But Mac may be shooting for speed rather than compatibility. Anyone know?

It's rather amusing that MacOSX correctly identified the MDB in the first block, but fsck_hfs didn't know its file system, couldn't read its 'magic number'. The MDB for ext2 is at 0x83, not 0x0; so I'm unfamiliar with the file system too.

Perhaps the history of the drive will allow you to identify the problem with reading it. Sorry I can't help more. You need more current technical help.

Bruce

Nov 28, 2007 2:52 AM in response to Bruce Bathurst

George,

My migraine medicine is working, and I realized what a careless error I wrote. Have to fix it. I was referring to byte-switched, of course; not 'word-switched', and a 'magic number' used to be the first two bytes of a file or 'special file': each of the two characters might be switched and be unreadable to the utility kindly provided by Apple (but not its OS).

Don't quote me, but I seem to remember the Master Boot Record starting at sector 0 on Microsoft formats. There are so many formats devised to contain volumes of different OSs and even load the boot records of many that only you would know which yours is. Goodnight and good luck.

Bruce

Nov 29, 2007 11:01 PM in response to Bruce Bathurst

The latest report from the trenches...

Today I started by removing NTFS-3g. I did a hot restart... the problem remained.
Next I removed MacFUSE. I did a cold restart... the problem remained.
I guess it's back to the drawing board.

The history of this (ST375084) Seagate is, it was first formatted from a Windows XP host, installed into an external Mactronic SCSI mirrored RAID. That failed, presumably due to HD model mismatch with the other HD in the mirrored pair which was ST375064. To test the HD, I brought it home to my G5 where it formatted, read and wrote fine, so I swapped one of my own, ST375064 Seagate 750 HD's for it with the company and as a result both the company RAID and my home G5 worked fine, afterwards. (I played movies from this drive for many months since.)

I just discovered a weird thing with this "sick" drive - not 100% of its files is corrupted. A handful 1.5 Gig files that were copied to it maybe two weeks ago (right when I was experimenting with MacFUSE and NTFS-3g... hence my suspicion of those two) still plays back without a problem. So the hardware seems to be OK, able and willing, the culprit appears to be somewhere on the OS side.

As a next step, I'll take this sick HD out of my FireWire multi-enclosure, and see how it responds to the company PC tomorrow. (The PC has MacDrive.) Still, if you get a sudden insight in the meantime what might be ailing it, don't let my efforts prevent you from posting it here 🙂

Nov 30, 2007 2:40 AM in response to George Kopeczky

George,

When you formatted the drive, did you re-partition it and format it with HFS+? It seems partitioned by another OS, which allows HFS+ volumes. Did you use a boot loader, so you could boot two OSs from the disk? I'll just offer some more things sighted, not insights. 🙂

This is looking like a common problem, though; so I could use some help with ownership & permissions from someone. It would seem that Tiger & Leopard both mount NTFS partitions read only, but NTFS-3g's permission system is similar enough to Unix's that it can be mounted read/write.

MacFUSE appears to do things with 'FUSE', a mystical object at first glance, one whose permissions can be converted to either HFS+, ext2, or usf. The ownership & permissions appear to change with where the external drive is mounted on the boot disk's file tree. I assume you know all about these things.

Is using them together a good idea? In any case, they both allow a file system to be mounted read/write, and modify the Mac OS itself. Here's an interesting remark from the MacFUSE FAQ:

+ Q 3.2. After installing MacFUSE, I can't mount any disk images, optical discs, etc. What's going on?+

+ A: It's likely that you installed a broken ntfs-3g package you found on the Internet. The package might be interfering with the disk image/disc mounting process. Try removing the /System/Library/Filesystems/ntfs-3g.fs/ directory.+

Also, Leopard's update 10.5.1 has the sentence:

+Addresses formatting issues with certain drives used with Time Machine (specifically, single-partition MBR drives greater than 512 GB in size as well as NTFS drives of any size and partition scheme).+

You can check the volume's ownereship & permissions with a Ctrl-click 'Info Menu' on the mounted volume's icon. Does all look OK?

Wish I knew more, but perhaps these observations will give you some ideas. Best of luck.

Bruce

Nov 30, 2007 12:00 PM in response to Bruce Bathurst

Hello Bruce,

Report from the field: the problem remains consistent on the office Win XP computer too. (Yee-haw, a cross-platform bug! 🙂 When I originally reformatted this HD for Mac use, I set it to be a single 750Gig journaled Mac volume. I do not use boot loader, and I do not use Leopard.

I'll verify the drive's permission settings tonight when I get back home with it. In the meantime, I just ran a barrage of virus / malvare scans on this HD from the office computer - it's clean.

Nov 30, 2007 7:05 PM in response to George Kopeczky

George,

A cross-platform bug! That worth one paper at least!

Seriously, now that you've proved it's the disk, it would be nice to know whether one of those file system adjuncts (that modify ownerships & permissions) changed your partition table (or what if it, if it were originally parititioned for a RAID array). Did this problem occur before you installed & tried one of the two file system adjuncts?

If you have a utility that can read the binary on your hard disk,

http://en.wikipedia.org/wiki/GUIDPartitionTable

lists a host of GUIDs and where to find them. Note also, it does mention that the first two bytes of these partition-table identifiers can each be byte-switched to create, presumably, an old-fashioned 'magic number'.

Bruce

Dec 1, 2007 2:37 PM in response to George Kopeczky

George,

I don't know how much time you have, whether the computers are 32- or 64-bit, whether your at home computer has an Intel microprocessor, whether the drive is ATA or SCSI, or how much time or interest you have to investigate.

However, here is a list from sourceforge.net of physical disk editors. In physical mode, I imagine you would request to see a range of blocks or clusters; in logical mode, I should imagine it would find those files & directories of interest to you. Just guessing here.

http://sourceforge.net/softwaremap/trove_list.php

Bruce

Dec 2, 2007 11:49 PM in response to Bruce Bathurst

Hello Bruce,

Thank you for your help. Macs use an exotic flavor of GUID called UUID or Universally Unique Identifier ( http://en.wikipedia.org/wiki/UUID) Disk Utility, Apple's on-board disk management program shows the "sick" drive's UUID as:

065A4C89-554C-3565-96AD-3D00E204A608,

The fact that this ID is nowhere on the Wikipedia GUID list is no biggie; even the UUID for my Mac's system drive isn't. GUID and UUID apparently differ. Maxtronic's Indy 3321 RAID which tried to format this "sick" HD first was pretty much a self-contained unit, with its own Intel i80303 RISC CPU running who knows what OS. ( http://www.maxtronic.com/raidsystems/soho_and_smb/indy2231/). My point is, this didn't prevent the HD from playing my AVI movies just fine for many months after I reformatted it in OSX. The files became all of a sudden corrupted only recently.

The handful of movie files that all play well on the sick HD all date to Oct 28. If I drag a movie file over right now, that plays OK too from the "sick" drive so we are dealing with some kind of "retroactive corruption" to boot. The schedule of major OS changes on this Mac is as follows:
- On October 20 I installed Virtual PC.
- From Nov 3 to Nov 10, I upgraded my system HD and an important external HD to mirrored RAIDs ( http://discussions.apple.com/thread.jspa?threadID=1219218&tstart=0)
- On Nov 12, there was a HD crash which I knew was coming. I fixed it the same day. There was no data lost and it did not involve this "sick" HD.
- On November 15th I installed the FUSE / NTFS combo.

Dec 3, 2007 5:35 PM in response to Bruce Bathurst

Hello Bruce,

I visited the SourceForge link; I didn't see any OSX disk editing software. (But, wow, they have Linux MIDI sequencing / audio editing packages now? What a discovery.) The last Macintosh disk editing program I used, Norton Disk Editor, was discontinued many years ago.

See my previous post regarding things I found out about my computer and the "sick" HD (dates of recent OS changes, playback of currently added files, etc.) Perhaps we can figure out something from those.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

fsck: "Bad super block: magic number wrong"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.