09-30-2002
Bad Super Block: Magic Number Wrong
I had a power outage a day ago and when the power came back on my FreeBSD 4.6 webserver had problems. It said it was unable to mount /var and made me start in single user mode and said to run fsck MANUALY. So i did and this is now what i get.
www# fsck /dev/ad0s1e
** /dev/ad0s1e
BAD SUPER BLOCK: MAGIC NUMBER WRONG
/dev/ad0s1e: INCOMPLETE LABEL: type 4.2BSD fsize 16384, frag 0, cpg 64, size 39102273
So i did some research and found a few places that told we me to fix the Super Block with the alternative super block. So i ran this.
www# newfs -N /dev/ad0s1e
Warning: Block size and bytes per inode restrict cylinders per group to 385.
Warning: 2240 sector(s) in last cylinder unallocated
/dev/ad0s1e: 39102272 sectors in 9547 cylinders of 1 tracks, 4096 sectors
19092.9MB in 25 cyl groups (385 c/g, 770.00MB/g, 12288 i/g)
super-block backups (for fsck -b #) at:
32, 1576992, 3153952, 4730912, 6307872, 7884832, 9461792, 11038752, 12615712, 14192672, 15769632, 17346592, 18923552, 20500512, 22077472, 23654432, 25231392, 26808352, 28385312,
29962272, 31539232, 33116192, 34693152, 36270112, 37847072
Once I found the alternative blocks I tried this.
www# fsck -b 34693152 /dev/ad0s1e
Alternate super block location: 34693152
** /dev/ad0s1e
BAD SUPER BLOCK: MAGIC NUMBER WRONG
Running FreeBSD 4.6 on PIII 450
The System has 2 drives
Root is at /dev/da0 a 4.3 GB SCSI drive
And I am missing my /var that was on a 20GB IDE drive /dev/ad0
So I still can not fix or mount the /dev/ad0s1e drive. How do I fix BAD SUPER BLOCK: MAGIC NUMBER WRONG and mount the drive?
how can I fix INCOMPLETE LABEL? Is the drive file system toast? or can I recover the files?
Is there a way to recover the drive data and move it to the good drive?
Thank you for any help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am running mandrake 8.2 and when booting I get the message:
e2fschk: Bad magic number in super-block while trying to open /dev/hda8.
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and really contains a valid an ext2 filesystem (and... (1 Reply)
Discussion started by: Jay
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
when installing a piece of third part software I get the error "Bad magic number" at one point when it tries to use libraries from the bea tuxedo server. Am I correct that this means that the software is expecting 32bit while I'm on 64bit? Is there a way around it or can it only be solved... (5 Replies)
Discussion started by: rein
5 Replies
3. Filesystems, Disks and Memory
Dear All,
i have a SCSI hard disk drive i'm installing on it solaris 5 and the workstation is sun sparc, i made an image of this H.D using Norton Ghost 6, so i took off the SCSI H.D from the sun workstation and put it on a Compaq server then i booted the server from the Norton Ghost floppy disk... (0 Replies)
Discussion started by: wesweshahaha
0 Replies
4. HP-UX
Error received when I tried to restore a blank disk with an 'auto recovery' DDS tape via HP-UX recovery system 2.0 onto a 1Gb SCSI. I assumed it would do the setup, wrong. Could someone tell me the procedure to initial disk for recovering files using cpio. The system is a HP-UX 9.04 version on a... (1 Reply)
Discussion started by: admin wanabee
1 Replies
5. Solaris
I want mount a disk. I have this error. I'm trying to correct with the superblock but i have the same error. Look my procedure.
bash-2.03# fsck -F ufs /dev/rdsk/c0t1d0s0
Alternate super block location: 9423392.
** /dev/rdsk/c0t1d0s0
BAD SUPER BLOCK: MAGIC NUMBER WRONG
USE AN ALTERNATE... (1 Reply)
Discussion started by: simquest
1 Replies
6. Solaris
/pci@if,0/pci@1,1/ide@3/dad@0,0 corrupt label wrong magic number
can u plz suggustion me (6 Replies)
Discussion started by: tirupathi
6 Replies
7. Filesystems, Disks and Memory
Whenever i run,
# fsck -F ufs /dev/dsk/c0t0d0s7
The following error prompt out:-
** /dev/dsk/c0t0d0s7
BAD SUPER BLOCK: MAGIC NUMBER WRONG
USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION;
eg. fsck -o b=#
where # is the alternate super block. SEE fsck_ufs(1M).
... (3 Replies)
Discussion started by: beginningDBA
3 Replies
8. Solaris
I'll keep it fairly straight forward. I work with a Solaris server and magically today it decided to take a dump on me. At first it give a long list of files that couldn't be acessed before terminating the boot process and returning to the 'ok' prompt. Booting in single-user mode allowed me to run... (4 Replies)
Discussion started by: Aon
4 Replies
9. Filesystems, Disks and Memory
Hello all,
I have a hard drive that I can't repair.
The drive is WD15EARS - Filesystem ext4 ( not 100% sure )
It's used in a Synology DS110j NAS.
I try to run fsck -p /dev/sdb on the HD and I get this:
Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb:
The superblock... (4 Replies)
Discussion started by: dallasw1983
4 Replies
10. Solaris
So we have a new to us v240 server with no OS installed. It has an outdated version of OB and ALOM so before we install the OS we want to update both. We have a DVD with the latest OB patch burned on it.
We do the boot cdrom command but receive the Bad Magic Number Error. Does an OS need to... (2 Replies)
Discussion started by: dunkpancakes
2 Replies
LEARN ABOUT FREEBSD
badsect
BADSECT(8) BSD System Manager's Manual BADSECT(8)
NAME
badsect -- create files to contain bad sectors
SYNOPSIS
badsect bbdir sector ...
DESCRIPTION
The badsect utility makes a file to contain a bad sector. Normally, bad sectors are made inaccessible by the standard formatter, which pro-
vides a forwarding table for bad sectors to the driver. If a driver supports the bad blocking standard it is much preferable to use that
method to isolate bad blocks, since the bad block forwarding makes the pack appear perfect, and such packs can then be copied with dd(1).
The technique used by this program is also less general than bad block forwarding, as badsect cannot make amends for bad blocks in the i-list
of file systems or in swap areas.
On some disks, adding a sector which is suddenly bad to the bad sector table currently requires the running of the standard DEC formatter.
Thus to deal with a newly bad block or on disks where the drivers do not support the bad-blocking standard badsect may be used to good
effect.
The badsect utility is used on a quiet file system in the following way: First mount the file system, and change to its root directory. Make
a directory BAD there. Run badsect giving as argument the BAD directory followed by all the bad sectors you wish to add. (The sector num-
bers must be relative to the beginning of the file system, but this is not hard as the system reports relative sector numbers in its console
error messages.) Then change back to the root directory, unmount the file system and run fsck(8) on the file system. The bad sectors should
show up in two files or in the bad sector files and the free list. Have fsck(8) remove files containing the offending bad sectors, but do
not have it remove the BAD/nnnnn files. This will leave the bad sectors in only the BAD files.
The badsect utility works by giving the specified sector numbers in a mknod(2) system call, creating an illegal file whose first block
address is the block containing bad sector and whose name is the bad sector number. When it is discovered by fsck(8) it will ask ``HOLD BAD
BLOCK ?''. A positive response will cause fsck(8) to convert the inode to a regular file containing the bad block.
DIAGNOSTICS
The badsect utility refuses to attach a block that resides in a critical area or is out of range of the file system. A warning is issued if
the block is already in use.
SEE ALSO
fsck(8)
HISTORY
The badsect utility appeared in 4.1BSD.
BUGS
If more than one sector which comprise a file system fragment are bad, you should specify only one of them to badsect, as the blocks in the
bad sector files actually cover all the sectors in a file system fragment.
BSD
June 5, 1993 BSD