recovery after power outage
Pieter de Goeje
pieter at degoeje.nl
Thu Feb 8 11:52:28 UTC 2007
On Thursday 08 February 2007 03:08, Marty Landman wrote:
> On 2/7/07, Pieter de Goeje <pieter at degoeje.nl> wrote:
> > ad1s1c is a partition that contains the entire disk or slice in this
> > case. Dangerously dedicated is when you have no slices: ad1a, ad1b, ad1c
> > etc. You
> > should _only_ fsck the individual partitions (ad0s1a), never the complete
> > disk (ad0) or individual slices (ad0s1). You may risk destroying your
> > filesystem(s) if you do so. Unless ofcourse you know what you're doing
> > and you have placed a filesystem directly on either the disk or the slice
> > it self.
> I see, thanks for explaining that. If I can recover this disk then I'll
> partition it into a couple of slices and mount each of those instead of
> what I was now doing.
> > /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused)
> > Yes, ad1s1c is normally not used as a filesystem, so you would better not
> > fsck
> > it.
> Oops, then what can I do?
Well it looks like fsck detected it and didn't do any harm here. I'm not
really sure though.
> > Also it won't reboot now, although I've run fsck complete including on
> > > ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good
> > > boot? Unfortunately /usr isn't getting mounted and I have not editor
> > > available afaik.
> > It should not be necessary to edit /etc/fstab. However after what you've
> > described above it might be necessary to restore the partition table, mbr
> > and
> > slice table to get your system booting again.
> Could you please be more explicit Pieter? I don't know how to do any of
> that. Yikes!
If the slice and partition table are still intact (as they were before the
outage), a normal fsck -F on /dev/ad1s1a will get the pc booting again. You
can do this from a FreeBSD live cd such as FreesBIE or the fixit cd. You can
then fsck the the rest of the filesystems in single user mode. You may also
want to use the live CD to backup the important bits before, ehm, further
corrupting/restoring the filesystems. ;)
If the above doesn't work, probably something in either your slice table or
partition table is wrong. If you have dedicated the entire disk to FreeBSD
during the installation process, and chose the default disk layout, it should
be possible to regenerate both using sysinstall (the freebsd installer) from
the FreeBSD CD. However, if you made changes to the default setup, and you do
not remember exactly what they were, and you do not have a backup of the
output of "bsdlabel ad1s1" things will get really tough here.
In any case, I think you'll find the last section of
a useful read on FreeBSD disk organisation.
Pieter de Goeje
More information about the freebsd-questions