Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2003 13:09:45 -0500
From:      "JoeB" <barbish@a1poweruser.com>
To:        "Mike Meyer" <mwm-dated-1044370455.459b1d@mired.org>, <bastill@adam.com.au>
Cc:        "Chuck Swiger" <cswiger@mac.com>, "Giorgos Keramidas" <keramida@ceid.upatras.gr>, <freebsd-questions@FreeBSD.org>
Subject:   RE: Fixit instructions
Message-ID:  <MIEPLLIBMLEEABPDBIEGCEOCDEAA.barbish@a1poweruser.com>
In-Reply-To: <15929.15511.113620.677592@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hay aren't you forgetting the most important usage.
Use the fixit cdrom to boot small running FBSD environment so
you can restore your tape backup to the failed hard drive, or dd
your bkup image.

-----Original Message-----
From: owner-freebsd-questions@FreeBSD.ORG
[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Mike Meyer
Sent: Thursday, January 30, 2003 9:54 AM
To: bastill@adam.com.au
Cc: Chuck Swiger; Giorgos Keramidas; freebsd-questions@FreeBSD.org
Subject: Re: Fixit instructions

In <1043907672.3e38c458244c1@webmail.adam.com.au>,
bastill@adam.com.au typed:
> Quoting Mike Meyer <mwm@mired.org>:
> > You don't have to boot the fixit cd - just mount it and look.
I'm sure
> > that what you will find on the CD is a pretty complete FreeBSD
system,
> > with the layout described in the hier man page.
>
> Close, but...
> root@BAPhD ~ #ls /cdrom
> .cshrc          bin             etc             modules
sys
> .profile        boot            filename.txt    proc
tmp
> COPYRIGHT       cdrom.inf       floppies        root
usr
> CVS-REPO        commerce        kernel.GENERIC  rr_moved
var
> README.TXT      dev             mnt             sbin
>
> Note the absence of mnt2 and stand, both of which I was aked to
examine.  Those
> directories are set up on booting the cdrom and entering Fixit
mode.
> bin, sbin and usr/bin on the cd are indeed readable ( and
extensive) directly
> from the CD.

Right. Those aren't on the fixit disk, they are on the root file
system used by the boot process. That's a stripped system file
system
used for installing FreeBSD. It mounts the fixit cdrom to give you
the
rest of the FreeBSD world.

> I don't mean to be difficult or over-demanding about this,
especially to people
> who are offering help, but what I was expecting was trhat some
helpful guru
> would have prepared a "Fixit Handbook" which might have chapters
like "Repairing
> a corrupt partition table" and "Restoring a lost directory" and
...  whatever.
>  Perhaps the book Chuck suggested would do that.

If such a book exists, I don't know about it. Part of the problem is
that the commands for this only exist at two levels: the
straightforward (you want fsck), and the incredibly baroque world of
hex file editors that you're going to point at the disk. One handles
all the cases you are liable to run into in real life. The other
requires an intimate knowledge of the on-disk file structure, and a
hex calculator - and even then what you are doing is incredibly
risky.

> Reading man pages doesn't tell me with any clarity which commands
go with what
> do do something.  One really needs far more knowledge than I have
to make sense
> of it all.

On the other hand, a "reading guide" might do a lot of good, and
makes
a lot of sense. Something that says things like "For problems with
DOS
partitions (aka slices), see fdisk(8), boot0cfg(8) and
/usr/include/sys/disklabel.h. For problems with FreeBSD partitions,
see disklabel(8) and /usr/include/sys/disklabel.h. For problems with
the file system, see fsck(8), /usr/include/ufs/ufs/dinode.h and
/usr/include/ufs/ufs/dir.h."

Come to think of it, about the only reason one should be mounting
the
fixit CDROM is because your root file system is screwed. I think I
just covered everything you need to know about fixing broken file
systems.

The problem is, that's not complete. You may need to know how to
create dev entries - at least on 4.7. You'll want to know about
mount
in order to mount working file systems, and to check the broken file
system once you've fixed it. If the breakage causes you to change
what's mounted where, I tend to fix that in fixit mode with ed, so
you
may want to know about that.

Maybe what's needed is an "Essential BSD commands" handbook entry,
that covers the lists the commands available in Fixit mode that are
actually useful for fixing a broken system?

        <mike
--
Mike Meyer <mwm@mired.org>
http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more
information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MIEPLLIBMLEEABPDBIEGCEOCDEAA.barbish>