tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: compile kernel
Date: Fri, 1 Jul 2016 01:36:39 +0000
From: Philo <philo.netbsd%free.fr@localhost>
Message-ID: <5775C927.9020300%free.fr@localhost>
| which entry into the boot.cfg file for booting of my new kernel,
A new one you put there (probably).
| if i understand the PHILONEW kernel is
| /noyau/src/sys/arch/i386/compile/obj/PHILONEW/netbsd !
| But how to add of boot menu ?
With an editor...
| I must do an mv command ?
Yes, do that first. mv or cp.
| but is not a file is a directory with lot of objects !
Yes. PHILONEW is a directory, One of the files in the directory will be
"netbsd" (you gave that name just above) - that is the one you move (or copy)
to /netbsd.name (you can all it anything you like, except perhaps /netbsd
as that would overwrite your current working kernel). Everything else in
that directory is just a file used to create "netbsd", and can be deleted
if you like once you have netbsd moved out (but not deleting them will make
it much quicker to build the kernel next time if you need to make some small
change.)
That is, for example, you can do
cp /noyau/src/sys/arch/i386/compile/obj/PHILONEW/netbsd /netbsd.new
The file ("netbsd.new") has to be in the root filesystem, and perhaps in the
root directory ("/") (I have never bothered looking to see if it is possible
to boot a file from a directory other than / but I expect it should work.)
Once you have it there, and you are rebooting, you can boot it, by selecting
the "Drop to boot prompt" menu entry, and then typing "boot netbsd.name"
(the same file name as you called it when you moved, or copied, it earlier,
if you used my example, it would be "boot netbsd.new"). This is the quickest
way if you are only going to do this once.
Or you can add a new entry in /boot.cfg - just copy an existing line,
rename the file that is booted, and change the menu string (to anything you
like) (and avoid making the new one the first "menu=" line in the file,
as that is usually the default, and you want that to be one that you know
works - like the existing /netbsd). Then select the new menu entry (which
you recognise as it has the menu string you just gave it) when you are booting.
As an example, your boot.cfg file might (after you have changed it) start:
menu=Boot normally:rndseed /etc/entropy-file;boot netbsd
menu=Boot single user:rndseed /etc/entropy-file;boot netbsd -s
menu=Boot PHILONEW kernel:rndseed /etc/entropy-file;boot netbsd.new
(followed by the rest of the original file). Here I copied the first line,
put the copy as line #3 ((the old line #3 stays and becomes #4 etc - I did
not show that here) changed the boot file name in the copied line to be
"netbsd.new" and the menu entry from "Boot normally" to "Boot PHILONEW kernel"
- the names and strings can be anything you like - the file name just must be
the same as the name you copied or moved the new kernel to.
You can add an extra entry to boot your new kernel in single user mode if
you like, or to boot it while disabling ACPI or SMP (or both). Just don't
add so many menu entries that they won't fit on the screen...
kre
Home |
Main Index |
Thread Index |
Old Index