# Alternate Superblocks - location & use



## jaymax (May 3, 2014)

_I am r_unning 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`

```
** /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

```
super-block backups (for fsck -b #) at:
192, 1282688, 2565152, 3847680 ... more than 60 listed
```

`fsck -b 12825152 /dev/ada2`:

```
fsck: illegal option --b
```

Instead _I_ tried `fsck_ffs -b 12825152 /dev/ada2`:

```
12825152 is not a file system superblock
```

_I r_epeated 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!


----------



## wblock@ (May 3, 2014)

Do you really have only a filesystem on /dev/ada2 with no partition table at all?


----------



## jaymax (May 3, 2014)

There are five partitions*.* `gpart show ada2` revealed:

```
(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'.


----------



## kpa (May 4, 2014)

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`


----------

