Lost /var Cannot find file system superblock

So my laptop running FreeBSD 8.3 froze yesterday.

I had to hold the power button and force a reboot.

I go into single user mode
# fsck -y

I received this:
Code:
** /dev/ad4s1d
Cannot find file system superblock
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ufs: /dev/ad4s1d: can't read disk label

So it appears my /var directory became corrupt. What is the best way for me to handle this relabel the slice or something else?
 
Not enough ideas here, but in the exact same situation (maybe) I mtree'd a new var
Code:
 /etc/mtree/BSD.var.dist
... the command was not at this machine, so I don't remember it exactly. (and maybe copied files to it from another v9 or backup)
and mounted it under / (root). But maybe your var error is
from a missing bsdlabel, or similar, and not an actual hardware fault.
 
Just remembered that I reinstalled /var/db/pkg by importing a local.sqlite from a similar setup (/ports-mgmt/pkg/)and
Code:
pkg which /usr/local/bin...
pkg which /usr/local/sbin...
installed ports which were already in /usr and only "somewhat" fully installed.
 
what happens if you tell fsck to use an alternate superblock?
e.g. fsck -b 32 ...

Of course if the disk label is really clobbered... well try to relabel the disk. You *do* have a backup listing or knowledge of the original slicing, yes?
 
I will try the alternate superblock. I do have a backup but I was hoping to see if there were alternatives. I will give that a try. Thank you.
 
Well it looks like things did not go well. I did an alternate superblock but it basically failed again. So I am going to replace the drive. I am glad I had backups. However I was bummed because I wanted to see if this could be fixed without replacing the drive. No such luck.
 
Back
Top