LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-01-2004, 09:07 AM   #1
svarreby
Member
 
Registered: Nov 2003
Location: Hudiksvall, SWEDEN
Distribution: Slackware 10.1
Posts: 70

Rep: Reputation: 15
Kernel Compile basics


I have read the guides in this forum but I seem to be slow, or the authors assume something that I don't know.

Before I go thru all the make commands I'll have to put the kernel source (2.6.0) in the right place a.k.a replace the old one ... what commands do I write for make this happen?

PS I have unpacked the kernel under /tmp/linux-2.6.0

Where do I go from there
 
Old 01-01-2004, 09:54 AM   #2
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
You really don't "remove" the old kernel source...rather create a new sym link to the new source. Unpack the new source to /usr/src

You then have a new directory for the source.../usr/src/linux-2.6.0 or similar.
Then just remove the existing /usr/src/linux link...


cd /usr/src
rm -f linux

Then create a new link to the new source...

ln -s linux-2.6.0 linux

Then you can descend into the linux directory and start the config/compile process.

cd /linux
(or you can provide the entire path)
cd /usr/src/linux

Make sense?
 
Old 01-01-2004, 11:00 AM   #3
svarreby
Member
 
Registered: Nov 2003
Location: Hudiksvall, SWEDEN
Distribution: Slackware 10.1
Posts: 70

Original Poster
Rep: Reputation: 15
I have followed all the descriptions here (and in DaOne's tutorial). Everything is alright - no error messages during the whole process.

When I reboot I can't see any lines in LILO besides the old kernel (2.4.22). The 2.6.0 entry does'nt show up at all. What could have gone wrong?
 
Old 01-01-2004, 11:23 AM   #4
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Did you properly edit /etc/lilo.conf? Also, did you run make install or manually copy the new kernel and System.map to /boot. If you ran make install, did you remember to first uncomment line 450 in /usr/src/linux/Makefile? Lastly, if you manually copied your new kernel image and System.map to /boot, did you run /sbin/lilo afterwards?

These are the only things off the top of my head that should cause what you described...
 
Old 01-01-2004, 11:29 AM   #5
brokenflea
Member
 
Registered: Nov 2003
Distribution: Slackware 11.0, FreeBSD
Posts: 284

Rep: Reputation: 30
i had the exact same problem and i wasn't compiling it right. here's the guide i used to compile my kernel.

move your kernel source into /usr/src:

mv linux-2.6.0.tar.gz /usr/src

cd /usr/src

tar -zxvf linux-2.6.0.tar.gz

rm /usr/src/linux

ln -s /usr/src/linux-2.6.0 /usr/src/linux

cd linux

make menuconfig

If you are running X-Windows you may want to run xconfig (or gconfig in gnome) for the nice graphical interface instead of menuconfig.
When finished exit and save the new configuration.

make bzImage
make modules
make modules_install

cp arch/i386/boot/bzImage /boot/vmlinuz-2.6
cp Sytem.map /boot/Sytem.map-2.6
rm /boot/System.map
ln -s /boot/System.map-2.6 /boot/System.map
pico -w /etc/lilo.conf OR vi /etc/lilo.conf ( whichever editor you're comfortable with)


# Linux bootable partition config begins
***********(change your existing info to this)*********
image = /boot/vmlinuz-2.6
root = /dev/hda1
label = Linux-2.6
read-only
Where /dev/hda1 is the location of your boot partition.

/sbin/lilo -> run this to commit changes to your boot loader

If no errors occur then you should be ready to reboot and start using your new kernel!
 
Old 01-01-2004, 11:32 AM   #6
brokenflea
Member
 
Registered: Nov 2003
Distribution: Slackware 11.0, FreeBSD
Posts: 284

Rep: Reputation: 30
and also, instead of doing tar -zxvf linux-2.6.0.tar.gz do :

tar -jxvf linux-2.6.0.tar.bz2

i think the source file is in bz2 format, so use this command instead of the one that i just posted.
 
Old 01-01-2004, 12:08 PM   #7
svarreby
Member
 
Registered: Nov 2003
Location: Hudiksvall, SWEDEN
Distribution: Slackware 10.1
Posts: 70

Original Poster
Rep: Reputation: 15
Thank you guys for your input !!

I am getting closer now. When I reboot and choose the 2.6.0 entry there's a kernel panic message:

VFS: Unable to mount root fs on hda2

Is there something I have forgot when I was browsing in menuconfig ???
 
Old 01-01-2004, 12:26 PM   #8
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
What filesystem are you using - did you include support? - actually just post the full contents of lilo.conf and the output of

fdisk -l


Last edited by Skyline; 01-01-2004 at 12:33 PM.
 
Old 01-01-2004, 12:56 PM   #9
svarreby
Member
 
Registered: Nov 2003
Location: Hudiksvall, SWEDEN
Distribution: Slackware 10.1
Posts: 70

Original Poster
Rep: Reputation: 15
Here's my output of "fdisk -l"

/dev/hda1 1 243 82 Linux SWAP
/dev/hda2 * 244 2675 83 Linux
/dev/hda3 2676 14593 83 Linux

and here's "lilo.conf"

boot = /dev/hda

image = /boot/vmlinux-2.6.0
root = /dev/hda2
label = 2.6.0
read-only
image = /boot/vmlinuz.old
root = /dev/hda2
label = 2.4.22
read-only
 
Old 01-01-2004, 01:27 PM   #10
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Type 83 is reiser...make sure you have support for reiserfs in your kernel.
 
Old 01-01-2004, 01:31 PM   #11
svarreby
Member
 
Registered: Nov 2003
Location: Hudiksvall, SWEDEN
Distribution: Slackware 10.1
Posts: 70

Original Poster
Rep: Reputation: 15
OK, I'll check it out ... but before I do anything ... how do I check that
Should I run menuconfig or ...
 
Old 01-01-2004, 01:36 PM   #12
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Quote:
Originally posted by svarreby
OK, I'll check it out ... but before I do anything ... how do I check that
Should I run menuconfig or ...
Yes, just cd /usr/src/linux and run make menuconfig.
Check it out, and see what you have. You'll have the option to or not save the configuration when you exit. If you made no necessary changes, choose no...if you found what you need and made the proper changes, save the config. You'll want to re-compile afterwards "IF" you made and saved changes.
 
Old 01-01-2004, 03:48 PM   #13
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Rep: Reputation: 15
Quote:
Originally posted by svarreby
OK, I'll check it out ... but before I do anything ... how do I check that
Should I run menuconfig or ...
This should lists the filesystem currently supported by your current kernel:
Quote:
bash# cat /proc/filesystem
Hope this help ..
 
Old 01-01-2004, 04:54 PM   #14
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Slight correction...

cat /proc/filesystems
 
Old 01-02-2004, 01:11 PM   #15
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Rep: Reputation: 15
Oppss...

Anyway, thanks for your kindly correction...human error, copy and paste..
 
  


Reply



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
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
Kernal Compile Basics NinjaMidget Linux - Newbie 4 05-23-2005 12:29 AM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM
Kernel Basics darkfnord Linux - Newbie 3 11-21-2002 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:41 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
Open Source Consulting | Domain Registration