LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-08-2007, 12:01 AM   #526
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53

If you know, what you want and need, don't put anything in modules. Everyting will be loaded when kernel boots up. Less hassle. And you can practice with 2.4 first with removing unneeded things and compiling right ones into. When you get it, you can use this info on 2.6 kernel.
 
Old 05-08-2007, 12:26 AM   #527
Slack1_more
Member
 
Registered: Sep 2004
Location: Australia
Distribution: Slackware 10.0, 10.1, 11. and now 12!
Posts: 54

Rep: Reputation: 16
Exclamation Going from 2.4 to 2.6

Quote:
Originally Posted by Alien_Hominid
If you know, what you want and need, don't put anything in modules. Everyting will be loaded when kernel boots up. Less hassle. And you can practice with 2.4 first with removing unneeded things and compiling right ones into. When you get it, you can use this info on 2.6 kernel.
I have one reservation about your suggestion, Alien_Hominid, that you cannot just put exactly the same 'things' as you call them into 2.6. There are significant differences between the two releases of the kernel, and this type of advice is not very helpful, when you put it like that .
However the general concept is correct, and I agree that with to-day's average PC RAM being 1GB, there doesn't seem to be much point in using modules, certainly not for file systems and other fundamental services anyway .

That's my worth...(that should have been 5 cent's worth, but maybe it's not worth more than one cent anyway..)
 
Old 05-08-2007, 12:12 PM   #528
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I agree. I don't think you can easily use the config from a 2.4.x kernel for a 2.6.x kernel. They are very different. Start with a 2.6.x if you want a 2.6.x kernel.

I don't think it matters too much whether you build things into the kernel or as modules. It may actually be best to compile most device drivers as modules and the rest built-in, because if there is a conflict among device drivers, you have to re-compile to fix it That's what I had to do several times.

So, I say build everything into the kernel, except things in the device drivers section (where possible).
 
Old 05-15-2007, 06:46 PM   #529
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
There is make oldconfig for this case but I wasn't talking about this thing. I was talking about the info which you got about your hardware from 2.4 kernel. You can use this info in 2.6

For example, you notice that your hdd is connected through sata (using ide-sata) in 2.4, now you can use this info in 2.6 selecting scsi-sata, because you know that you need sata. Same goes for network cards, graphics support, etc...



And what happens if you compiled as module and need net access during boot . You need initrd, which means more problems. That's why I said to compile as built-in only these drivers that you know should work.

My

Last edited by Alien_Hominid; 05-15-2007 at 06:52 PM.
 
Old 05-24-2007, 02:14 PM   #530
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
Quote:
Originally Posted by Datamike
After all, each time I compile and install, I copy the same files to the same places. No need to run lilo.
Uh oh. The files may be in the same places in the file system, but they won't be in the same places on the hard disk. During the first stages of booting, the Linux file system is not available, so you need to inform lilo of where certain files are on the disk. Run lilo always. E.g., even if you always call your current boot kernel "bzImage" and always put it in /boot, if you've put a new file there without re-running lilo, on the next boot, the kernel will be looked for where the previous "bzImage" file was stored on the hard disk.
 
Old 06-03-2007, 05:28 AM   #531
amar_akshat
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
hey I have been compiling kernels in slackware since long and the best thing i have noticed about compiling kernels above 2.6.0 is that the processor default is not ever set what we have .. and so we always go wrong .. even

before saving the .config file its wise enough to pay attention to the processor thing and vary the networking details!!
Try once ..
 
Old 06-06-2007, 12:50 AM   #532
winfinit
Member
 
Registered: Jul 2006
Location: FL, Delray Beach
Distribution: Slackware11, LFS
Posts: 67

Rep: Reputation: 15
not sure why people are making a rocket science out of kernel compilation, below steps will help you to create a second bootable kernel, so just in case you will get kernel panic you can still come back to your old kernel and recompile 2.6.x

EVERYTHING IS DONE THROUGH SHELL

1. download new kernel source (at this moment 2.6.21)

