Correct steps to recompile kernel

2004-05-20 Thread Stephen Liu
Hi all folks,

FreeBSD 5.2
===

I am trying to learn recompiling kernel. I visited
following link;
http://www.freebsd.org/doc/en_US.IS...g-building.html

But I am still not very clear of the correct steps to
be taken. I suppose taking following steps

# cd /usr/src/sys/i386/conf
# cp GENERIC GENERIC.bak
# cp GENERIC MYKERNEL
# ee MYKERNEL
(modifying the kernel)

# config MYKERNEL
# cd /usr/src/sys/i386/compile/MYKERNEL
(Are the above directories correct???)

# make depend
# make
# make install

check /etc/rc.conf to have the line:
linux_enable=YES
reboot PC

Any further steps needed to be taken thereafter?

If I am wrong please correct me. TIA

B.R.
Stephen Liu

___
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Correct steps to recompile kernel

2004-05-20 Thread Bill Moran
Stephen Liu wrote:
Hi all folks,
FreeBSD 5.2
===
I am trying to learn recompiling kernel. I visited
following link;
http://www.freebsd.org/doc/en_US.IS...g-building.html
But I am still not very clear of the correct steps to
be taken. I suppose taking following steps
# cd /usr/src/sys/i386/conf
# cp GENERIC GENERIC.bak
# cp GENERIC MYKERNEL
# ee MYKERNEL
(modifying the kernel)
This is good ... although making a backup of GENERIC is
somewhat redundant.
# config MYKERNEL
# cd /usr/src/sys/i386/compile/MYKERNEL
(Are the above directories correct???)
# make depend
# make
# make install
This is the _old_ way.  I believe it still works, but I
don't know if it's supported any longer, and besides, it's
just more work than needed.  The docs describe the newer
method, which is
cd /usr/src
make buildkernel KERNCONF=MYKERNEL
reboot to single-user mode
make installkernel KERNCONF=MYKERNEL
reboot
check /etc/rc.conf to have the line:
linux_enable=YES
reboot PC
This is a completely different thing than compiling a kernel.
If you want the linuxulator installed, definately do this,
but it's not really related to building a kernel.
You don't mention if you've updated your source code or not.
Just a warning, if you _did_ update your source code, you need
to remake world as well as the kernel or you'll have trouble.
If you didn't update your source, the steps outlined above
should cover everything.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Correct steps to recompile kernel

2004-05-20 Thread Stephen Liu
Hi Bill,

Tks for your advice.

- snip -
  # cd /usr/src/sys/i386/conf
  # cp GENERIC GENERIC.bak
  # cp GENERIC MYKERNEL
  # ee MYKERNEL
  (modifying the kernel)
 
 This is good ... although making a backup of GENERIC
 is
 somewhat redundant.

Noted with thanks.  But in case of trouble where can I
get the old kernel back.

  # config MYKERNEL
  # cd /usr/src/sys/i386/compile/MYKERNEL
  (Are the above directories correct???)
  
  # make depend
  # make
  # make install
 
 This is the _old_ way.  I believe it still works,
 but I
 don't know if it's supported any longer, and
 besides, it's
 just more work than needed.  The docs describe the
 newer
 method, which is
 
 cd /usr/src
 make buildkernel KERNCONF=MYKERNEL
 reboot to single-user mode
 make installkernel KERNCONF=MYKERNEL
 reboot

Noted with thanks.

  check /etc/rc.conf to have the line:
  linux_enable=YES
  reboot PC
 
 This is a completely different thing than compiling
 a kernel.
 If you want the linuxulator installed, definately do
 this,
 but it's not really related to building a kernel.

Noted.
 
 You don't mention if you've updated your source code
 or not.
 Just a warning, if you _did_ update your source
 code, you need
 to remake world as well as the kernel or you'll have
 trouble.
 If you didn't update your source, the steps outlined
 above
 should cover everything.

No, I am not going to upgrade the kernel, only to
activate SCSI support.  Sorry for not mentioning it on
my first posting.

Tks

B.R.
Stephen

___
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Correct steps to recompile kernel

2004-05-20 Thread Bill Moran
Stephen Liu wrote:
Hi Bill,
Tks for your advice.
- snip -
# cd /usr/src/sys/i386/conf
# cp GENERIC GENERIC.bak
# cp GENERIC MYKERNEL
# ee MYKERNEL
(modifying the kernel)
This is good ... although making a backup of GENERIC
is
somewhat redundant.
Noted with thanks.  But in case of trouble where can I
get the old kernel back.
GENERIC _is_ the old kernel.  That's why it's recommended
never to edit GENERIC, but to always copy it to a new
config file.
Again, it won't hurt anything to back it up ... you can
never have too many backups.
snip
You don't mention if you've updated your source code
or not.
Just a warning, if you _did_ update your source
code, you need
to remake world as well as the kernel or you'll have
trouble.
If you didn't update your source, the steps outlined
above
should cover everything.
No, I am not going to upgrade the kernel, only to
activate SCSI support.  Sorry for not mentioning it on
my first posting.
NP.  I just wanted to bring it up in case.  It's a
fairly common mistake to update ones sources, build a
new kernel without rebuilding world, and then wonder
where all the problems are coming from ;)
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Correct steps to recompile kernel

2004-05-20 Thread platanthera
On Thursday 20 May 2004 18:39, Stephen Liu wrote:
 Hi Bill,

 Tks for your advice.

 - snip -

   # cd /usr/src/sys/i386/conf
   # cp GENERIC GENERIC.bak
   # cp GENERIC MYKERNEL
   # ee MYKERNEL
   (modifying the kernel)
 
  This is good ... although making a backup of GENERIC
  is
  somewhat redundant.

 Noted with thanks.  But in case of trouble where can I
 get the old kernel back.

When you install a new kernel the old one is backed up  
under /boot/kernel.old/
If you can't boot your new kernel, just press '6' in the boot loader 
menu to escape to the loader prompt, and then type

unload 
load /boot/kernel.old/kernel
boot

regards
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]