The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > 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
max number of slabs per kernel module (kernel 2.6.17, suse) Brendan Kennedy Linux 4 01-23-2008 05:40 AM
kernel-kernel call communication aureliano High Level Programming 5 06-05-2007 02:48 PM
Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU dave043 Linux 2 05-09-2007 10:57 PM
How to convert a partition usin 64 bits kernel to 32 bits kernel? GEIER AIX 1 01-30-2006 01:47 AM
2.4.9 Linux Kernel & PCMCIA Wireless Problems Neo UNIX for Advanced & Expert Users 1 08-19-2001 12:18 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-18-2005
Registered User
 

Join Date: Apr 2005
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Kernel Problems

Hey guys, I have installed Freebsd 5.3 Release, and I can't compile my custom kernel. I even tried compile the Generic kernel to see if I had some error in my custom kernel, and that didn't compile either. The Freebsd FAQ pages states one solution would be to "re-fetch the source tree". How is that done? Thanks in advanced for you help.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-19-2005
Sergiu-IT's Avatar
Registered User
 

Join Date: Mar 2005
Location: Transilvania
Posts: 125
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Wink

Hi !
What exactly did you tryed ? It never happend to me to fail compiling the kernel... how did you tryed to compile it ?
I usualy compile it like this:

1. cd /usr/src/sys/i386/conf/
2. cp GENERIC newKernel
3. vi newKernel (and edit to fit my options)
4. config newKernel
5. cd ../compile/newKernel/
6. make depend
7. make
8. make install clean

Try this steps. It's the most easyest way to compile the kernel. If it's not working, post here the errors you get and we'll figure it out ;-)
Good luck !
Bye !
Reply With Quote
  #3 (permalink)  
Old 04-19-2005
Registered User
 

Join Date: Apr 2005
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Thanks Sergui-IT. I tried those steps and it failed on step 7 in your previous list, "make". The error was "End of file not found". Can you tell me how to re-fetch the source tree, and what exactly does that mean? Thanks alot.
Reply With Quote
  #4 (permalink)  
Old 04-19-2005
Sergiu-IT's Avatar
Registered User
 

Join Date: Mar 2005
Location: Transilvania
Posts: 125
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Hi !
Have you tried to compile a new version of the kernel ? Or the kernel that came with your install CD ? Anyway, the problem seems to be in one of the files... try to reinstall the sources from your install CD. If you are new and you don't want to do something complicate simply try the sysinstall command (as root). It's a very easy-to-use interface for installing packages. The same you used when you installed FreeBSD. You'll have the install menu and select from the packages the kernel sources to install.
Another option, fetching the source tree, it's a little more complicated and... not so good. At least, I don't like it This is how I'm doing this:

1. Create a "supfile" that contains something like this :
Code:
*default host=cvsup.ro.FreeBSD.org
*default base=/usr
*default prefix=/usr/ncvs
*default compress
*default release=cvs tag=.
*default delete use-rel-suffix

src-sys
2. Create the /usr/ncvs directory
3. Go into the directory where your supfle is and try : cvsup -g -L 2 supfile. This will download (fetch) the last kernel source tree to your computer and will put it in /usr/ncvs. After that, you have to do the normal compilation (config newKernel, make depend, make, make install clean) with your new fetched kernel source.
You should also take a look at this links:
http://www.freebsd.org/doc/en_US.ISO...nelconfig.html (for more details on kernel build)
http://www.freebsd.org/doc/en_US.ISO...ook/cvsup.html (for using cvsup)

Well... I hope this helps... sorry for my bad english, it's not my native language
Good luck !
Bye-Bye!
Reply With Quote
  #5 (permalink)  
Old 04-20-2005
Registered User
 

Join Date: Apr 2005
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Thanks alot Sergui-IT. I re-installed from the installation CD and everything seems to be working now. Thanks again.
Reply With Quote
  #6 (permalink)  
