How do you compile the linux kernel and what files do you need to compile in order for linux to run?
Printable View
How do you compile the linux kernel and what files do you need to compile in order for linux to run?
Digital Hermit's Kernel Howto is a step by step guide for recompiling a kernel.
I've followed this HOW-TO but when I get down to the actual replacement of the bootable image I'm a little confused. The HOW-TO has information that's different than what I have.Quote:
Originally Posted by Kode
I'm using SLACKWARE 10, 2.4.9 kernel
The confusion comes as to what files are the bootable files etc.
The files I have in /boot are
boot.0300
boot0302
oot.0303
boot_message.txt
config
config-ide.2.4.29
diag1.,img
map
system.map
system.map-ide-2
vmlinuz-ide-2.4.29
vmlinuz
in the source/boot directory after kernel build I have bzImage
but here's what the HOW-TO says:
$ cp arch/i386/boot/bzImage /boot/bzImage-KERNEL_VERSION
$ cp System.map /boot/System.map-KERNEL_VERSION
$ ln -s /boot/System.map-KERNEL_VERSION /boot/System.map
it has a link to system.map which doesn't exist in the location specified.
any help would be appreciated.
Thanks
-ej
Are you using 2.4.9 or 2.6.9 ?
System.map is CASE sensitive...
Do what the howto says, then you should have:
(the other files don't matter)Code:bzImage-2.4.9
System.map -> System.map-2.4.9
System.map-2.4.9
the confusion came between bzImage and vmlinuz.
They are one in the same.
I've now been through this enough times that it's like before.. it gets easier and easier.
the first compile wasn't as flawless. The second was done from X, with xconfig which seemed to omit all my networking. The 3rd was good..but missed some modules. The 4th was great and now my wireless G network card works...sort of.
10 minutes on.. 2 or 3 off.. non stop with nothing in the logs, not debug, syslog, messages etc.
Quote:
Originally Posted by Kode
I recompiled a couple of times with no problems.
Then I realized I'd left something out. Since then I've not gotten anything good.
the last time here's what I got after a recompile:
Kmod failed to exec ide-disk errorno = 2
VFS: Cannot open root device "303" or 03:03
Please append a correct "root" option
Kernel Panic: Unable to mount root fs on 03:03
Does this have something to do with one of the boot.300 files in the boot directory?
Slackware 10, kernel 2.4.29
When I compile here's what I do:
make mrproper
make menuconfig
make dep
make clean
make bzImage
make modules
make modules_install
but I think I must be doing something wrong. When I make the install for the modules, the last time I saw a lot of "nothing to be done for make modules_install"
It'e presently making modules as we speak, then I'll make the install...and lastly :
cp Syatem.map /boot
cp arch/i386/boot/bzImage /boot/vmlinuz
then I run lilo and reboot
-ej
You can't rename bzImage to vmlinuz -- they are different file formats... After you do your kernel build, do:
It's OK to see a lot of 'nothing to do make modules_install' if you didn't configure your kernel with module support and/or didn't select anything to be compiled as a module.Code:cp System.map /boot/System.map-2.4.29
cp arch/i386/boot/bzImage /boot/bzImage-2.4.29
ln -fs /boot/System.map-2.4.29 /boot/System.map
You are getting the 'VFS: Cannot open root device "303" or 03:03' messages because you have an incorrect or missing 'root=' option in your lilo.conf.
In case it helps, here is a copy of a working lilo.conf:Code:read-only
lba32
prompt
timeout = 600
menu-title = "My Linux Machine"
default = 2.4.29
image = /boot/bzImage-2.4.29
label = 2.4.29
boot = /dev/hda
root = /dev/hda1