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
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
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
2. UNIX for Advanced & Expert Users
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
3. UNIX for Dummies Questions & Answers
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
4. BSD
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
5. UNIX for Dummies Questions & Answers
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
6. Web Development
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
7. UNIX for Dummies Questions & Answers
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
8. BSD
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
9. 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
10. BSD
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
SEM(4) BSD Kernel Interfaces Manual SEM(4)
NAME
sem -- POSIX semaphores
SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file:
options P1003_1B_SEMAPHORES
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
sem_load="YES"
To load the driver as a module at run-time, run the following command as root:
kldload sem
DESCRIPTION
The sem facility provides system calls used by the standard C library (libc) to implement POSIX semaphores. This facility offers support for
such functions as sem_init() and sem_wait(). It is available both as a kernel option for static inclusion and as a dynamic kernel module.
SEE ALSO
sem_destroy(3), sem_getvalue(3), sem_init(3), sem_open(3), sem_post(3), sem_wait(3), config(8), kldload(8), kldunload(8)
HISTORY
The sem facility appeared in FreeBSD 5.0.
BSD
February 7, 2014 BSD