What is the canonical method for upgrading from 2.0 to 2.0.2?
-Peter
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de
Or get the binaries and extract them
cd /tmp
ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/i386/binary/sets/
bi
prompt
mg *tgz
bye
rm etc.tgz
for i in *tgz
do
tar xpfz $i -C /
done
Then get or compile your kernel...
> What is the canonical method for upgrading from 2.0 to 2.0.2?
This is how I did it (from the sources):
cd /usr/src
cvs update -dPA -r netbsd-2-0
cd /usr/xsrc
cvs update -dPA -r netbsd-2-0
cd /usr/src
./build.sh -uxE -D / build
cd sys/arch/i386/conf
config GENERIC
cd ../compile/GENERIC
make dependall install
sh /usr/src/etc/postinstall fix
reboot
--
> Martti Kuparinen wrote:
> > Peter I. Hansen wrote:
> >
> >> What is the canonical method for upgrading from 2.0 to 2.0.2?
> Or get the binaries and extract them
>
> [...]
>
> Then get or compile your kernel...
It should be noted that it's generally a bad idea to upgrade userland
before upgrading the kernel, albeit it should not matter between 2.0
and 2.0.2.
- Klaus
So, you recommend the reverse method of the one Martti use? :
cd /usr/src
cvs update -dPA -r netbsd-2-0
cd /usr/xsrc
cvs update -dPA -r netbsd-2-0
cd sys/arch/i386/conf
config GENERIC
cd ../compile/GENERIC
make dependall install
cd /usr/src
./build.sh -uxE -D / build
sh /usr/src/etc/postinstall fix
reboot
-Peter
> So, you recommend the reverse method of the one Martti use? :
It's not quite "reverse", but... :-) Some nits:
> cd /usr/src
> cvs update -dPA -r netbsd-2-0
> cd /usr/xsrc
> cvs update -dPA -r netbsd-2-0
While I'm at it, note that this won't get you the 2.0.2 release but
the latest from the netbsd-2-0 branch. This shouldn't matter much
and even is convenient when building from source since the changes
will consist of bug fixes only, but if it's the netbsd-2-0-2-RELEASE
tag which you should check out if you really need 2.0.2.
> cd sys/arch/i386/conf
> config GENERIC
> cd ../compile/GENERIC
> make dependall install
(Or obtain the binary from the release sets.)
I'd throw in a "reboot" here.
> cd /usr/src
> ./build.sh -uxE -D / build
(Or install the binary sets.)
Alternatively, you could do
$ cd /usr/src
$ ./build.sh kernel=GENERIC
and copy the resulting kernel manually.
Cheers, Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
>>Or get the binaries and extract them
>>
>>cd /tmp
>>ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/i386/binary/sets/
>> bi
>> prompt
>> mg *tgz
>> bye
>>
>>rm etc.tgz
>>for i in *tgz
>>do
>> tar xpfz $i -C /
>>done
>>
>>Then get or compile your kernel...
>
>
> I'm a bit confused here. You prefer compiling the new kernel as
> the last step. I know it should not make a big difference when
> it's only from 2.0->2.0.2, but there must be a 'best way' of
> doing things...
My mistake: always compile a new kernel (or install it from the
binary sets), reboot and install (or compile) everything else.
Martti
I'm a bit confused here. You prefer compiling the new kernel as
the last step. I know it should not make a big difference when
it's only from 2.0->2.0.2, but there must be a 'best way' of
doing things...
-Peter
ok, so I would want to get kern-GENERIC.tgz, unpack and copy it
to root?
But, is operation not included in your recipe above, where you
get fetch all the binary sets?
-Peter
>>>>ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/i386/binary/sets/
> ok, so I would want to get kern-GENERIC.tgz, unpack and copy it
> to root?
> But, is operation not included in your recipe above, where you
> get fetch all the binary sets?
Mistake #2: the kernel images are fetched as well and the for loop
in fact extracted all kernels (so you end up having GENERIC_TINY).
Just make sure you extract the correct kernel:
tar xpfz kern-GENERIC.tgz -C /
Martti
In other words a complete upgrade with the GENERIC kernel would
be made with:
cd /tmp
ftp
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/i386/binary/sets/
bi
prompt
mg *tgz
bye
rm etc.tgz kern-GENERIC.MP.tgz kern-GENERIC_*.tgz
for i in *tgz
do
tar xpfz $i -C /
done
If this is correct, it could easily be run as an upgrade script.
I'm attempting to do my first upgrade via source, too. I've put
together the following steps that I found by doing searches through
the mail archives, the Handbook, Google, and /usr/src/UPDATING.
My machine is currently rebuilding the userland stuff, so I'm not far
into the steps. However, I fully intend to follow through (unless
someone finds a glaring problem with these directions.)
I've already checked out the netbsd-2 branch into /usr/src. Once the
source has been updated, build the tools and a new kernel:
# mkdir /usr/obj
# cd /usr/src
# ./build.sh tools kernel=GENERIC
Now rebuild the userland (replace ${TOOLDIR} with the directory that
was built in the previous step. On my system, it turned out to be
"/usr/obj/tooldir.NetBSD-2.0.1-i386" -- I'm assuming the 2.0.1 portion
of that directory is an oversight when 2.0.2 was released.):
# ./build.sh -U -T ${TOOLDIR} -D /usr/i386build distribution
Next, install and boot the new kernel to make sure things work:
# cd /usr/src/sys/arch/i386/compile/GENERIC
# make install
# shutdown -r now
If the kernel looks good, install the userland that was built in the
earlier steps.
# ./build.sh -u -U -T ${TOOLDIR} -D /usr/i386build install=/
The install finishes by running postinstall to test whether things are
out of date. It'll generate a list of "broken" things. Run the
following command, substituting the list given by the postinstall
command:
# /usr/src/etc/postinstall -s /usr/src -d <LIST OF BROKEN THINGS>
Reboot the machine!
If you have a custom kernel, you can replace GENERIC with your custom
kernel name.
If anyone thinks there's a problem with any of these steps, please let
me know. I'll follow-up to this post if the steps change.
--
Rich
AIM : rnezzy
ICQ : 174908475
Rich Neswold --> netbsd-help (2005-04-15 09:52:50 -0500):
> # /usr/src/etc/postinstall -s /usr/src -d <LIST OF BROKEN THINGS>
either remove -d (defaults to / then), or specify a destdir.
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
--
On 4/15/05, Rich Neswold <rich.n...@gmail.com> wrote:
> # /usr/src/etc/postinstall -s /usr/src -d <LIST OF BROKEN THINGS>
# /usr/src/etc/postinstall -s /usr/src/etc -d / fix <LIST OF BROKEN THINGS>
> cd /tmp
> ftp
> ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/i386/binary/sets/
> bi
> prompt
> mg *tgz
> bye
Could be shortened to:
cd /tmp
ftp
wget ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/i386/binary/sets/*tgz
rm etc.tgz kern-GENERIC.MP.tgz kern-GENERIC_*.tgz
for i in *tgz
do
tar xpfz $i -C /
done
Just a simpler way of doing things,
--Alex Cavnar
Yes. This would make a shorter script, but then you would have
to install wget. I know wget is a small package, but still.
The more important thing is to get the procedure verified. For
example; there is no postinstall in this, and I'm not sure how
that works. Specially since that seems to come with etc, and we
delete that here.
I will have to try this out on a test-PC, before I gamble with
my production system.
Can I be absolutely sure that there are no changes in etc?
-Peter
To summarize:
With the good advice I got here I've tested the following method
for doing a binary upgrade from 2.0 to 2.0.2
http://xbase.dk/~pih/howto/netbsd_update_release_bin.php
This worked out quite fine for me on two machines.
Thanks to the people who helped out on this.