Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Bad Super Block: Magic Number Wrong Post 302116440 by Bynds on Friday 4th of May 2007 12:22:44 AM
Old 05-04-2007
Solution to problem

Hello to all that find this thread through Google :-)

I had a similar problem with my HDD and FreeBSD saying there was a bad superblock.
I followed the first step of the procedure and discovered (to my relief) the backup superblocks.

Once past this point the next reccomendation was to use fsck -b 160 /dev/"my partition"
This doesn't work as FreeBSD's fsck command doesn't acknowledge the -b flag as valid.

The trick is to use fsck_ffs which *does* recognise the -b flag and takes the appropriate action. i.e. fsck_ffs -b 160 /dev/"my partition"

Second tip (don't flame me for it's obviousness, not everyone is a super sysop). Make sure you are have root access otherwise no errors will be corrected.

Third Tip. If it looks like your filesystem is in a really bad way, look at the -y flag in the man page. i.e. read man fsck_ffs looking for -y :-)

I hope this is usefull for anyone else that has the problem.

Cheers,
Neil S Davenport
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Bad magic number in super-block

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

bad magic number

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

Bad Magic Number

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

BAD SUPER BLOCK - Run fsck with alternate super block number

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

solaris error BAD SUPER BLOCK

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

wrong magic number

/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

Bad super block: Magic number wrong

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

Solaris 8.2 Bad magic number

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

Can't repair super block, bad magic number

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

Bad magic number error

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
FSCK_FFS(8)						    BSD System Manager's Manual 					       FSCK_FFS(8)

