全部博文(68)
分类: BSD
2005-06-27 10:48:21
What follows are the steps I used to upgrade my FreeBSD 5.3 system to FreeBSD 5.4-RELEASE; I can't guarantee that they'll work for everyone, but this should be at least a good starting point.
N.B. I only install the "base" "dict", "doc", and "manpages" distributions here -- I don't want the "catpages", compat, "games", "info", "ports", "proflibs", or "src" distributions. If you want a different set of distributions, change the lists in steps 6, 9, and 10.
cd /usr/ports/security/freebsd-update && make install clean cp /usr/local/etc/freebsd-update.conf.sample /usr/local/etc/freebsd-update.conf
freebsd-update -v IDS | tail +8 | grep . | cut -c 2- - > /root/base-modified
ee /root/base-modified(or use vi or any other text editor you have installed.)
cut -f 1 -d '$' /usr/local/freebsd-update/work/md5all | uniq | while read X; do if [ -f $X ]; then echo $X; fi; done | sort > /root/base-old
fetch -o /usr/disc1.iso ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/5.4/5.4-RELEASE-i386-disc1.iso mdconfig -a -t vnode -f /usr/disc1.iso -u 9 mount -t cd9660 -o ro /dev/md9 /mnt
mkdir /usr/release for dist in base dict doc manpages; do cat /mnt/5.4-RELEASE/${dist}/${dist}.?? | tar -xpzf - -I /root/base-modified -C /usr/release done 2>/dev/null
grep ^etc /root/base-modified | while read f; do diff -u /${f} /usr/release/${f} done | more
xargs chflags noschg < /root/base-old
for dist in base dict doc manpages; do /mnt/rescue/cat /mnt/5.4-RELEASE/${dist}/${dist}.?? | /mnt/rescue/tar -Uxpzf - -X /root/base-modified -C / done
( for dist in base dict doc manpages; do cat /mnt/5.4-RELEASE/${dist}/${dist}.?? | tar -tzf - done; cat /root/base-modified ) | sort | uniq | lam -s '/' - > /root/base-new comm -13 /root/base-new /root/base-old | xargs rm
umount /mnt mdconfig -d -u 9 rm -r /usr/release rm /usr/disc1.iso rm /root/base-modified /root/base-old /root/base-new
shutdown -r now
From: