The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > BSD
.
google unix.com



BSD BSD, sometimes called Berkeley Unix, is a Unix operating system developed by the Computer Systems Research Group of the UC Berkeley.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Mandriva: Updated kernel packages fix security issues iBot Security Advisories (RSS) 0 06-12-2008 06:30 PM
Need help on Kernel Configuration for FreeBSD Enoch Chan BSD 3 09-08-2004 03:32 PM
Some FreeBSD issues cbkihong UNIX for Dummies Questions & Answers 16 06-15-2003 02:06 AM
snort installation on freebsd issues xyyz UNIX for Advanced & Expert Users 13 02-09-2003 11:11 PM
FreeBSD 4.7 X issues - assistance req'd please Calum UNIX Desktop for Dummies Questions & Answers 1 02-03-2003 08:16 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-03-2008
drbabbers drbabbers is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 2
FreeBSD - Kernel Queries/Issues

All,

I am a bit of a BSD newbie and haven't really played with it for years, but I have had a recent situation whereby someone attempted to load a custom kernel module and ended up breaking my BSD server.

I managed to fix it by doing the following:

Booting into loader mode:

unload
set kernel="kernel.old"
boot-conf

When I do this the server boots fine and I have a working kernel as follows:

bash-2.05b# uname -a
FreeBSD mrslim 5.4-RELEASE FreeBSD 5.4-RELEASE #2: Fri Oct 31 15:51:10 GMT 2008 root@mrslim:/usr/obj/usr/src/sys/SMP i386

Here are the avaliable kernels:

bash-2.05b# cd /usr/src/sys/i386/conf/
bash-2.05b# ls -al
total 82
drwxr-xr-x 2 root wheel 512 Oct 31 14:55 .
drwxr-xr-x 13 root wheel 512 Jun 21 2005 ..
-rwxr-xr-x 1 root wheel 10005 Oct 31 16:13 GENERIC
-rwxr-xr-x 1 root wheel 1982 Apr 1 2004 GENERIC.hints
-rwxr-xr-x 1 root wheel 9966 Jun 21 2005 KERNEL-MOD1
-rwxr-xr-x 1 root wheel 120 Feb 26 2003 Makefile
-rwxr-xr-x 1 root wheel 33699 May 1 2005 NOTES
-rwxr-xr-x 1 root wheel 469 Jul 13 2004 OLDCARD
-rwxr-xr-x 1 root wheel 1754 Apr 30 2005 PAE
-rwxr-xr-x 1 root wheel 322 Feb 6 2005 SMP
-rwxr-xr-x 1 root wheel 9986 Oct 31 14:59 TOMHKERNEL

I have attempted to complie GENERIC, which seemed to work successfully.

make buildkernel KERNCONF=MYKERNEL

make installkernel KERNCONF=MYKERNEL

When the server is rebooted, none of the network cards are avaliable, the only way round this problem is to go into the loader and do what I mentioned above. I have troubleshooted the network setup and everything is fine, although I can't ping the default gateway, but I am convinced this is caused by my friend not installing his custom module correctly, as everything work perfectly with the current loaded kernel.

Can anyone tell me how I can resolve this issue? It seems I just need the current loaded kernel to be made as the default. I want to be able to restart the server and not have to worry about this failing over and over.. I just want my working setup to be restored permanently!

Thanks in advance.

-D
  #2 (permalink)  
Old 11-03-2008
drbabbers drbabbers is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 2
I think I may have found a way to do this:

'The kernel does not boot:

If your new kernel does not boot, or fails to recognize your devices, do not panic! Fortunately, FreeBSD has an excellent mechanism for recovering from incompatible kernels. Simply choose the kernel you want to boot from at the FreeBSD boot loader. You can access this when the system boot menu appears. Select the “Escape to a loader prompt” option, number six. At the prompt, type unload kernel and then type boot /boot/kernel.old/kernel, or the filename of any other kernel that will boot properly. When reconfiguring a kernel, it is always a good idea to keep a kernel that is known to work on hand.'

Is this what I should do to get this current kernel set as the default? Or shall I just get a new copy of the GENERIC kernel and start again with the recompile? The reason I say this is that the GENERIC kernel has been broken.
  #3 (permalink)  
Old 11-03-2008
ataraxia's Avatar
ataraxia ataraxia is offline
Registered User
  
 

Join Date: Oct 2008
Location: Pittsburgh
Posts: 6
You can just rename /boot/kernel to something else (I'd do something like /boot/kernel.bad) and then rename /boot/kernel.old back to /boot/kernel.
  #4 (permalink)  
Old 11-04-2008
_R3d _R3d is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 73
did you try running sysinstall to reconfigure your network cards?
this has happened to me before and i ran sysinstall was able to set up my cards and everything worked fine.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0