Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Two Kernel Questions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Sat Oct 23, 2004 10:41 pm    Post subject: Two Kernel Questions Reply with quote

Hey everyone, I have two kernel questions, hopefully they can both be answered. Both relate to my Dell Inspiron 5100 laptop.

1. After I emerge gentoo-dev-sources, kernel 2.6.9, how do I emerge nitro sources, or patches, however you look at it. I know that I have to download the .ebuild and place it in /usr/local/portage/sys-kernel/nitro-sources and then running the command: emerge /usr.../whatever.ebuild Is that all? Do I have to emerge the kernel, set /usr/src/linux then emerge the patches? This is only a guess, I just need some varification. I assume next I would run the menuconfig and then compile, and lastly copy over the image.

2. On my laptop, if I boot up with a Knoppix CD and I select the 2.6.x kernel, everything, with the exception of my wireless card works fine. This includes suspension or sleeping to disk and detecting how much battery power I have left. I can however get my wireless card working with the nitrosources. Anyway, my question is: how can I, if there is a way, boot into Knoppix and then somehow get the kernel configuation that was used upon boot time? If I could somehow grab the configuration and then use it when I am compiling my own kernel during the Gentoo install, that would be a HUGE plus. Thanks!

Greg
_________________
-Greg-
Back to top
View user's profile Send private message
Kompi
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 252
Location: Germany

PostPosted: Sat Oct 23, 2004 11:07 pm    Post subject: Reply with quote

@1st question: gentoo-dev-sources is an already patched kernel, portage does this for you. nitro is also a already patched kernel after emerge.
So if you want to use a kernel patched with nitro-patches, you do not need to emerge gentoo-dev-sources. Just emerge nitro-sources.
If you don't need additional patches, which aren't included in nitro-sources, you can go on setting the link to /usr/src/linux, make menuconfig and so on.

@2st question: Kernels since the 2.6.xx-series support compiled in kernel-configuration. The corresponding options are found in section "General Setup":
Quote:
[*] Kernel .config support
[*] Enable access to .config through /proc/config.gz

Hopefully these options are enabled in your knoppix kernel. Then you should find your configuration in /proc/config.gz.
For details read what the option-help gives us:
Quote:
CONFIG_IKCONFIG:

This option enables the complete Linux kernel ".config" file
contents to be saved in the kernel. It provides documentation of which kernel options are used in a running kernel or in an on-disk kernel. This information can be extracted from the kernel image file with the script scripts/extract-ikconfig and used as input to rebuild the current kernel or to build another kernel. It can also be extracted from a running kernel by reading /proc/config.gz if enabled (below).
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Sat Oct 23, 2004 11:09 pm    Post subject: Reply with quote

1.
download nitro-sources*.ebuild, place in /usr/local/portage/sys-kernel/nitro-sources. Go change directory over to there and then add the following line to /etc/make.conf

Code:

PORTDIR_OVERLAY="/usr/local/portage"

then digest the ebuild
Code:

ebuild ./nitro-sources*.ebuild digest

then
Code:

emerge ./nitro-sources*/ebuild


The nitro-sources ebuild will compile the appropriate kernel and then apply the appropriate patches. Change the symlink in /usr/src to point to the new kernel, and you should be set.


2. I would imagine there should be a .config or some a system-map file on the CD. This should have the info you need. There is probably a better way, but I don't know it.


EDIT: I was kind of in a rush before. The emerging of the nitro sources doesn't compile the kernel in the sense that you get the bzImage. But it should create everything you need to compile it in your /usr/src/nitro-sources* directory.


Last edited by bendagr8 on Sun Oct 24, 2004 12:28 am; edited 1 time in total
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Sat Oct 23, 2004 11:54 pm    Post subject: Reply with quote

Excellent, this should get me started on converting my laptop over to Gentoo. Now I just need that other factor, TIME.
_________________
-Greg-
Back to top
View user's profile Send private message
seppe
Guru
Guru


Joined: 01 Sep 2003
Posts: 431
Location: Hove, Antwerp, Belgium

PostPosted: Mon Oct 25, 2004 6:12 pm    Post subject: Reply with quote

actually, the correct way emerging nitro-sources is like this:

PART 1: EMERGING NITRO-SOURCES

1. download the ebuild
2. add this to /etc/make.conf if it isn't already there:
Code:

PORTDIR_OVERLAY="/usr/local/portage"

3. Make the nitro-sources directory in the portage overlay if you haven't done it before:
Code:

mkdir -p /usr/local/portage/sys-kernel/nitro-sources

4. Move the ebuild from the directory where you've downloaded it to the nitro-sources directory in your portage overlay
Code:

mv /path/to/nitro-sources-2.6.9-r1.ebuild /usr/local/portage/sys-kernel/nitro-sources