curl http://www.kernel.org/pub/linux/kern...-2.6.21.tar.gz -o linux-2.6.21.tar.gz

2. extract this newly downloaded source

tar -xzvf ~/linux-2.6.21.tar.gz

3. move this kernel to your /usr/src/ dir

mv ~/linux-2.6.21 /usr/src/linux-2.6.21

4. change symbolic link for @linux to linux-2.6.21 in /usr/src/

cd /usr/src/
rm /usr/src/linux
ln -s /usr/src/linux-2.6.21 linux

*5. if you dont want to build your kernel from scratch then follow this step, otherwise skip it

cp /boot/config /usr/src/linux/.config (now if you have config-2.6.x in /boot directory use that one instead of just 'config')

cd /usr/src/linux
make oldconfig

(now this will image your old kernel, and since in new kernel developers added new drivers and features, it will ask you what do you want to do with those features Y- to install M-to make it as a module N-ignore if you will answer N to all of those new features you should be safe, you can just experiment your self, nothing in there that you can select, that will brake your system)


6. compiling KERNEL (assuming your current directory is /usr/src/linux/)

make bzImage
(it will take a while so you can start watching a movie or something )
make modules
make modules_install

7. copying images (assuming your current directory is /usr/src/linux/)

cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.21
cp System.map /boot/System.map-2.6.21
cp .config /boot/config-2.6.21

8. add newly created image into your boot loader (i am including instructions only for lilo, since that is the one that i use, sorry grub users )

add this entry in your /etc/lilo.conf

all the way to the buttom place

image=/boot/vmlinuz-2.6.21
root=/dev/sda1
label=linux-2.6.21
read-only


#then save this file close it, once you are back at shell type

lilo

Added Linux*
Added Linux-2.6.21

#if it didnt then read through above instruction once again, because you messed up somewhere

9. Reboot your computer and select new option from your lilo "linux-2.6.21"


THE END

NB!!!
1. if you are using ipw2200 or any intel wireless card, and you installed firmware, ieee80211, and ipw drivers, they will have to be reinstalled, so you have to rerun make for ieee80211 and ipw2200+, also make sure that firmware is in place.

2. if you are using SATA make sure you are selected proper SATA controller from your kernel "make menuconfig" Device Drivers -> Serial ATA (prod) -> Your Controller . also make sure that you are including it into your kernel and not making it as a module, otherwise you will get an error message at boot that is saying that kernel cannot mount your drive. (we are not gonna go into initrd)





-------------------
Penguin Powah

Last edited by winfinit; 06-15-2007 at 03:40 PM.
 
Old 06-24-2007, 01:06 PM   #533
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Rep: Reputation: 51
Hey all, I have an extremely strange problem with putting in the 2.6.21.4 kernel on my Slack 11 desktop. Basically I have done all the dirty work with no fuss (except I did get a few warnings during the compilation). I opened up my lilo.conf and I editted things to support the new kernel and of course ran lilo and it indeed showed that the new entry was added. BUT when I reboot, it still shows my old options. The newly compiled kernel is not listed at the boot menu. Any ideas?
 
Old 06-24-2007, 02:35 PM   #534
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
Quote:
Originally Posted by Basslord1124
Hey all, I have an extremely strange problem with putting in the 2.6.21.4 kernel on my Slack 11 desktop. Basically I have done all the dirty work with no fuss (except I did get a few warnings during the compilation). I opened up my lilo.conf and I editted things to support the new kernel and of course ran lilo and it indeed showed that the new entry was added. BUT when I reboot, it still shows my old options. The newly compiled kernel is not listed at the boot menu. Any ideas?
Are you sure you edited /etc/lilo.conf correctly? I.e. added both the entries 'image =' and 'label =' for your new kernel?

What's the output of
Code:
uname -r
Cheers, Leon.

Last edited by BroX; 06-24-2007 at 02:37 PM.
 
Old 06-24-2007, 03:00 PM   #535
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Rep: Reputation: 51
Quote:
Originally Posted by LJSBrokken
Are you sure you edited /etc/lilo.conf correctly? I.e. added both the entries 'image =' and 'label =' for your new kernel?

What's the output of
Code:
uname -r
Cheers, Leon.
uname -r shows the old kernel version 2.4.33.3

And here is how my lilo.conf file. First one listed is obviously the newer kernel and the old one is listed below it.

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda3
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
#Linux 2.6 kernel
image = /boot/vmlinuz-2.6.21.4
 root = /dev/sda3
 label = Linux_2_6
 read-only
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda3
  label = Linux
  read-only
#Windows
other = /dev/hdb1
  label = Windows
  table = /dev/hdb
# Linux bootable partition config ends
 
Old 06-24-2007, 05:01 PM   #536
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
Strange... what's the output of
Code:
lilo -v
 
Old 06-24-2007, 05:36 PM   #537
Basslord1124
Member
 
Registered: Jun 2004
Location: KY
Distribution: Debian, Mint, Puppy
Posts: 507

Rep: Reputation: 51
Quote:
Originally Posted by LJSBrokken
Strange... what's the output of
Code:
lilo -v

Code:
root@chris-desktop-1:/home/chris# lilo -v
LILO version 22.7.1, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2005 John Coffman
Released 17-Sep-2005 and compiled at 00:33:53 on Aug  8 2006.

Warning: LBA32 addressing assumed
Reading boot sector from /dev/sda3
Warning: Partition 3 on /dev/sda is not marked Active.
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

Boot image: /boot/vmlinuz-2.6.21.4
Added Linux_2_6 *

Boot image: /boot/vmlinuz -> vmlinuz-ide-2.4.33.3
Added Linux

Boot other: /dev/hdb1, on /dev/hdb, loader CHAIN
Added Windows

Writing boot sector.
/boot/boot.0803 exists - no boot sector backup copy made.
Hmm that's strange....appears like it did something though. Not sure what it all means. I am actually quite new to kernel stuff...know a fair share of Linux administration tools and such, but know very little about the kernel. I should let it be known that I do a dual boot of XP and Slackware and I rely more on the Windows bootloader vs using Lilo.
 
Old 06-24-2007, 05:59 PM   #538
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
Quote:
Originally Posted by Basslord1124
I should let it be known that I do a dual boot of XP and Slackware and I rely more on the Windows bootloader vs using Lilo.
Lilo output seems fine with me. But if you use Windows boot loader I can't be of much help.
Remember, Google's your friend ;-)

Cheers, Leon.
 
Old 06-24-2007, 08:04 PM   #539
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
He's not using window$ boot loader, it is being chainloaded by lilo ... which is the only way ...
 
Old 06-25-2007, 02:30 AM   #540
o2bfishn
Member
 
Registered: Dec 2005
Location: Kannapolis, NC USA
Distribution: learning ubuntu
Posts: 46

Rep: Reputation: 15
what if you edited the lilo file as below?

Code:
# End LILO global section
# Linux bootable partition config begins
#Linux 2.4 kernel
image = /boot/vmlinuz
 root = /dev/sda3
 label = Linux
 read-only
#Linux 2.6 kernel
image = /boot/vmlinuz-2.6.21.4
 root = /dev/sda3
 label = Linux_2_6
 read-only
#Windows
other = /dev/hdb1
 label = Windows
 table = /dev/hdb
# Linux bootable partition config ends
that puts the 2.6 kernel info in the section "Linux bootable partition config begins". dont forget to run /sbin/lilo
 
  


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
Help - Need guide on how to (re)compile kernel in 9.2 timko SUSE / openSUSE 1 02-17-2005 08:17 AM
re :kernel compile guide sh4d0w331 Slackware 1 10-02-2004 05:38 PM
Kernel re-compile guide marlor Slackware 6 08-08-2004 03:57 AM
What happened to the Newbie Compile Guide? boutrosboutros Slackware 6 07-14-2004 12:37 AM
mandrake specific kernel compile guide? e1000 Mandriva 4 01-09-2004 12:27 PM

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

All times are GMT -5. The time now is 01:38 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