FreeBSD - Kernel Queries/Issues


 
Thread Tools Search this Thread
Operating Systems BSD FreeBSD - Kernel Queries/Issues
# 1  
Old 11-03-2008
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  
Old 11-03-2008
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  
Old 11-03-2008
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  
Old 11-04-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. BSD

FreeBSD DHCP wpa_supplicant Wi-Fi Issues

I just got FreeBSD up and running with an XFCE desktop on an old Gateway laptop. It works great, except the wireless setup is scaring me. I can connect to my home WiFi fine most of the time, but I'm concerned about other WiFi that I will need to connect to away from home. I understand that I can... (1 Reply)
Discussion started by: BrentBANKS
1 Replies

2. AIX

Networking Issues - Opera, FreeBSD, AIX

(1) Hi, Am working on FreeBSD 7.4/i386 and installed Opera 11.01 through ports collection manually... But when I run first time am getting "opera: cannot connect X server. Error: Unknown error: 0" What is this error all about???? Please help me to sort out this issue!!! (2) Hi, currently am... (12 Replies)
Discussion started by: Priya Amaresh
12 Replies

3. BSD

FreeBSD AMD NFS over TCP issues

Hi! I have a major issue with FreeBSD 7.1 i386. We did a change in our Unix env where we exchanged home storage from a NetAPP running udp to a NetAPP running tcp. Now I cant mount homedirs since NFS/AMD seem to fallback to udp :( Trying to force it with amd options nfs_proto=tcp and so on. ... (0 Replies)
Discussion started by: Esaia
0 Replies

4. UNIX for Dummies Questions & Answers

Resolved: htpasswd issues (-b) on FreeBSD

I wrote a script to batch-create directories with .htaccess and .htpasswd files. I am using the following line to create the .htpasswd file: htpasswd -cb .htpasswd $USER $PASS However, I keep getting this message in return: Usage: htpasswd passwordfile username The -c flag creates a new... (1 Reply)
Discussion started by: Spetnik
1 Replies

5. Web Development

Using IP.Board on FreeBSD, having SQL/Apache Issues

Server: FreeBSD 7.2-RELEASE MYSQL Version: MYSQL 5.1.36 PHP Version: 5.2.10 (apache2handler) IP.Board Version: v3.0.2 Safe Mode: OFF For the most part previously IP.Board, forum software, has run fine without any issues. Regular web pages and .php pages seem to load fine without any issues.... (2 Replies)
Discussion started by: Dark Severance
2 Replies

6. UNIX for Dummies Questions & Answers

How to read freebsd kernel source?

I got the freebsd kernel source from the first install CD(in directory:\7.0-RELEASE\src\),isn't right? if so,how can i read it? Is there any tools? (4 Replies)
Discussion started by: zhouq3132
4 Replies

7. BSD

Need help on Kernel Configuration for FreeBSD

Does anyone know how to enter the Kernel Configuration program in FreeBSD before installation to resolve conflicts of hardware?:confused: (3 Replies)
Discussion started by: Enoch Chan
3 Replies

8. UNIX for Dummies Questions & Answers

Some FreeBSD issues

I have been using Linux for 3 years now, and I think I am getting enough knowledge (and confidence) to try some more 'traditional' unix variants. I installed FreeBSD 5.0-CURRENT. I have a couple of questions for the time being: 1) Frequently when I need to compile software packages they can't... (16 Replies)
Discussion started by: cbkihong
16 Replies

9. UNIX for Advanced & Expert Users

snort installation on freebsd issues

i'm following the, "How to setup and secure Snort, MySQL and Acid on FreeBSD 4.6 Release" off of the snort.org website. in the documentation it says snort should be installed through the following: ----- make -DWITH_MYSQL -DWITH_FLEXRESP ; make install ----- later it says to do the... (13 Replies)
Discussion started by: xyyz
13 Replies

10. UNIX Desktop Questions & Answers

FreeBSD 4.7 X issues - assistance req'd please

question: i just installed FreeBSD 4.7 on my laptop, when i log in as root, i can startx no problem at all but when i try to start it as a user, i can't. otiginally it told me i needed to be a member of the group 'wheel' to do startx, no problem, added myself in /etc/group, but for some reason i... (1 Reply)
Discussion started by: Calum
1 Replies
Login or Register to Ask a Question