note: change the version to the version you've downloaded :)
5. Change the directory to nitro-sources in your portage overlay:
Code:

cd /usr/local/portage/sys-kernel/nitro-sources

6. Create the digest file for this nitro-sources release, in this step all the files that are needed for nitro-sources will be downloaded as well (mostly the linux kernel + the nitro-sources patch set itself)
Code:

ebuild nitro-sources-2.6.9-r1.ebuild digest

7. Emerge nitro-sources, in this step will the linux kernel be automaticly installed and patched with the nitro sources patch set
Code:

emerge nitro-sources


Now you have this nitro-sources release ready in /usr/src/linux-2.6.9-nitro1
(note: change version to the one you installed).

Then you to compile this kernel ...


PART 2: COMPILING NITRO-SOURCES
1. Copy over the .config file of your previous kernel. When you do this, you don't need to configure everything again :)
Code:

cd /usr/src/
cp linux/.config linux-2.6.9-nitro1/

2. Let the /usr/src/linux symlink point to your nitro-sources kernel:
Code:

rm linux
ln -sf linux-2.6.9-nitro1 linux

note: you still need to be in /usr/src of course ;)
3. Go in to the kernel directory:
Code:

cd /usr/src/linux

4. Update the config file you've copied, you will be prompted with all the new thingies from nitro-sources where you answer Y, N or M (module):
Code:

make oldconfig

5. Compile:
Code:

make && make modules_install

6. Mount your /boot partition and copy over the kernel image (bzImage) and System.map file:
Code:

mount /boot
cp arch/i386/boot/bzImage /boot/nitro-sources
cp System.map /boot

7. Now edit your grub menu and add a new entry which points to the kernel image (/boot/nitro-sources in this example)

That's it! Correct me if I'm wrong (because I still use another command to compile: make dep && make clean bzImage modules modules_install => which is actually the old 2.4 way to compile kernels, it's a bad habbit I know but it works :))
_________________
nitro-sources, because between stable and experimental there exists only speed

Latest release I made: 2.6.13.2-nitro1


Last edited by seppe on Wed Oct 27, 2004 10:21 am; edited 2 times in total
Back to top
View user's profile Send private message
tuam
l33t
l33t


Joined: 04 May 2004
Posts: 763
Location: CGN, Germany

PostPosted: Mon Oct 25, 2004 7:43 pm    Post subject: Reply with quote

seppe wrote:


PART 2: COMPILING NITRO-SOURCES
5. Compile:
Code:

make && make modules modules_install


That's it! Correct me if I'm wrong


"make" includes modules. It is OK to
Code:
make && make modules_install


FF,

Daniel
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Tue Oct 26, 2004 10:50 pm    Post subject: Reply with quote

I knew I should have asked the author. Thanks seppe!

Edit// Don't forget that you need to copy over the System.map file. ;)
_________________
-Greg-
Back to top
View user's profile Send private message
vonloschz
n00b
n00b


Joined: 27 Oct 2004
Posts: 2

PostPosted: Wed Oct 27, 2004 3:10 pm    Post subject: Reply with quote

Why you copy system.map and bzimage ...
I use this commande and that make all I need.
make && make modules_install && make install
just need to edit my /etc/grub.conf after.

Iam under FC2 ... maybe is different for gentoo.
_________________
N0ne
Back to top
View user's profile Send private message
iverson0881
Apprentice
Apprentice


Joined: 08 Jan 2004
Posts: 285
Location: Fremont, CA

PostPosted: Wed Oct 27, 2004 5:14 pm    Post subject: Reply with quote

tuam wrote:
seppe wrote:


PART 2: COMPILING NITRO-SOURCES
5. Compile:
Code:

make && make modules modules_install


That's it! Correct me if I'm wrong


"make" includes modules. It is OK to
Code:
make && make modules_install


FF,

Daniel


You can also mount /boot and run "make install" to install BzImage and things.
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Wed Oct 27, 2004 11:14 pm    Post subject: Reply with quote

vonloschz wrote:
Why you copy system.map and bzimage ...
I use this commande and that make all I need.
make && make modules_install && make install
just need to edit my /etc/grub.conf after.

Iam under FC2 ... maybe is different for gentoo.


The bzImage is the compressed kernel image, I'm not 100% sure what the System.map does but it is required under /boot and only takes a small amount of space.
_________________
-Greg-
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Thu Oct 28, 2004 1:51 am    Post subject: Reply with quote

System.map is not required.

EDIT: I thought I knew its purpose, but I was mistaken. But it's not in my boot partition, so I'm pretty certain you don't need it.
Back to top
View user's profile Send private message
The Mountain Man
l33t
l33t


Joined: 03 Sep 2003
Posts: 643

PostPosted: Thu Oct 28, 2004 2:08 am    Post subject: Reply with quote

vonloschz wrote:
make && make modules_install && make install
just need to edit my /etc/grub.conf after.

Actually, "make install" creates automatic links to your kernel under the name "vmlinuz" and "vmlinuz.old" for your previous kernel. Just add these names to grub.conf and you won't even have to edit that. Here's what my grub.conf looks like:
Code:
default 0
timeout 5
color white/black yellow/blue

title=Gentoo Linux (Current)
root (hd1,0)
kernel /vmlinuz root=/dev/hdb3

title=Windows
root (hd0,0)
rootnoverify (hd0,0)
makeactive
chainloader +1

title=Gentoo Linux (Previous)
root (hd1,0)
kernel /vmlinuz.old root=/dev/hdb3

title=Gentoo Linux (Safe)
root (hd1,0)
kernel /vmlinuz.safe root=/dev/hdb3

"vmlinuz.safe" is my own link to a known working kernel just in case I run into trouble.
_________________
I suck at signatures.
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Fri Oct 29, 2004 12:38 am    Post subject: Reply with quote

Then what does the System.map do? LOL

BTW, I'm about to reboot into Knoppix and see if the config file is there. Problem: how can I get this config file off of this CD or RAM space. I'm on wireless so no network access, I don't have any USB storage except a 128 meg SM card which is full to the very max. No floppy. How can I get this config file out of Knoppix?

edit: n/m i'll mount my data drive, which is NTFS and I'll just write to that. Or is that a bad idea?
_________________
-Greg-
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Sat Oct 30, 2004 8:35 pm    Post subject: Reply with quote

*bump*
Good or bad idea to write to NTFS under Captive (with Knoppix)

:wink:
_________________
-Greg-
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Sun Oct 31, 2004 1:09 am    Post subject: Reply with quote

I dont understand your pb.

config.gz is only few kb.

You have room to install a new kernel you can find room for a small text file.

Why risk writing the NTFS? Just mount a linux partition and save the file.

It seems you are seeing a problem when there isnot one.


Quote:
Actually, "make install" creates automatic links to your kernel under the name "vmlinuz" and "vmlinuz.old" for your previous kernel.

Which is exactly why I dont use it!
Especially if you are running fidderent patched kernels it's no help at all if they all get called vmlinuz!

I define a few aliases for swapping around between kernels:
Code:


alias kn='cd /usr/src && rm linux && ln -s *nitro1 linux && ls -ail linux && cd linux'

alias k266l4='cd /usr/src && rm linux && ln -s *2.6.6-love4 linux && ls -ail linux && cd linux'

alias mmk='cdlin && make menuconfig'
alias mk26='make && make modules modules_install'
alias mknitro=kn && mk26

so to do menuconfig on nitro I type: kn && mmk
Then mknitro
That way I know I'm always configgin the right kernel

While the new kernel is emerging I just edit my alias to fit and add a new line to grub.conf.
This way I get meaning full kernel names.
Code:

alias cpn='cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-athlonXP-nitro-r1'


I'm sure you're all big enough to work out the datails. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Sun Oct 31, 2004 2:13 am    Post subject: Reply with quote

Gentree wrote:
I dont understand your pb.

config.gz is only few kb.

You have room to install a new kernel you can find room for a small text file.

Why risk writing the NTFS? Just mount a linux partition and save the file.

It seems you are seeing a problem when there isnot one.


Quote:
Actually, "make install" creates automatic links to your kernel under the name "vmlinuz" and "vmlinuz.old" for your previous kernel.

Which is exactly why I dont use it!
Especially if you are running fidderent patched kernels it's no help at all if they all get called vmlinuz!

I define a few aliases for swapping around between kernels:
Code:


alias kn='cd /usr/src && rm linux && ln -s *nitro1 linux && ls -ail linux && cd linux'

alias k266l4='cd /usr/src && rm linux && ln -s *2.6.6-love4 linux && ls -ail linux && cd linux'

alias mmk='cdlin && make menuconfig'
alias mk26='make && make modules modules_install'
alias mknitro=kn && mk26

so to do menuconfig on nitro I type: kn && mmk
Then mknitro
That way I know I'm always configgin the right kernel

While the new kernel is emerging I just edit my alias to fit and add a new line to grub.conf.
This way I get meaning full kernel names.
Code:

alias cpn='cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-athlonXP-nitro-r1'


I'm sure you're all big enough to work out the datails. 8)


The problem is that there is only one big 40 gigabyte partion which is NTFS. :wink:
_________________
-Greg-
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5236
Location: France, Old Europe

PostPosted: Sun Oct 31, 2004 9:33 am    Post subject: Reply with quote

Quote:
I can however get my wireless card working with the nitrosources.


So where are your nitro-sources and the rest of the linux system?

Either I am not reading your post properly or you are not explaining what you're trying to do.

