What to do with bad magic number errors?

Bad magic number error indicates the system is mostly likely having trouble accessing VTOC (Volumne Table of Contents) This just indicates that the partition is in a strange state.

What to do when you saw bad magic number errors in Solaris? If you know the alternate superblocks, then you can fsck the partition. If you don’t know the alternate superblocks and created the partition using newfs command, then you can use the “-N” option to print out the superblocks without actually recreate the file system. For example:

newfs -N /dev/rdsk/c0t0d0s0

“format” tool might be able to correctly label the disk with valid VTOC. Relabel your disks essentially repartition the disks and existing data will be lost. A recommended approach is to run analyze feature in format utility. Analyze will try to verify or repair a bad sector on a disk. Please note that bad magic number errors doesn’t always translate to bad sectors. The physical disk might be working perfectly without errors.


7 thoughts on “What to do with bad magic number errors?

  1. I solved this problem on my computer by correcting an entry
    in the “/etc/fstab” that mistakenly had ‘ext3’ as the file system
    type for “/dev/hdb3”, when actually, it should have been

    I could tell that is was not corrupt, because I could mount it

    # mount /dev/hdb3 /mnt/hdb3

    using a Knoppix live CD.


  2. sir,
    i am working on EMBEST ATEB9200 evaluation board. whenever i am trying to auto boot from the dataflash, it is trying to boot it from the flash after downloading the code into the specific memomy location of the SDRam. upto this it is ok. bt from the specific location at the time of reading it is showing bad magic number. please help me to get rid of this trouble.

  3. Hi Mike,

    Thanks for sharing your tip.

    Hi sumit,

    I am no expert in the specific area that you are working on. Hope what I shared and tips contributed by others in this comment section can inspire you to find the solution. Please feel free to share your findings. Thanks.

  4. bt after loading my application code instead of loading linux os. at the time of booting it shows bad magic number. what type of error it is? if anybody could help.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s