LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2003, 11:04 AM   #1
rberry88
Member
 
Registered: Aug 2003
Location: Arlington Heights, IL USA
Distribution: Fedora Core 1 & WinXP Pro & Gentoo 1.4 & Arch Linux
Posts: 558

Rep: Reputation: 30
Where to start with the kernel??


I have a fresh install of SuSE 8.2 Personal, mainly because I messed up the compiling of a new kernel on my last installation and figured it was a fun learning experience but want to do it right this time.

Here is what I get when I do uname -a and ls -alc, what would be a good recommendation on how to proceed.

------------------------------
linuxxp:/home/rberry88 # uname -a
Linux linuxxp 2.4.20-4GB-athlon #1 Wed Aug 6 18:27:52 UTC 2003 i686 unknown unknown GNU/Linux
linuxxp:/home/rberry88 # uname -r
2.4.20-4GB-athlon
linuxxp:/home/rberry88 # cd /usr/src
linuxxp:/usr/src # ls
. .. packages
linuxxp:/usr/src # ls -alc
total 0
drwxr-xr-x 3 root root 72 2003-09-14 02:46 .
drwxr-xr-x 12 root root 344 2003-09-14 02:50 ..
drwxr-xr-x 7 root root 168 2003-09-14 02:50 packages
linuxxp:/usr/src #
-------------------------------------------

Any advice??

rberry88
 
Old 09-14-2003, 11:33 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
One thing you must do is to make sure that you can always boot the 'previous' kernel in case something goes wrong with the kernel you are working on:

-Making sure you can boot previous, working kernel-

In /boot there should be, among other files, a vmlinuz and a System.map.<number><name>

copy these to vmlinuz.working and System.map.working ('working' is just an example).

If you use grub (suse 8.2 standard) you also need to add this new bootoption in /boot/grub/menu.lst

If you decided to use lilo instead of grub add the extra bootoption in /etc/lilo.conf and run /sbin/lilo to activate.

During reboot there will be an extra option which allows you to boot the 'working' (=previous) kernel.

-New Kernel-

Depending on your own whishes you can do one of the following things:

1) Get a fresh, newer (newest??) kernel from www.kernel.org, untar this in /usr/src

link linux to linux-2.x.y (ln -s linux-2.x.y linux)

You might need to rename /usr/src/linux to /usr/src/linux-2.x.y first.

2) If you like to work on the kernel that Suse provided. Get it of one of the cd's [kernel-source -> The sources of the SuSE kernel] and install it.

Always check the following line in /usr/src/linux/Makefile

export INSTALL_PATH=/boot

If this line is commented out, uncomment it.

If you don't your compiled stuff will be put in / and not in /boot !!
 
Old 09-14-2003, 11:38 AM   #3
rberry88
Member
 
Registered: Aug 2003
Location: Arlington Heights, IL USA
Distribution: Fedora Core 1 & WinXP Pro & Gentoo 1.4 & Arch Linux
Posts: 558

Original Poster
Rep: Reputation: 30
Thanks for getting me started but I have one question before I get too far. I currently don't have a directory in /usr/src/ named linux, should I make one before do anything or will the kernel automatically make a directory??

rberry88
 
Old 09-14-2003, 11:49 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Nope, you don't. Just untar the kernel in /usr/src. There's going to be a new directory in /usr/src. Rename this to kernel-2.x.y (might already have this name) and link this to linux:

cd /usr/src
ln -s kernel-2.x.y linux

And if you are realy new at this stuff, please read the chapters concerning The Linux Kernel (Suse Linux Admin guide [chapter 11 in 8.1 book]).

Or read the HOWTO:
www.tldp.org/HOWTO/Kernel-HOWTO/

Or the smaller very general 'quick-steps':
http://home.frognet.net/~aalug/docs/kernel_comp/

Or, right here at LinuxQuestions.org:
http://www.linuxquestions.org/questi...355#post379355

Last edited by druuna; 09-14-2003 at 12:12 PM.
 
Old 09-14-2003, 12:01 PM   #5
rberry88
Member
 
Registered: Aug 2003
Location: Arlington Heights, IL USA
Distribution: Fedora Core 1 & WinXP Pro & Gentoo 1.4 & Arch Linux
Posts: 558

Original Poster
Rep: Reputation: 30
Thanks for the quick reply, I think I have enough info to get my hands dirty.

rberry88
 
Old 09-14-2003, 12:15 PM   #6
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
One thing I found that is helpful, before you "make menuconfig", look in /boot for some config files. Copy the one that seems most appropriate into your /usr/src/linux directory as .config:

cp /boot/<config file> /usr/src/linux/.config

and then make whatever changes are necessary in menuconfig. I found this useful because if I started afresh with no .config file then the one I subsequently created with menuconfig usually didn't work.
 
Old 09-14-2003, 12:24 PM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
@vasudevadas

Sorry, but this is not the way to do it. Here's a part from the kernel README:

CONFIGURING the kernel:

- Do a "make config" to configure the basic kernel. "make config" needs
bash to work: it will search for bash in $BASH, /bin/bash and /bin/sh
(in that order), so one of those must be correct for it to work.

Do not skip this step even if you are only upgrading one minor
version. New configuration options are added in each release, and
odd problems will turn up if the configuration files are not set up
as expected. If you want to carry your existing configuration to a
new version with minimal work, use "make oldconfig", which will
only ask you for the answers to new questions.

You do need to copy your old config file (/boot/vmlinux.config or /usr/src/linux-2.x.y/.config) to the new location (/usr/src/linux/.config).

Last edited by druuna; 06-18-2011 at 02:15 PM. Reason: testing edit function, nothing has changed
 
Old 09-14-2003, 12:30 PM   #8
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
Oh well, it was the way I did it anyway. If you've never compiled a kernel on that machine before then you're not going to have a .config file around to carry over your configuration from - in that case you *are* going to have to specify everything yourself, which is what caused me problems. Taking an existing configuration file means you start with a configuration that works and modify it as you wish. Rberry, if you feel doubts about my advice you'd best ignore what I just said.

By the way, isn't using "make config" a fairly prehistoric way of configuring your kernel? "make menuconfig" (requires ncurses to be installed) gives you a friendlier menu-driven method, there is also "make xconfig" which gives you a gui-driven method.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start kernel? paschim Linux - Software 6 10-10-2004 07:42 PM
recompiled kernel, but don't want x to start lepricaun Linux - Software 4 05-29-2004 03:07 PM
New kernel won't start TazG Debian 9 04-22-2004 07:07 PM
kernel screwed, start over zigmund555 Slackware 17 10-17-2003 08:25 PM
Kernel pgmg:- how to start ? juby Programming 3 06-05-2003 06:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration