Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jul 2003 11:03:50 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        LLeweLLyn Reese <llewelly@lifesupport.shutdown.com>
Cc:        hackers@freebsd.org
Subject:   Re: complicated downgrade
Message-ID:  <20030720080350.GN350@straylight.oblivion.bg>
In-Reply-To: <x33ch2o6uf.fsf@lifesupport.shutdown.com>
References:  <20030718091248.GO76126@lucky.net> <x33ch2o6uf.fsf@lifesupport.shutdown.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--iVCmgExH7+hIHJ1A
Content-Type: text/plain; charset=windows-1251
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 19, 2003 at 08:48:40AM -0700, LLeweLLyn Reese wrote:
> Valentin Nechayev <netch@lucky.net> writes:
> [snip]
> > 8. Disable all processes except sshd and run the following (saying gene=
rally):
> >=20
> >    for D in /bin /sbin /etc /boot /usr/bin /usr/sbin /usr/lib /usr/libe=
xec \
> >             /usr/libdata /usr/share /usr/local /var/db
> >    do
> >        mv ${D} ${D}5
> >        mv ${D}4 {D}
> >    done
> [snip]
>=20
> Once you mv /usr/lib /usr/lib5, dynamicly linked executables will be
>     broken, until you mv /usr/lib4 /usr/lib (I think). I think it
>     would be a good idea check every tool you think you might need,
>     and build a staticly linked executable if the existing executable
>     isn't. Most of what you need will be staticly linked by default,
>     but e.g. sshd, ftp, find, vim, are not. (If all goes as planned,
>     you won't need any of those while /usr/lib is being moved, but
>     ... ) (Caveat: this isn't based on experience with freebsd, it's
>     based experience with linux boxen, where *everything* is typically
>     staticly linked, unless someone rebuilt tools.)

This thought occurred to me too; actually, you could get around this
problem by rebuilding the whole FreeBSD base system with purely static
binaries.  This could be done by putting NOSHARED=3Dyes in /etc/make.conf,
then going through the buildworld/buildkernel/installkernel/installworld
dance.  You might have to do this for your 5.x world, reboot with the
statically-linked binaries (just in case), build the 4.x world with
NOSHARED=3Dyes before the downgrade, do the downgrade (without having to
worry about any dynamic libs), then, when the 4.x system is working
(hopefully), rebuild the 4.x world without the NOSHARED=3Dyes setting.

Note that a NOSHARED world tends to take up quite a bit more space :)

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net    roam@sbnd.net    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I've heard that this sentence is a rumor.

--iVCmgExH7+hIHJ1A
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/Gkzm7Ri2jRYZRVMRAhnbAJ9iHLgaY35Si9gDyfp1zDKDfBgyeQCeOXXL
KOBF6V1nTA/LxBAQw7ddLLs=
=vO+J
-----END PGP SIGNATURE-----

--iVCmgExH7+hIHJ1A--



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