--(Once apon a time, in comp.os.linux,)--
--(Ed Skinner said it like only they can.)--
Quote:> I have a notebook running Red Hat 7.1 (Linux 2.4.9-something at the
> moment). I've always used the kernels supplied by Red Hat because,
> whenever I've tried to configure my own (make xconfig, etc.), I end up
> with something that crashes (probably missing something essential or
> having something mis-configured), or something that is missing so many
> pieces as to be mostly useless.
> Is there a general strategy I can follow that will allow me to 1)
> configure a minimal kernel for my system that will (without too much bit
> twiddling) boot and give me a shell prompt and let me do a few commands,
> and then 2) start configuring in additional pieces, one at a time, to
> verify each of them actually works?
> It's the pursuit of #1 that has frustrated me so far. Pointers and
> tips would be most appreciated.
Lets work on number one.
Move the stock redhat kernel to /boot/vmliuz.stock
Add the following to your /etc/lilo.conf
image = /boot/vmlinuz.stock
root = /dev/hda3 # replace this with the correct dev
label = stock
read-only
First we are going to start with a stock kernel config file.
from inside your kernel dir
cp arch/i386/defconfig .config
This way we make sure you are not building on your prior misstaks.
Second start by makeing sure you are makeing the kernel correctly
we will use the following script to make sure you haven't missed
anythiing.
#!/bin/bash
# jvs script + faux_pseudo
# march 2002
if [[ ! -d $1 ]] ; then
echo "you must suply the path you want to use to make the kernel in
i.e /usr/src/linux would be the standerd answer
Or you may want to uniqly name the kernel by
moving that dir to /usr/src/linux.2.4.2.nofb for example and then
rerun this"
Usage $(basename $0) /usr/src/linux/"
exit 1
else
cd $1
fi
XX=XXXXXXXXXXXXXXXXXXXXXXXXX
SPACES=" "
echo -e "\n\n$SPACES make clean\n\n"
sleep 1
make clean
OK=$?
if [ $OK != 0 ]
then
echo "$XX make clean failed $XX"
exit 1
fi
if [ ! -f .config ] ; then
echo -e "\n\n$SPACES make mrproper\n\n"
# I still have no idea what this does other than wipe out a .config
# but its in the directions so its here
make mrproper
OK=$?
if [ $OK != 0 ]
then
echo "$XX make mrproper $XX"
exit 1
fi
fi
echo -e "\n\n$SPACES make menuconfig failed\n\n"
sleep 1
make menuconfig
OK=$?
if [ $OK != 0 ]
then
echo "$XX make menuconfig failed $XX"
exit 1
fi
echo -e "\n\n$SPACES make dep\n\n"
sleep 1
make dep
OK=$?
if [ $OK != 0 ]
then
echo "$XX make dep failed $XX"
exit 1
fi
echo -e "\n\n$SPACES make bzImage\n\n"
sleep 1
make bzImage
OK=$?
if [ $OK != 0 ]
then
echo "$XX make bzImage failed $XX"
exit 1
fi
if grep CONFIG_MODULES\=y .config 1>/dev/null ; then
# I like monolithic kernels
echo -e "\n\n$SPACESmake modules\n\n"
sleep 1
make modules
OK=$?
if [ $OK != 0 ]
then
echo "$XX make modules failed $XX"
exit 1
fi
echo -e "\n\n$PACES make modules_install\n\n"
sleep 1
make modules_install
OK=$?
if [ $OK != 0 ]
then
echo "$XX make modules_install failed $XX"
exit 1
fi
fi
echo -e "\n\n$SPACESmake install\n\n"
sleep 1
make install
OK=$?
if [ $OK != 0 ]
then
echo "$XX make INSTALL failed $XX"
exit 1
fi
# because some people don't change their lilo
# file before running make install
echo " All Completed.
If you have not already edited
/etc/lilo.conf
as needed please do
and run lilo afterword"
If you do not know how to make that a exacutabl script let me know
Now that we have that out of the way we can realy mess things up and
not worry about fubaring your system.
Now run the script. If you do not know what an option does by hart
check the help for it and in most cases it will tell you if you need
this or not. If it says "good idea" or anything like that then say
yes. Now if you don't get a working kernel from this you have other
issues that need addressing. If it boots correctly then start
removing a hand full of options at a time from the working config
until it breaks. Why do it the long way like this? Because thats how
you learn. I built many many kernels with realy strange bugs in my
early days. who whould have thought that pts support would be handy?
=).
Now I could probably cross compile you a kernel if I knew what type of
system you had and then ftp it for you with out ever having typed on
your computer based on the experiance I got from this style of
learning. Hands on is the way to learn.
--
It's a damn poor mind that can only think of one way to spell a word.
- Andrew Jackson
UIN=66618055