Newbie kernel building questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to teach myself how to build a kernel. As a first attempt, I figured I'd try to recreate the kernel I downloaded from Red Hat. The guide I'm using on how to accomplish this is "Linux Administrtion, A Beginner's Guide, Second Edition". The proceedure Shah gives is boiled
down to this:


1. Copy kernel source directory:
cd /usr/src
cp -rp linux-2.4.20-19.9 linux-2.4.20-19.9-awr1
rm linux-2.4
ln -s linux-2.4.20-19.9-awr1 linux-2.4
2. Determine current hardware setup
cat /proc/pci
3. Configure the kernel
cd linux-2.4
make xconfig
4. Compile the kernel
make dep
make clean
make zImage | make bzImage
make modules
5. Install the kernel
cp /usr/src/linux-2.4/arch/i386/boot/zImage /boot/vmlinuz-2.4.20-19.9-awr1
cp /usr/src/linux-2.4/System.map /boot/System.map-2.4.20-19.9-awr1
6. install the modules
make modules_install
7. Add the kernel to /boot/grub/grub.conf


On my first attempt, I made no changes in "make xconfig". When the window came up, I clicked on "Save and Exit".

The first problem I encountered was with "make zImage". The make failed with the message "System is too big. Try using bzImage or modules." I then ran "make clean; make bzImage". That succeeded, but resulting kernel was larger than the production one. That leads to the first observation, that the starting configuraton in "make xconfig" is not the same as the binary kernel distributed with the same version number. Is that a correct observation? Is there a way to determine what the configuration is for the binary kernel?

The second observation is that there are more files in /boot tied by version number than my proceedure accounts for. In my current /boot
directory, I have


config-2.4.20-19.9
module-info-2.4.20-19.9
System.map-2.4.20-19.9
vmlinux-2.4.20-19.9
vmlinuz-2.4.20-19.9

My proceedure only mentions vminuz and System.map. I assume this means my proceedure is lacking. Can someone point me to a better proceedure for building kernels?

After running "make bzImage", I tried "make install". This did put a copy of the new kernel in /boot. However, I wasn't sure it did everything it needed to or did them all correctly. Does "make install" work when building a kernel?

I plowed ahead, added the new kernel to grub.conf and tried booting with it. It failed. However, I decided not to get to excited until I had these other issues worked out.

One last thing (perhaps). In grub.conf, there is a reference to initrd-<version>. I remember seeing a discussion a while back on this file but I do not recall any details. Could someone point me to an explanation of that?

Thanks!

Andrew Robinson




-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux