Alternate Superblocks - location & use

I am running FreeBSD 9.2 on an i386 platform.

I had cause to add hardware, an additional EIDE drive, a SATA controller and SATA drives. /etc/fstab apparently reshuffled and culled. The system booted w/ with a mountroot prompt. I was able to mount root from lsdev information and a shell provided. Now I am having a superblock problem with fsck on storage disk(s) attached.

# fsck -y -t ufs /dev/ada2
Code:
** /dev/ada2
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ufs: /dev/ada2: can't read disk label
I then ran newfs -N to print out file parameters and to find other super-block alternates. # newfs -N /dev/ada2 produced disk geometry parameters and
Code:
super-block backups (for fsck -b #) at:
192, 1282688, 2565152, 3847680 ... more than 60 listed

fsck -b 12825152 /dev/ada2:
Code:
fsck: illegal option --b

Instead I tried fsck_ffs -b 12825152 /dev/ada2:
Code:
12825152 is not a file system superblock

I repeated with several other numbers presented by newfs and obtained the same results. However, running fsck on partitions on disk ran OK or were made CLEAN.

Any suggestions/solutions would be welcomed.

Thanks!
 
There are five partitions. gpart show ada2 revealed:
Code:
    (i)   1- freebsd-boot          [ada2p1]
   (ii)   3- freebsd-ufs and      [ada2p2;ada2p4;ada2p5 ]
  (iii)   1- freebsd-swap          [ada2p3]
slices; and as I mentioned earlier, fsck -y on these ran 'clean' or were made 'clean'.
 
You have to run fsck(8) and other tools that operate on filesystem on a device node that represents a partition, not the whole disk.

For example:

fsck -y /dev/ada2p2
 
Back
Top