I think we need you to clarify if you want some help.

Writing to NTFS still seems a bit risky so you're probably best resizing , that probably means finding a copy of partition magic 8 or 9. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Sun Oct 31, 2004 6:32 pm    Post subject: Reply with quote

Gentree wrote:
Quote:
I can however get my wireless card working with the nitrosources.


So where are your nitro-sources and the rest of the linux system?

Either I am not reading your post properly or you are not explaining what you're trying to do.

I think we need you to clarify if you want some help.

Writing to NTFS still seems a bit risky so you're probably best resizing , that probably means finding a copy of partition magic 8 or 9. 8)


LOL. I think I really confused a few people. I plan on moving my laptop over to Linux. Nitro-sources has the acx100 (and a few other optimizations) that I need and like for my notebook. I asked this question prior to the installation so I didn't run into any snags. At this very point in time, my laptop only runs Windows XP Professional SP2, within the next two weeks I hope to rebuild my XP partition and then install Gentoo next to it. I still have to use Windows for a few things. :?

Sorry about the mix-up.

Edit/ I have all the help I need now, I just need time. :)
Edit 2/ When did Partition Magic 9 come out? I have 8, but when was 9 released?
_________________
-Greg-
Back to top
View user's profile Send private message
H3g3m0n
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2002
Posts: 97

PostPosted: Wed Nov 03, 2004 12:10 am    Post subject: Reply with quote

Any reason the nitro-sources arn't included in the main portage tree? It would be much eaiser to just type emerge nitro-sources rather than have to download the .ebuild file etc.
Back to top
View user's profile Send private message
minty
n00b
n00b


Joined: 27 Oct 2004
Posts: 4

PostPosted: Fri Nov 05, 2004 10:13 am    Post subject: Reply with quote

There are a few hints here, but I'm still not sure what System.map does.

I don't copy it over and things are still OK.

Pure guess time: Could it be used for profiling/debugging of the kernel, so is not needed if you don't use these options?

This thread has been very informative regarding getting 'unsupported' ebuilds onto my system.

BTW I love the word 'fidderent', it certainly is different

I've still got to find out about the portage overlay and what it does (bedtime reading), but the gist of things is very helpful.

On another note, if I want to get -mm or -ac sources onto the system

a) Does anyone already do a 'nitro-esque' ebuild for those other alternatives,

b) If I just use the ebuild files from nitro and change the patch lists, is there any hidden portage 'gotcha' to be aware of

c) what kind of 'gentoo-specific' patches are necessary/desirable ie why aren't the gentoo sources based solely on vanilla kernels + 'vanilla' patches?
Back to top
View user's profile Send private message
knights
n00b
n00b


Joined: 05 Nov 2004
Posts: 2

PostPosted: Fri Nov 05, 2004 1:29 pm    Post subject: genkernel? Reply with quote

just wondering...
im a n00b...
would genkernel work?
im not v confident compiling the kernel manually...
Back to top
View user's profile Send private message
SilentGreg
Apprentice
Apprentice


Joined: 24 Aug 2004
Posts: 153
Location: New Jersey, USA

PostPosted: Fri Nov 19, 2004 10:03 pm    Post subject: Reply with quote

H3g3m0n wrote:
Any reason the nitro-sources arn't included in the main portage tree? It would be much eaiser to just type emerge nitro-sources rather than have to download the .ebuild file etc.


It's considered unstable, but it isn't.
_________________
-Greg-
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Fri Nov 19, 2004 10:41 pm    Post subject: Reply with quote

I believe that system map allows the kernel crashdumps to be linked to system calls. So that when you get an oops it can give info an where it occured in understandable format.

It is also used by ksymoops for debugging.
Back to top
View user's profile Send private message
Guinpen
Guru
Guru


Joined: 08 Dec 2004
Posts: 393

PostPosted: Sun Jan 09, 2005 11:00 pm    Post subject: Reply with quote

For compiling this, couldn't I simply use genkernel, newbie-like :)

genkernal --kernel-config=whatever all

and be done with it....

EDIT: YES, it does work, and in making it work I think I stumbled upon a genkernel bug. How do I report one?


Last edited by Guinpen on Mon Jan 10, 2005 3:01 am; edited 1 time in total
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Sun Jan 09, 2005 11:16 pm    Post subject: Reply with quote

desertstalker wrote:
I believe that system map allows the kernel crashdumps to be linked to system calls. So that when you get an oops it can give info an where it occured in understandable format.


that is exactly what kysmoops does, it takes the function addresses reported in an oops, looks them up in system.map, and provides a human-readable code path leading to the crash.

however this sort of functionality is now merged in the kernel - you'll probably notice if you get an oops, the function names in the call trace are listed. ksymoops isn't really needed any more, nor is system.map.
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum