[nycbug-talk] openbsd -current
Okan Demirmen
okan
Sun Sep 25 21:09:05 EDT 2005
On Sun 2005.09.25 at 16:23 -0400, michael wrote:
> I'm trying to track OpenBSD -current. After rebuilding a few times,
i stick with snapshots - rarely do make build's these days unless i'm
actually testing or doing something(tm).
> I've gotten it down to a short check list. Am I doing this the
> correct/easiest way?
a few minor comments...
>
> 1. run 'get_upgrade'
> (see below: download bsd.rd and etcXX.tgz and untar,
> make pkg_list and delete All pkgs)
see below ....
> 2. reboot and at boot>bsd.rd
> 3. choose (U)pgrade
> 4. at [sets], choose FTP, and at prompts..
> 5. 'ftp2.usa.openbsd.org','pub/OpenBSD/snapshots/i386
> 6. 'Congratulations..', reboot to new kernel
> 7. mergemaster -r -t /root/upgrade/etc/
you can also do this while in the ramdisk kernel:
once the shell is returned to you:
/mnt/usr/sbin/chroot /mnt
TERM=vt220 /usr/local/sbin/mergemaster -r -t /root/upgrade/etc
exit
reboot
the TERM needs to be set for gdiff3(1).
this way, the off chance that you need to reboot again is gone, due to
start-up changes and whatnot.
> 8. put back all known packages
> pkg_add `cat /root/upgrade/pkg_list`
> (this breaks when there is an updated pkg version)
not quite - see below ...
> 9. reboot to fresh current
>
> ->cat bin/get_upgrade
> #!/usr/local/bin/bash
#!/bin/sh
> ################################
> # Prepare to run (U)pgrade
> # directory /root/upgrade already exists.
> ################################
>
> # fetch new bsd.rd
> ################################
> cd /root/upgrade
> ftp ftp://ftp2.usa.openbsd.org/pub/OpenBSD/snapshots/i386/bsd.rd
> cp /root/upgrade/bsd.rd /bsd.rd
>
> # fetch new etcXX.tgz
> ################################
> cd /root/upgrade
> mkdir etc
> cd /root/upgrade/etc
no need to cd
> ftp ftp://ftp2.usa.openbsd.org/pub/OpenBSD/snapshots/i386/etc*.tgz
> tar -xzf etc38.tgz
tar zxvhpf etc38.tgz -C /root/upgrade/etc
(-p is the important one.)
> # make pkg_list and delete ALL
> ################################
> pkg_info | awk '{print $1}' > /root/upgrade/pkg_list
> pkg_delete -q /var/db/pkg/*
no need. once you've booted into the new environment:
pkg_add -u
(if you are < sept 4th (-u will print you one command to update all the
packages - cut-n-paste....if you are running anything past sept 4th, -u
will do it for you.)
now for the daring, and *unsupported* way, you can do in place snapshot
updates as well....so as not to complete encourage it, see the
install/upgrade script to see how it is done directly within the ramdisk
(hint: 2-4 line script snippet). warning, this is not offically
supported, for something sometimes need to be in addition, such as
running MAKEDEV and such, which the ramdisk-based upgrade does for
you/etc/etc/etc.....but for the daring and willing...
okan
More information about the talk
mailing list