NAME
fsck_ffs -- Fast File System consistency check and interactive repair SYNOPSIS
fsck_ffs [-adFfPpqUX] [-B byteorder] [-b block] [-c level] [-m mode] [-x snap-backup] [-y | -n] filesystem ... DESCRIPTION
fsck_ffs performs interactive file system consistency checks and repair for each of the file systems specified on the command line. It is normally invoked from fsck(8). The kernel takes care that only a restricted class of innocuous file system inconsistencies can happen unless hardware or software failures intervene. These are limited to the following: Unreferenced inodes Link counts in inodes too large Missing blocks in the free map Blocks in the free map also in files Counts in the super-block wrong These are the only inconsistencies that fsck_ffs in ``preen'' mode (with the -p option) will correct; if it encounters other inconsistencies, it exits with an abnormal return status. For each corrected inconsistency one or more lines will be printed identifying the file system on which the correction will take place, and the nature of the correction. After successfully correcting a file system, fsck_ffs will print the number of files on that file system, the number of used and free blocks, and the percentage of fragmentation. If sent a QUIT signal, fsck_ffs will finish the file system checks, then exit with an abnormal return status. If fsck_ffs receives a SIGINFO signal (see the status argument for stty(1)), a line will be written to the standard error output indicating the name of the device currently being checked, the current phase number and phase-specific progress information. Without the -p option, fsck_ffs audits and interactively repairs inconsistent conditions for file systems. If the file system is inconsis- tent the operator is prompted for concurrence before each correction is attempted. It should be noted that some of the corrective actions which are not correctable under the -p option will result in some loss of data. The amount and severity of data lost may be determined from the diagnostic output. The default action for each consistency correction is to wait for the operator to respond yes or no. If the operator does not have write permission on the file system fsck_ffs will default to a -n action. fsck_ffs has more consistency checks than its predecessors check, dcheck, fcheck, and icheck combined. The following flags are interpreted by fsck_ffs. -a Interpret the filesystem as an Apple UFS filesystem, even if there is no Apple UFS volume label present. -B byteorder Convert the file system metadata to byteorder byte order if needed. Valid byte orders are ``be'' and ``le''. If fsck_ffs is interrupted while swapping the metadata byte order, the file system cannot be recovered. fsck_ffs will print a message in interactive mode if the file system is not in host byte order. -b block Use the block number block as the super block for the file system. Block 32 is usually an alternative super block. -c level Convert the FFSv1 file system to the level level. Note that the level of a file system can only be raised. There are currently five levels defined: 0 The file system is in the old (static table) format. 1 The file system is in the new (dynamic table) format. Such file systems are made by using the -O 0 option to newfs(8). 2 The file system supports 32-bit UIDs and GIDs, short symbolic links are stored in the inode, and directories have an added field showing the file type. This format was introduced in 4.4BSD. 3 If maxcontig is greater than one, build the free segment maps to aid in finding contiguous sets of blocks. If maxcontig is equal to one, delete any existing segment maps. This was the default before NetBSD 2.0. 4 Rearrange the super block to the same layout as FFSv2; disable the rotational layout tables and per cylinder group block totals. Such file systems are made by using the -O 1 option to newfs(8). Note that FFSv2 file systems are always level 4. In interactive mode, fsck_ffs will list the conversion to be made and ask whether the conversion should be done. If a negative answer is given, no further operations are done on the file system. In preen mode, the conversion is listed and done if possible without user interaction. Conversion in preen mode is best used when all the file systems are being converted at once. The output of dumpfs(8) can be examined to determine the format of the file system (``format'' in the second line) and the file system level (``fslevel'' in the sixth line). -d Print debugging output. -F Indicates that filesystem is a file system image, rather than a raw character device. filesystem will be accessed 'as-is', and no attempts will be made to read a disklabel. -f Force checking of file systems. Normally, if a file system is cleanly unmounted, the kernel will set a ``clean flag'' in the file system super block, and fsck_ffs will not check the file system. This option forces fsck_ffs to check the file system, regardless of the state of the clean flag. -m mode Use the octal value mode as the permission bits to use when creating the lost+found directory rather than the default 1700. In particular, systems that do not wish to have lost files accessible by all users on the system should use a more restrictive set of permissions such as 700. -n Assume a no response to all questions asked by fsck_ffs except for 'CONTINUE?', which is assumed to be affirmative; do not open the file system for writing. -P Display a progress meter for the file system check. A new meter is displayed for each of the 5 file system check passes, unless -p is specified, in which case only one meter for overall progress is displayed. Progress meters are disabled if the -d option is specified. -p Specify ``preen'' mode, described above. -q Quiet mode, do not output any messages for clean filesystems. -U Resolve user ids to usernames. -X Similar to -x but uses a file system internal snapshot on the file system to be checked. -x snap-backup Use a snapshot with snap-backup as backup to check a read-write mounted filesystem. Must be used with -n. See fss(4) for more details. The point is to check an internally-consistent version of the filesystem to find out if it is dam- aged; on failure one should unmount the filesystem and repair it. -y Assume a yes response to all questions asked by fsck_ffs; this should be used with great caution as this is a free license to continue after essentially unlimited trouble has been encountered. Inconsistencies checked are as follows: 1. Blocks claimed by more than one inode or the free map. 2. Blocks claimed by an inode outside the range of the file system. 3. Incorrect link counts. 4. Size checks: Directory size not a multiple of DIRBLKSIZ. Partially truncated file. 5. Bad inode format. 6. Blocks not accounted for anywhere. 7. Directory checks: File pointing to unallocated inode. Inode number out of range. Dot or dot-dot not the first two entries of a directory or having the wrong inode number. 8. Super Block checks: More blocks for inodes than there are in the file system. Bad free block map format. Total free block and/or free inode count incorrect. Orphaned files and directories (allocated but unreferenced) are, with the operator's concurrence, reconnected by placing them in the lost+found directory. The name assigned is the inode number. If the lost+found directory does not exist, it is created. If there is insuf- ficient space its size is increased. Because of inconsistencies between the block device and the buffer cache, the raw device should always be used. DIAGNOSTICS
The diagnostics produced by fsck_ffs are fully enumerated and explained in Appendix A of Fsck - The UNIX File System Check Program. SEE ALSO
fss(4), fs(5), fstab(5), dumpfs(8), fsck(8), fsdb(8), newfs(8), reboot(8) BSD
May 14, 2011 BSD
All times are GMT -4. The time now is 08:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy