NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: problem updating NetBSD via source
http://www.netbsd.org/docs/current/
This works for me, always. I have upgraded several systems, several
times from STABLE to CURRENT using this method.
Updating an existing system (top
<http://www.netbsd.org/docs/current/#faq>)
/Please remember to check src/UPDATING
<http://cvsweb.NetBSD.org/bsdweb.cgi/src/UPDATING> for the latest changes./
1. From the root of the source tree:
$ cd /usr/src
2. Build the toolchain:
$ ./build.sh -O ../obj -T ../tools -U -u tools
3. Build the distribution:
$ ./build.sh -O ../obj -T ../tools -U -u distribution
4. Build the kernel:
$ ./build.sh -O ../obj -T ../tools -U -u kernel=GENERIC
5. Install the kernel:
$ cd ../obj/sys/arch/<ARCH>/compile/GENERIC
$ su
# mv /netbsd /netbsd.old
# cp netbsd /netbsd
6. Reboot into the new kernel:
# shutdown -r now
7. Install the new userland:
$ cd /usr/src
$ su
# ./build.sh -O ../obj -T ../tools -U install=/
8. Follow the instruction in the output for fixing obsolete files,
for example:
# /usr/src/usr.sbin/postinstall/postinstall -s /usr/src -d // fix
defaults mtree obsolete
9. Update <http://www.netbsd.org/docs/current/#etcupdate> /etc:
# /usr/sbin/etcupdate -s /usr/src
10. Optionally reboot to ensure all running services are using the new
binaries:
# shutdown -r now
In this example, the |-u| option indicates an update process, and the
|-U| option allows the entire build by a non-root user followed with an
install by root.
The build order (tools, distribution, kernel) is chosen to optimize the
time for updating the source whenever problems occur. To ensure
consistency, the process should be restarted from the beginning in the
case of errors/cvs updates.
Regards,
Stevie Lancaster wrote:
On Jun 08 16:07, Christian Baer wrote:
--------- snip -----------
built a new userland:
./build.sh -U distribution (in /usr/src, not as root)
./build.sh kernel=GENERIC
I ran into the first problems there because build.sh couldn't find any
tools. The same thing happens BTW. if I type the command just like in the
guide. So I did a
./build.sh tools
--------- snip ------------
Hi Chris,
There is a very useful explaination in the NetBSD guide on netbsd.org:
http://netbsd.org/docs/guide/en/chap-updating.html.
For example, it recommends the following to build the userland (I always do a
mkdir /usr/obj and /usr/tools before):
./build.sh -O ../obj -T ../tools -U -u distribution
But on the other hand, I never switched from stable to current.
Hope I could help a little bit.
Have a nice day!
Home |
Main Index |
Thread Index |
Old Index