Old 05-19-2005
Registered User
 

Join Date: May 2005
Location: GBG Sweden
Posts: 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Hey, I'm also having a problem with my custom kernel.
After the #cd ../compile/mykernel (some say newkernel) the make depend commando fails. It tells me that it's missing a header file, I think it was called miibus or something. And the installation aborts. Any ideas?

I'm also using the FreeBSD 5.3 release, I tried to reinstall all the packages already.
Reply With Quote
  #7 (permalink)  
Old 05-21-2005
Sergiu-IT's Avatar
Registered User
 

Join Date: Mar 2005
Location: Transilvania
Posts: 125
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by Zenter
Hey, I'm also having a problem with my custom kernel.
After the #cd ../compile/mykernel (some say newkernel) the make depend commando fails. It tells me that it's missing a header file, I think it was called miibus or something. And the installation aborts. Any ideas?

I'm also using the FreeBSD 5.3 release, I tried to reinstall all the packages already.
Hi !
Well... I do have an ideea
miibus is required for some network cards to work. On the original GENERIC file you can find something like this:
Code:
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device          miibus          # MII bus support
Probably when you "customized" your kernel for compilation, you deleted the "device miibus" line, but you leaved support for some network card that requires miibus. Try to insert the "device miibus" line in your file. It will probably work without any problems...
Good luck !
Reply With Quote
  #8 (permalink)  
Old 06-11-2005
Registered User
 

Join Date: Jun 2005
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Hi !
Have you tried to compile a new version of the kernel ? Or the kernel that came with your install CD ? Anyway, the problem seems to be in one of the files... try to reinstall the sources from your install CD. If you are new and you don't want to do something complicate simply try the sysinstall command (as root). It's a very easy-to-use interface for installing packages. The same you used when you installed FreeBSD. You'll have the install menu and select from the packages the kernel sources to install.
Another option, fetching the source tree, it's a little more complicated and... not so good. At least, I don't like it This is how I'm doing this:

1. Create a "supfile" that contains something like this :
Code:

*default host=cvsup.ro.FreeBSD.org *default base=/usr *default prefix=/usr/ncvs *default compress *default release=cvs tag=. *default delete use-rel-suffix src-sys


2. Create the /usr/ncvs directory
3. Go into the directory where your supfle is and try : cvsup -g -L 2 supfile. This will download (fetch) the last kernel source tree to your computer and will put it in /usr/ncvs. After that, you have to do the normal compilation (config newKernel, make depend, make, make install clean) with your new fetched kernel source.
You should also take a look at this links:
http://www.freebsd.org/doc/en_US.IS...rnelconfig.html (for more details on kernel build)
http://www.freebsd.org/doc/en_US.IS...book/cvsup.html (for using cvsup)

Well... I hope this helps... sorry for my bad english, it's not my native language
Good luck !
Bye-Bye!
Reply With Quote


*default host=cvsup.ro.FreeBSD.org
*default base=/usr
*default prefix=/usr/ncvs
*default compress
*default release=cvs tag=.
*default delete use-rel-suffix

src-sys



I think you misadvice by asking the user to fetch the latest branch of development of FreeBSD who is not useable for production or for normal user.

I think what you wanted to do is to let him fetch the release version of FreeBSD or at least the stable release.

To achieve this just replace the following line :

(wrong line)
*default release=cvs tag=.

(good line)
*default release=cvs tag=RELENG_5_3 (if you would like by example for 5.4 you would put RELENG_5_4 and so one) if you want the latest releng of 5 you would put only 5 if you put . you will fetch the latest development release (last night workable build source)


usually people put as default prefix is in /usr/src instead of /usr/ncvs


cvs is as my opinion the best way to do update and keep your system accurate. If you follow and know what you are doing cvs is really a good tools. It's easy to use but have some pitfall like the default release tag.

you can update your ports with cvs too,

to install cvs just go in /usr/ports/net/cvsup-without-gui and make install && make clean
you will get cvsup working (take some time to compile need lot of dependancy)

after that in /usr/local/share/examples you will have some example config file, i suggest you to use the default example file like stable-supfile and ports-supfile as beginning config file.

you will only need to change the server to connect to fetch your source tree and the default release tag, you can put other options but just keep it simple for now after good reading on http://www.freebsd.org/handbook you will be enought confident to add some options at your convenience.

same thing for the ports supfile you only have to change the default server



after you could read about how to automate the whole system to auto upgrade using crontab (you will have to manually update the source system OS but for the ports it's easy to manage and can be fully automate).

to update yoru system you could go read teh handbook searching for makeworld

you can update the whole system by recompiling the fresh download source tree with cvs using makeworld.

usually it's 5 steps easy to follow

compile the source tree
compile the kernel
install the fresh compiled kernel
(reboot to load the new kernel)
install the fresh compiled source tree
merge your config file with the new from the source (to avoid delete all your config file you edited before the update) this way you can keep your config file up to date without having to reconfigure your whole setting.

it's all explain very well in the handbook.


I suggest you to read the whole handbook before asking, your question was fully detailed in the handbook and the handbook is maintain as it is really easy to read and understand same for newbie. I started reading the handbook few years ago and i continu to read it when i have problem it solves 90% of my problem. I ask only for particular project setting but never to maintain or administer my system

Feel free to ask if you are not certain how do do, i know how sometime we can feel unconfident when we are doing new thing and we are not sure if we follow exactly the doc or if we misunderstood something that put us in the wrong way.



ShadowLight
shadowlight@syrs.com
www.linu-z.net
Reply With Quote
  #9 (permalink)  
Old 06-11-2005
Registered User
 

Join Date: Jun 2005
Posts: 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
For the Kernel problem,

I invite you to read the handbook on http://www.freebsd.org/handbook

search for kernel

read the doc about how to compile your kernel, i suggest you to start with the generic just to understand how it works after you could easily edit the generic and compile it. if something goes wrong you know it's because of your change.

to fix your corruption problem i suggest you to do :

cd /usr/src
make clean

cd /usr/src/i386/sys/conf/
edit your kernel

mkdir /root/kernel
mv yourkernel /root/kernel/
ln -s /root/kernel/yourkernel /usr/src/i386/sys/conf/
(this will create a link to your kernel file this way you just have to edit the file in your root directory to get it edit in the src directory. The compile system will follow the symlink and all will be fine) (tricks to make administration easier).


after taht just compile your kernel.
i think it could be a good idea too to do a make clean in your /usr/src/i386/sys/conf/ just to be sure the clean will not affect only the os source but the kernel source too.

The make clean just clean up the compile process (it doesn't touch the source file) it just delete the last compile binary or what we name build source. You will just start again from scratch as if you never did a make buildkernel before



One more thing : when you begin do not try to delete anything from generic kernel file, you don't know what is necessary, just add don't delete stuff. You will get your life better. Deleting stuff doesn't get you any better performance anyway (or not anything that you can see or not enought for all the problem you will get trying to delete stuff). The generic is kinda already a minimal kernel for normal operation.



ShadowLight
Unix Administrator Syrius-Network
shadowlight@syrs.com
www.linu-z.net
Reply With Quote
Google UNIX.COM
Reply

« Java | BSD Links »
Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop boot: cannot open kernel/sparcv9/unix command copy/move folder in unix couldn't set locale correctly curses.h cut command in unix daemon process find grep find mtime find null character in a unix file grep multiple lines grep or grep recursive hp-ux ifconfig inaddr_any inappropriate ioctl for device lynx javascript mailx attachment mget mtime perl array length ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp script snoop unix stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix internals unix interview questions unix mtime unix simulator unix.com vi substitute while loop within while loop shell script


All times are GMT -7. The time now is 01:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101