NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: patching for 2010-002: I feel like an idiot, but this isn't working
On Thu, Mar 11, 2010 at 6:16 PM, Anne Bennett
<anne%porcupine.montreal.qc.ca@localhost> wrote:
> (lots of other stuff deleted for brevity by Andy)
> And how would I figure out which branch to track?
See, you already sound like you're ahead of me in many (most?)
respects. I just know this one particular thing.
General life lesson type thoughts:
Self doubt is a good thing, it keeps you fresh. You're doing fine, don't worry.
Nobody can know everything about everything. I think there are only a
handfull of people who can answer every question you have about
NetBSD. The rest of us wing it and hope that the documentation is good
enough.
Back to NetBSD rambling by me:
You have to decide what branch you want to follow based on what you're
doing. Take note that the "base" branch is frozen, it never changes.
The 3 digit release ones (5-0-2 for example) don't change much either,
and I don't even really bother with them. If you're using those, you
are probably following binary distributions and maybe patching once in
a while if you can't stand downtime (sounds like your situation). I
have no idea what the 2 digit ones are for, but you could probably
find out here:
http://www.netbsd.org/releases/release-map.html
Once again, even if you are managing hundreds of servers, I would
probably still follow the netbsd-5 branch if I was doing what you're
doing. This is really stable stuff, unless maybe you're using bleeding
edge functions in which case you're going to have instability no
matter what you do until it settles out.
Find a directory somewhere, then do this stuff to track the netbsd-5 branch:
mkdir src tools obj (<--- tools and obj to store stuff when building kernels)
cvs -d :pserver:anoncvs%anoncvs.netbsd.org@localhost:/cvsroot checkout -PA
-rnetbsd-5 src (<--- for initial download of src dir)
cvs -d :pserver:anoncvs%anoncvs.netbsd.org@localhost:/cvsroot update -PAd
-rnetbsd-5 src (<--- to keep source dir updated)
Notes:
The initial download is called "checkout". "update" is what you do to
keep it current.
Substitute :pserver:anoncvs%anoncvs.netbsd.org@localhost:/cvsroot for a mirror
near you, if you like.
Standard disclaimer: everything is configurable and you can only know
what to do if you read all the man pages and docs :) But this should
work
You slightly misunderstood what I do. What I do is I make sure my
netbsd-5 tree is up to date, then I edit the kernel config file and
build the toolchain and kernel like this:
cd src
./build.sh -T ../tools -O ../obj tools
./build.sh -u -T ../tools -O ../obj kernel=CONFIG
cd ../obj/sys/arch/<arch>/compile/CONFIG/
ls -l netbsd
-rwxr-xr-x 1 whoever whoever 4778224 Jan 14 11:31 netbsd
And there it is. I put copy the old one to netbsd.old, and put the new
one in place, then reboot to make sure it works (since the userland
is older than the kernel, it will be compatible). Then go to a
netbsd-5 branch directory on the ftp server and download an install
kernel, for example this one:
ftp://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-5/201003110000Z/i386/binary/kernel/netbsd-INSTALL_FLOPPY.gz
(Make sure you pick a directory that is older than the cvs update you
did to the source tree. You don't want to build a kernel from source
downloaded on Tuesday and then take a daily build from Thursday since
that is going to be newer than the kernel you built)
Then I gunzip it and stick it in the / and rename it to "netbsdi".
Making a backup now would be a good idea. If you're not intimately
familiar with recovering from backups, become familiar. It's not
really all that difficult once you understand disks...
Reboot, then stop the bootloader and give it this:
boot hd0a:netbsdi
And there you go, a nice NetBSD install kernel is running and you can upgrade.
You need to take note of the ftp directory you got the install kernel
from (write it down if you have to) and pass it into the ftp
information when it comes time to download sets. Unfortunately the
install kernels are not aware of which directory they came from on the
FTP server so they don't automatically know where to download the sets
that were built at the same time.
Play with this on a test system. I think you'll pick it up in a short
period of time. And if not, I'll help you out. I've been doing this a
while now. I don't claim to be that smart about it, I just know this
works. I've had a set of NetBSD server machines on various
architectures running constantly since about 2002 with few problems
that I can't blame on shoddy hardware :)
Andy
Home |
Main Index |
Thread Index |
Old Index