View previous topic :: View next topic |
Author |
Message |
smouge n00b
Joined: 22 Jan 2003 Posts: 66 Location: Oosterhout, the Netherlands
|
Posted: Mon Jun 09, 2003 4:25 pm Post subject: |
|
|
Nice tips,
I would add to these tips that it is very handy when you have a working kernel, to save the new kernels you make with a different name and to adapt lilo in such a way can boot from both kernels.
For example, my lilo looks like this:
Code: | # $Header: /home/cvsroot/gentoo-x86/sys-apps/lilo/files/lilo.conf,v 1.3 2002/09/30 00:55:18 woodchip Exp $
# Author: Ultanium
# Start LILO global section
menu-scheme=Wb
boot = /dev/hda
prompt
map = /boot/System.map
lba32
timeout=150
delay = 50
default = GentooNew
vga = normal # Normal VGA console
# End LILO global section
# Linux bootable partition config begins
image = /boot/bzImage
root = /dev/hda3
#root = /devices/discs/disc0/part3
label = Gentoo2420
read-only # read-only for checking
append = "hdd=ide-scsi"
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/bzImageOpenMosix
root = /dev/hda3
label = GentooOpenMosix
read-only # read-only for checking
append = "hdd=ide-scsi"
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/bzImageNew
root = /dev/hda3
label = GentooNew
read-only # read-only for checking
append = "hdd=ide-scsi"
# Linux bootable partition config ends
|
and I have made a small script: /usr/src/makekernel
Code: | #!/bin/bash
usage() {
cat << FOO
usage: makekernel 2.4.19
makekernel 2.4.20
makekernel 2.4.20-openmosix
note:
examples:
FOO
exit 1
}
kernel2419() {
rm -f /usr/src/linux
ln -s /usr/src/linux-2.4.19 /usr/src/linux
cd /usr/src/linux
#rm -Rf /lib/modules/2.4.19/kernel/*
cp .config /boot/.config
make mrproper
cp /boot/.config .config
make menuconfig
make dep && make clean bzImage modules modules_install
cp /boot/bzImageNew /boot/bzImageNew.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImageNew
cp .config /boot/.config_2.4.19
emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel
lilo -v
exit 1
}
kernel2420() {
rm -f /usr/src/linux
ln -s /usr/src/linux-2.4.20 /usr/src/linux
cd /usr/src/linux
#rm -Rf /lib/modules/2.4.20/kernel/*
cp .config /boot/.config
make mrproper
cp /boot/.config .config
make menuconfig
make dep && make clean bzImage modules modules_install
cp /boot/bzImageNew /boot/bzImageNew.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImageNew
cp .config /boot/.config_2.4.20
emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel
lilo -v
exit 1
}
kernel2420openmosix() {
rm -f /usr/src/linux
ln -s /usr/src/linux-2.4.20-openmosix-r2 /usr/src/linux
cd /usr/src/linux
#rm -Rf /lib/modules/2.4.20/kernel/*
cp .config /boot/.config
make mrproper
cp /boot/.config .config
make menuconfig
make dep && make clean bzImage modules modules_install
cp /boot/bzImageNew /boot/bzImageNew.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImageNew
cp .config /boot/.config_2.4.20
emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel
lilo -v
exit 1
}
# Main program loop starting here
if [ `id -u` -ne 0 ]
then
eerror "${0}: must be root."
exit 1
fi
if [ $# -lt 1 ]
then
usage
fi
if [ "$1" = "2.4.19" ] ; then
kernel2419
elif [ "$1" = "2.4.20" ]; then
kernel2420
elif [ "$1" = "2.4.20-openmosix" ]; then
kernel2420openmosix
fi
|
In this way I can quickly make a new kernel. Each compiled kernel is saved as /boot/bzImageNew
If the new kernel doesn't run, I can still start the system with the older 2.4.19 or 2.4.20, gentoo-sources, openmosix etc. kernel.
I hope you find this usefull.
|
|
Back to top |
|
|
wilburpan l33t
Joined: 21 Jan 2003 Posts: 977
|
Posted: Thu Jun 12, 2003 4:05 pm Post subject: |
|
|
Thanks for the suggestion. I incorporated it into my FAQ. |
|
Back to top |
|
|
Stieltje Apprentice
Joined: 03 Apr 2003 Posts: 158 Location: The land where the sky is black
|
Posted: Thu Jun 19, 2003 6:42 pm Post subject: |
|
|
I have 2 kernels now, gentoo-sources and ck-sources, took me a little while to figure out how to get my modules working in the later emerged kernel, ie ck-sources. (setting the symlink linux to my ck-sources directory) . happily I rebooted to see if my gentoo-kernel was still working properly, but no, it could not load any modules at all, the same problem as I had with ck-sources in the beginning......
I want my modules to work using any of my installed kernels, internet has been proven useful in the emerge process....
so, any ideas, did you run into this problem first time you used multiple kernels?
maybe I am missing out on something obvious.
I feel I am a little unclear here, but I really do not know what to state further....
thanks in advance _________________ PCs nearly always come with Microsoft Windows as their operating systems, but the "OS," as it is called, can be changed to a non-Microsoft operating system with a little work. |
|
Back to top |
|
|
smouge n00b
Joined: 22 Jan 2003 Posts: 66 Location: Oosterhout, the Netherlands
|
Posted: Thu Jun 19, 2003 8:36 pm Post subject: |
|
|
Normally you should find your compiled modules in a directory
/lib/modules/2.4.20/kernel
for kernel 2.4.20
or
/lib/modules/2.4.19/kernel
for kernel 2.4.19 etc.
Therefore look if you can find compiled modules in
above directory. |
|
Back to top |
|
|
Stieltje Apprentice
Joined: 03 Apr 2003 Posts: 158 Location: The land where the sky is black
|
Posted: Thu Jun 19, 2003 9:55 pm Post subject: |
|
|
nope, no drivers there, or any other place on my hdd except in my /lib/modules/2.4.20-ck6/kernel/drivers folder.
I tried to use copy my drivers into my /lib/modules/2.4.20-gentoo-r2/kernel/drivers folder and modprobe, does not work at all. all I get is the unresolved symbols error.
any other idea?
I have used multiple kernels before, but just the same kernel but with a different release #
but I cannot see why I cannot have a ck-kernel, a gentoo-kernel and a gaming-kernel with working modules installed on my system.....
well, I'll do it all over again :/ see if i stumble over something obvious.
/cheers _________________ PCs nearly always come with Microsoft Windows as their operating systems, but the "OS," as it is called, can be changed to a non-Microsoft operating system with a little work. |
|
Back to top |
|
|
Stieltje Apprentice
Joined: 03 Apr 2003 Posts: 158 Location: The land where the sky is black
|
Posted: Thu Jun 19, 2003 11:10 pm Post subject: |
|
|
ok, I got the solution now.
when I run emerge, it erases the drivers in the other /lib/modules/ folders except for the one for the kernel in use..
the in my eyes uggly solution is to copy the folders with the old drivers, emerge whatever drivers, then copy the old drivers back again, ie saving them from deletion....
that whole system with the symlink thing should be disable-able, maybe it is...
but who many ppl use more than one kernel?
thanks anyway.
/cheers _________________ PCs nearly always come with Microsoft Windows as their operating systems, but the "OS," as it is called, can be changed to a non-Microsoft operating system with a little work. |
|
Back to top |
|
|
lurid Guru
Joined: 12 Mar 2003 Posts: 595 Location: Florida
|
Posted: Thu Jun 19, 2003 11:14 pm Post subject: |
|
|
Although it doesn't work with everything (ie. sometimes modules are required such as lm_sensors or certain video drivers) I generally suggest compiling everything you can into the kernel. Once upon a time when computers didn't have gigs of RAM, small kernels were good to have. Also once apon a time we used these silly things called floppy disks. As neither of these are required anymore (assuming you have at least 128mb ram and can boot from a CD) having mini kernels really servers no purpose.
I like to think of it this way. Lets say there is some catastrophic damage done to your root partition. If everything your kernel needs to boot and possibly repair your data are modules, and thus destroyed with all the other data, how do you boot? By having your kernel completly (as much as possible) self contained and sitting on a seperate unmounted partition (as per Gentoo install instructions) you are pretty much safe in that once you have a working kernel, you'll always have a working kernel. |
|
Back to top |
|
|
Stieltje Apprentice
Joined: 03 Apr 2003 Posts: 158 Location: The land where the sky is black
|
Posted: Thu Jun 19, 2003 11:37 pm Post subject: |
|
|
I only use a few modules, for my sound (alsa) and my internet (nvnet, did not see any support in the kernel last time I looked) and for nvidia drivers, ie things i cannot compile into my kernel.
I can boot and have my system running, but without sound and without internet.
I do not argue that a system becomes less waterproof using modules, but I would really like to be able to emerge and compile as many kernels as I want without the extra trouble of copying around my module-drivers. Ok it takes me 20 more seconds, but anyway!
I hope that I help someone to a solution a little faster by spamming this thread
/cheers _________________ PCs nearly always come with Microsoft Windows as their operating systems, but the "OS," as it is called, can be changed to a non-Microsoft operating system with a little work. |
|
Back to top |
|
|
smouge n00b
Joined: 22 Jan 2003 Posts: 66 Location: Oosterhout, the Netherlands
|
Posted: Fri Jun 20, 2003 5:58 am Post subject: |
|
|
It should be no problem running different kernels on one system. I do that as well, 2.4.19, gentoo-sources and openmosix.
I did not know that an emerge will delete the modules of the other kernels, seems weird.
It doesn't look right to copy the modules from one kernel directory to another kernel directory. Better try to have the kernel compilation make the modules. are you sure you used the make modules etc stuff when compiling the kernel?
Anyhow, I always use above mentioned script which you can adapt for other kernels. It is an easy way to change to another kernel and have all the modules compiled, including the NVidia driver and to update lilo (if you use the lilo boot manager).
The only thing I have to compile manuallly when using another kernel is for example the driver fo my pcmcia wifi card. Maybe there are some other modules on your system as well that you have to recompile as well.
using kernel modules yes or no should make no difference in letting your system run. In the beginning I always compiled everything in the kernel, now I use modules as well. Sometimes I need to be able to load or unload a module. |
|
Back to top |
|
|
OhSh33t Apprentice
Joined: 03 Sep 2003 Posts: 169 Location: South-Seattle Park
|
Posted: Tue Jan 20, 2004 4:17 am Post subject: |
|
|
why are the initial "kernel conifg suggestions" within this FAQ almost the exact oppisite or whats posted here:
https://forums.gentoo.org/viewtopic.php?t=124530&highlight=
Just seemed strange that when researching on the Gentoo site that I would run into completetly oppisite suggested ways of compiling the Kernel. Not sure what is the right way to proceed now.
Thanks for any suggested clarification.
I'm running 2.4.20-gentoo-r7....and specifically referencing where this FAQ says:
Quote: |
-- under "File systems":
-- select "Virtual memory file system support (former shm fs)"
-- select "/proc file system support"
-- select "/dev file system support (EXPERIMENTAL)"
-- select "Automatically mount at boot"
-- unselect "/dev/pts file system for Unix98 PTYs"
|
and at the link above it's suggested that these are the required kernel parameters:
Quote: |
File systems > Psudo File Systems
[*] /dev file system support (OBSOLETE)
[ ] Automatically mount at boot
[*] /dev/pts file system for Unix98 PTYs
|
Hope someone can clear this up for the noobians. _________________ JB |
|
Back to top |
|
|
OhSh33t Apprentice
Joined: 03 Sep 2003 Posts: 169 Location: South-Seattle Park
|
Posted: Tue Jan 20, 2004 8:16 am Post subject: |
|
|
I love it when I read the "README" file that accompanies linux pkgs. But this might help others as well if they stumble into looking at this FAQ and the new Genkernel "genkernel-3.0.1" How-To.
Readme..... located at ... "/usr/share/genkernel"
Quote: |
IMPORTANT KERNEL NOTES:
- You MUST have devfs turned on at this time, but you MUST NOT
have "Automatically mount at boot" option turned on.
- You MUST have /dev/pts turned on
- If you want Bootsplash, you MUST have VESAFB enabled for 2.6,
other framebuffers won't work. You MUST also enable
"video mode selection support" and "Framebuffer Console support"
- To build a kernel with GenKernel you must have
"Block devices->Loopback device support"
"Block devices->RAM disk support"
- To boot genkernel properly, the kernel config must have
RAM disk support and Initial RAM disk support. You should
also set your "Default RAM disk size to 8192"
BOOTING A KERNEL WITH INITRD:
GRUB:
real_root= needs to point to your root partition
root= needs to point to the ramdisk (should stay at /dev/ram0)
init= needs to point to the linuxrc file to execute on the ramdisk
vga= should be the resolution you want your screen at 0x317 indicates
1024x768 - 16bpp and you'll get a pretty bootsplash if configured properly
GRUB EXAMPLE ENTRY:
title=Linux 2.6.0 genkernel
root (hd0,0)
kernel (hd0,0)/boot/kernel-2.6.0-gentoo root=/dev/ram0 init=/linuxrc real_root=/dev/hda3 vga=0x317
initrd (hd0,0)/boot/initrd-2.6.0-gentoo
|
_________________ JB |
|
Back to top |
|
|
ScottTFrazer n00b
Joined: 19 Sep 2004 Posts: 5
|
Posted: Mon Sep 20, 2004 12:39 am Post subject: |
|
|
Thanks in no small part to this thread and FAQ, I've managed to compile my first kernel from scratch (actually, I've done five now, each building on the last and adding or removing some little bit of functionality)
One thing I never saw mentioned explicitly was the possibility of using dmesg's output from the livecd as a way of determining what hardware is inside your computer (assuming you don't just know, of course )
For me it helped determine the chipset of my IDE controller and soundcard on a machine that I had no clue what was inside. Is there a downside to this? Did I just get lucky? |
|
Back to top |
|
|
OhSh33t Apprentice
Joined: 03 Sep 2003 Posts: 169 Location: South-Seattle Park
|
Posted: Mon Sep 20, 2004 6:03 pm Post subject: |
|
|
ScottTFrazer wrote: | Thanks in no small part to this thread and FAQ, I've managed to compile my first kernel from scratch (actually, I've done five now, each building on the last and adding or removing some little bit of functionality)
One thing I never saw mentioned explicitly was the possibility of using dmesg's output from the livecd as a way of determining what hardware is inside your computer (assuming you don't just know, of course )
For me it helped determine the chipset of my IDE controller and soundcard on a machine that I had no clue what was inside. Is there a downside to this? Did I just get lucky? |
DMESG is great place to look but its like looking in a messy file cabinet. Another thing to check after booting off a Gentoo boot cd is "lsmod". This will show you any modules that the boot cd loads if it is able to.
But I would have to say that the Grand Daddy of them all for me is "lspci" or "lspci -v". This is apart of the "pciutils" pkg. This gets all the info that I've ever needed. Example of the output on a PII 300..
Code: | toejam conf # lspci
0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 02)
0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 02)
0000:00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
0000:00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
0000:00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
0000:00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02)
0000:00:0f.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang]
0000:00:11.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)
|
Same thing but with the "-vv" option.
Code: | toejam conf # lspci -vv
0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 02)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR+
Latency: 64
Region 0: Memory at e8000000 (32-bit, prefetchable)
Capabilities: [a0] AGP version 1.0
Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2
Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate=<none>
0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 02) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
I/O behind bridge: 0000d000-0000dfff
Memory behind bridge: ec000000-edffffff
Prefetchable memory behind bridge: e0000000-e7ffffff
Expansion ROM at 0000d000 [disabled] [size=4K]
BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B+
0000:00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
0000:00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Region 4: I/O ports at f000 [size=16]
0000:00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00 [UHCI])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin D routed to IRQ 10
Region 4: I/O ports at e000 [size=32]
0000:00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin ? routed to IRQ 9
0000:00:0f.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (750ns min, 2000ns max)
Interrupt: pin A routed to IRQ 9
Region 0: I/O ports at e400 [size=ee000000]
Expansion ROM at 00010000 [disabled]
0000:00:11.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
Subsystem: Ensoniq Creative Sound Blaster AudioPCI64V, AudioPCI128
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (3000ns min, 32000ns max)
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at e800
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=0mA PME(D0+,D1-,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
0000:01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2) (prog-if 00 [VGA])
Subsystem: CardExpert Technology: Unknown device 0001
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop+ ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (1250ns min, 250ns max)
Interrupt: pin A routed to IRQ 11
Region 0: Memory at ec000000 (32-bit, non-prefetchable) [size=ed000000]
Region 1: Memory at e0000000 (32-bit, prefetchable) [size=128M]
Expansion ROM at 00010000 [disabled]
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [44] AGP version 2.0
Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA- ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2,x4
Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate=<none>
|
Should be all you need. Usually what I do when I first boot off a gentoo livecd is set the root passwd. I then immediately do "Alt-F2" and login to that terminal and do "lspci". I then go back to "Alt-F1" and do the install get chrooted in and when it comes to compiling the Kernel manually you can switch from your "menuconfig kernel screen" to the other Terminal with the needed lspci output.
If you don't set the root passwd before chrooting in then you will not beable to login into the extra Terminals available via "Alt-F1-4". You can try but you'll be prompted to login.. well you can't really login without a passwd set.
Well you could always "emerge pciutils" when chrooted in and that would dl and compile the needed pkg too run "lspci"...
Hope that helps. Helped me tremendously. Have fun. Manually compiliation is the only way to go. I would also make sure that when your inside "make menuconfig" to SELECT the HELP link and read through each item even if it doesn't make sense. This helped me to take all the mystery out of compiling manually.
Funny thing is I can't find a doc on howto specifically UPGRADE. I've found some doc's but they seem to be missing steps which is pretty scarry. And I haven't found any for the 2.6 kernel, like switching from 2.6.8 to like 2.6.8-r3 for a specific source. _________________ JB
Last edited by OhSh33t on Tue Sep 28, 2004 3:45 am; edited 2 times in total |
|
Back to top |
|
|
ScottTFrazer n00b
Joined: 19 Sep 2004 Posts: 5
|
Posted: Mon Sep 20, 2004 7:54 pm Post subject: |
|
|
sweet. That's much nicer |
|
Back to top |
|
|
griffinme n00b
Joined: 24 Apr 2005 Posts: 23
|
Posted: Mon Apr 25, 2005 8:02 pm Post subject: |
|
|
Two of the three resource links at the end of the article appear to be dead. |
|
Back to top |
|
|
Double Click Tux's lil' helper
Joined: 21 May 2004 Posts: 148
|
Posted: Fri May 19, 2006 11:26 am Post subject: |
|
|
Any suggestion on how to deal with remote (through SSH/Putty) compiles? In other words if the new kernel does not work it will default back to a specified working kernel without requiring a manual/physical reboot or intervention? _________________ - To do a certain kind of thing, you have to be a certain kind of person |
|
Back to top |
|
|
nader emami Tux's lil' helper
Joined: 14 Sep 2006 Posts: 88 Location: Netherlands
|
Posted: Thu Sep 14, 2006 9:38 pm Post subject: A question! |
|
|
[quote="smouge"]Nice tips,
I would add to these tips that it is very handy when you have a working kernel, to save the new kernels you make with a different name and to adapt lilo in such a way can boot from both kernels.
For example, my lilo looks like this:
Code: | # $Header: /home/cvsroot/gentoo-x86/sys-apps/lilo/files/lilo.conf,v 1.3 2002/09/30 00:55:18 woodchip Exp $
# Author: Ultanium
# Start LILO global section
menu-scheme=Wb
boot = /dev/hda
prompt
map = /boot/System.map
lba32
timeout=150
delay = 50
default = GentooNew
vga = normal # Normal VGA console
# End LILO global section
# Linux bootable partition config begins
image = /boot/bzImage
root = /dev/hda3
#root = /devices/discs/disc0/part3
label = Gentoo2420
read-only # read-only for checking
append = "hdd=ide-scsi"
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/bzImageOpenMosix
root = /dev/hda3
label = GentooOpenMosix
read-only # read-only for checking
append = "hdd=ide-scsi"
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/bzImageNew
root = /dev/hda3
label = GentooNew
read-only # read-only for checking
append = "hdd=ide-scsi"
# Linux bootable partition config ends
|
and I have made a small script: /usr/src/makekernel
Code: | #!/bin/bash
usage() {
cat << FOO
usage: makekernel 2.4.19
makekernel 2.4.20
makekernel 2.4.20-openmosix
note:
examples:
FOO
exit 1
}
kernel2419() {
rm -f /usr/src/linux
ln -s /usr/src/linux-2.4.19 /usr/src/linux
cd /usr/src/linux
#rm -Rf /lib/modules/2.4.19/kernel/*
cp .config /boot/.config
make mrproper
cp /boot/.config .config
make menuconfig
make dep && make clean bzImage modules modules_install
cp /boot/bzImageNew /boot/bzImageNew.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImageNew
cp .config /boot/.config_2.4.19
emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel
lilo -v
exit 1
}
kernel2420() {
rm -f /usr/src/linux
ln -s /usr/src/linux-2.4.20 /usr/src/linux
cd /usr/src/linux
#rm -Rf /lib/modules/2.4.20/kernel/*
cp .config /boot/.config
make mrproper
cp /boot/.config .config
make menuconfig
make dep && make clean bzImage modules modules_install
cp /boot/bzImageNew /boot/bzImageNew.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImageNew
cp .config /boot/.config_2.4.20
emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel
lilo -v
exit 1
}
kernel2420openmosix() {
rm -f /usr/src/linux
ln -s /usr/src/linux-2.4.20-openmosix-r2 /usr/src/linux
cd /usr/src/linux
#rm -Rf /lib/modules/2.4.20/kernel/*
cp .config /boot/.config
make mrproper
cp /boot/.config .config
make menuconfig
make dep && make clean bzImage modules modules_install
cp /boot/bzImageNew /boot/bzImageNew.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImageNew
cp .config /boot/.config_2.4.20
emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel
lilo -v
exit 1
}
# Main program loop starting here
if [ `id -u` -ne 0 ]
then
eerror "${0}: must be root."
exit 1
fi
if [ $# -lt 1 ]
then
usage
fi
if [ "$1" = "2.4.19" ] ; then
kernel2419
elif [ "$1" = "2.4.20" ]; then
kernel2420
elif [ "$1" = "2.4.20-openmosix" ]; then
kernel2420openmosix
fi
|
In this way I can quickly make a new kernel. Each compiled kernel is saved as /boot/bzImageNew
If the new kernel doesn't run, I can still start the system with the older 2.4.19 or 2.4.20, gentoo-sources, openmosix etc. kernel.
I hope you find this usefull.
I am a new user of Gentoo. I have installed it after some tryings on my laptop (toshiba A110-225), naturally with networkless option.
Because of Ethernet card of this machine. So I have to compile the kernel with the appropriate card driver for the Ethernet card.
I have read some material and I have to have gentoo-source at the next directory /usr/src/linux. But this directory is empty and I
don't know where I can find the source of the kernel. Would you like to tell me how I can solve this problem?
Maybe here is not the place in which i can ask my question. My apologize for this.
With regards, |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Sep 14, 2006 9:43 pm Post subject: |
|
|
Code: | emerge unmerge nvidia-glx
emerge unmerge nvidia-kernel
emerge nvidia-glx
emerge nvidia-kernel |
be aware that now, you should have nvidia-drivers installed instead (or the legacy one) _________________ The End of the Internet! |
|
Back to top |
|
|
golding Apprentice
Joined: 07 Jun 2005 Posts: 232 Location: Adelaide / South Australia
|
Posted: Thu Sep 14, 2006 11:05 pm Post subject: |
|
|
I would like to pare my kernel and modules down to just those needed for this machine.
How would I go about finding exactly what has been loaded so I can answer [N] to all other options in .config?
Is it just a matter of looking at dmesg and lsmod? _________________ Regards, Robert
..... Some people can tell what time it is by looking at the sun, but I have never been able to make out the numbers. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sat Feb 10, 2007 9:02 pm Post subject: |
|
|
Great post
A newbie will know how to debug his kernel with a backup kernel in case that something goes wrong...kernel panic |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Sun Feb 11, 2007 8:59 am Post subject: |
|
|
d2_racing: Thanks â though most of the credit should go to wilburpan as the ideas come from KC11.
If you can spare the time, please keep an eye on it as it evolves. Your comments and corrections are appreciated. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
rodia n00b
Joined: 29 Dec 2005 Posts: 16 Location: 43° 36 North, 1° 26 West
|
Posted: Thu Mar 08, 2007 11:37 am Post subject: |
|
|
Hello Wynn
Thanks for the link. This is a very full and good tut.
Although I don't use :
To generate a default config file for my new kernels
I'd rather copy an old and working config file of a previous kernel version
and run make menuconfig , exit and save to perform the adequate
patches.
It prevents from reconfiguring all the options again.
Whats your point of view about this ?
Thanks again,
Red1 _________________ Having the choice is a choice that we do. |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Thu Mar 08, 2007 11:52 am Post subject: |
|
|
Yes, I'd copied the .config from the previous kernel version and used it as the base of the new one with "make oldconfig" for quite some time but recently this failed to work or work properly. For instance, I upgraded from 2.6.18 to 2.6.19 here â carefully adding the SATA drivers, testing the experimental PATA drivers and going back to "old PATA" when they didn't work â but burning CDs was very slow with the minimum buffer fill going down to 7% when it was a minimum of 77% before.
I eventually found out that the DMA on the CD burner hadn't been enabled.
Based on that, I think reconfiguring the kernel starting from "make defconfig" may well take less time, all in all, than just running "make oldconfig" on the old one.
That's why I've written it as it is but, of course, everybody will have their own opinion â these Forums are proof of that, if any was needed _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Mar 09, 2007 6:08 pm Post subject: |
|
|
I use make oldconfig when I change of kernel release only.
Exemple : 2.6.19-Gentoo-r2 --> 2.6.19-Gentoo-r5. |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Fri Mar 30, 2007 12:34 pm Post subject: |
|
|
Updated the old FAQ and merged the comments to the new one to this thread. _________________ KDE |
|
Back to top |
|
|
|