On Sat, 4 Apr 2009, x x wrote:
> Is it ok to do cp bsd.rd bsd.mp, or should I do mv bsd.mp bsd, what is
> the best way to make .mp the default boot kernel?
I keep these kernels handy:
bsd.sg
bsd.mp
bsd.rd
(bsd.rd is handy to boot when one wants to "do strange things" to
one's root partition. It is nice to boot bsd.rd single-user.)
To decide which one to boot by default, I use:
ln /bsd.mp /bsd # don't use -s for this, please
Using a hard link avoids problems involved with cp.
The problems with cp arise should the system crash or the file system
be corrupted at an inopportune time during the cp.
But I actually use ln because I use small root partitions, and am
stingy with disk space. Some newbies fear ln because it is not
present in inferior file/operating systems. But ln is ancient in
Unix, and is your friend. Soft links are a little goofy, and are
the mother of tricks and confusion, but the hard link is simple and
clean. A hard link is just another directory entry pointing to the
same inode, and can be done very cleany (I hesitate to say "atomically",
but if not atomic, it is as close to that as it can get).
Should one build one's own kernel, the "official" Makefile installs
the new kernel in / with:
(The current working directory is something like
/usr/src/sys/arch/i386/compile/GENERIC.MP, note that.)
rm -f /obsd
ln /bsd /obsd
cp bsd /nbsd
mv /nbsd /bsd
This is the "official" safe way.
if / has bsd.sg, bsd.mp and bsd.rd in it, then the equivalent would be
cd /
rm -f obsd
ln /bsd /obsd # (presumably, /bsd exists )
cp /bsd.mp /nbsd
mv /nbsd /bsd
This might be described as the "belt and suspenders" method.
Dave
--
The problem with socialism is that you eventually
run out of other people's money.
-- Margaret Thatcher
_______________________________________________
Openbsd-newbies mailing list
[email protected]
http://mailman.theapt.org/listinfo/openbsd-newbies