Livefs/fixit

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu May 20 06:07:57 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/05/2010 21:20:24, Peter Clark wrote:

> I have a amd64 8.0-RELEASE-P2 FreeBSD box. I was building a spam/av
> gateway. Something has happened and there seems to be some OS
> corruption. I am not sure what did it but symlinks all over the system
> seem to be gone. Links like /home pointing at /usr/home. The data is
> still there in /usr/home/user_blah but the link pointing there is gone.
> There could be more issues that I have not discovered yet. I would like
> to repair the base os from the 8.0 DVD. I believe I should use the
> livecd/fixit method. Is this the right way to go about doing this? Are
> there some concise instructions for this? Will this affect the installed
> ports, ie. things like getting rid of all the configs in /usr/local/etc,
> rc.conf, passwd, /etc/groups ? I imagine I will need to reinstall all
> the ports like one would do after a buildworld.

You should be able to fix this without needing to use a livecd, or
overwriting the installation currently on your drive.  So long as you
can get the system up to at least single user mode, and mount all the
partitions, you can build and reinstall the system from source.  Follow
the instructions here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html

You may need to install the system sources -- you can get them from the
installation media, but it's more common to use csup(1).

I'm pretty sure you could use freebsd-update(8) (if that's your
preferred update mechanism) to achieve the same effect, but I don't know
exactly what you'ld have to do to force it to reinstall anything damaged.

Hmmm... if what is happened is that some rogue process has deleted all
of the symbolic links on your system, then the worst problem you'll have
is shared libraries not working correctly.  Most of the rest of the
symlinks in the base system are to do with man pages or locale data,
which you can probably survive without, at least for a while.

You'll also need to fix any installed ports: the simplest way to do that
is to force re-install any of your ports where 'pkg_info -g portname'
indicates there may be a problem.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkv00bkACgkQ8Mjk52CukIy2GACeM+UFjsp8DvWrlwyvZLJd+17t
YRgAoI2M8Lu0aUKuF0rerQreVwCazXs0
=cACK
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list