LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Kernel!! (https://www.linuxquestions.org/questions/fedora-35/kernel-434458/)

vishamr2000 04-12-2006 08:46 AM

Kernel!!
 
Hi to all,

I ususally compile a new kernel in the following way:

cd /usr/src
bzip2 -d linux-2.6.16.tar.bz2
tar- xvf linux-2.6.16.tar
cd linux-2.6.16
make xconfig
make bzImage
make modules
make modules_install
make install


The problems that I usually get is that when I boot with the new kernel, my floppy and CDROM drives do not work. I have a lot of problem selecting options when I do 'make xconfig'. I know which h/w I have on the machine but I get confused as to what to choose. Is there a way by which I can use the options that were automatically selected when I had installed Fedora Core 4 from CD and then add the new options I choose in the new kernel? Does the following command do it:

cp -p linux/.config linux-2.6.16

I believe if this the way, then I'll have to issue it before the 'make xconfig' command. How far is this right?


Any help will be most welcome..

Warm regards,
Visham

Lenard 04-12-2006 09:08 AM

Try the following steps to build your kernel (note; this is a little bit different then what you are used to doing);

cd /usr/src
bzip2 -d linux-2.6.16.tar.bz2
tar- xvf linux-2.6.16.tar
cd linux-2.6.16
<add any patches here>
make mrproper (only needed if you add patches or are rebuilding/starting over)
make oldconfig (gets you a starting point for your new kernel)
make xconfig
make (this takes the place of the make bzImage and modules commands)
make modules_install
make install

While your working with the xconfig you can tweak to match your hardware and not worry as much about what to select. Your copy command should work also instead of the 'make oldconfig' command. Make sure that the IKCONFIG and IKCONFIG_PROC support is enabled, makes things a bit easier the next time.

vishamr2000 04-12-2006 10:06 AM

Hi Lenard,

Many thx for the prompt reply..I'll give the steps you listed a try right away.

One thing though..under which options do I find the IKCONFIG and IKCONFIG_PROC support?

Warm regards,
Visham

vishamr2000 04-12-2006 12:48 PM

Hi,

I compiled the 2.6.16 kernel the way you told me on my Toshiba laptop, which is running Fedora Core 4, and I got the following errors:

mkrootdev: label /1 not found
mount: error 2 mounting ext3
ERROR opening /dev/console!!!!:2
error dup2'ing fd of 0 to 0
error dup2'ing fd of 0 to 0
error dup2'ing fd of 0 to 0
error dup2'ing fd of 0 to 0
switchroot: mount failed: 22
kernel panic - not syncing: Attempted to kill init!

I know that there are 2 main ways by which you get "kernel panic" message:-
1) the EXT3 filesystem has not been statically compiled inot the kernel directly and has been compiled as a loadable module,

2) the parameters passed to the "root=/LABEL=/1" are incorrect


My grub.conf is as follows:

#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.16)
root (hd0,5)
kernel /boot/vmlinuz-2.6.16 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.616.img
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,5)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
title Other
rootnoverify (hd0,0)
chainloader +1


My disk info is as follows:

/dev/sda
sda1 1 1530 12002 ntfs
sda2 1531 4838 25949 Extended
sda5 1531 3570 16002 ntfs
sda6 3571 4707 8919 ext3
sda7 4708 4838 1028 linux-swap
4839 4864 204 Free space

Can anyone see where the problem might be? What parameters can I pass to root when I boot in the 2.6.16 kernel?

Any input will be very much appreciated..

Warm regards,
Visham

Lenard 04-12-2006 02:05 PM

You seem to be missing the kernel developmet packages,see;

http://fedora.redhat.com/docs/releas...fc5/#sn-Kernel Section 8.6 step 1

You can fix your booting (for now) to the 2.6.16 by editing the like;

kernel /boot/vmlinuz-2.6.16 ro root=LABEL=/1 rhgb quiet

to read;

kernel /boot/vmlinuz-2.6.16 ro root=/dev/sda6 rhgb quiet

vishamr2000 04-12-2006 02:28 PM

I actually did try the root=/dev/sda6 after issuing the 'df' command to check for the parameter to put , but no change..I still got the same errors.

Can you post a URL for me to get the kernel development packages for a 2.6.16 kernel on FC4..my NIC is not recognised on FC4 at the moment..that's why i'm trying to compile a new kernel in order to add support for it.

Many thx..
Visham

Lenard 04-12-2006 05:09 PM

Wait a sec, which nic??? Which Toshiba laptop???

Reason for asking, is you may be able to find the help you need here;

http://www.linux-on-laptops.com/toshiba.html

Sorry, can't help you with a link for the FC4 kernel development tools. But you might be better off bringing you system current, for example from;

ftp://download.fedora.redhat.com/pub...pdates/4/i386/

kernel-2.6.16-1.2069_FC4.i686.rpm 15283 KB 03/29/2006 06:13:00 PM

yum is really good at doing all of this work for you quichly;

http://fedora.redhat.com/docs/yum/index.html

vishamr2000 04-13-2006 03:46 AM

Hi Lenard,

About upgrading the kernel development packages, if I install the kernel devel packages for a 2.6.16 kernel, will it not overwrite the files of the default kernel that ships with FC4, i.e 2.6.11-1.1369? Will it cause problems when I boot in the default kernel?

As for the laptop, it's a Toshiba Satellite A80. I did check this website. It's the NIC on the laptop (Marvell Yukon) thatis creating all the problems. It's not recognised by FC4. I tried to install the kernel devel packages for the default FC4 kernel but no success. That's why I'm now trying to compile a new kernel on it from scratch and then install the driver for the NIC on it.

But I got stuck since the new kernel won't boot, giving the errors listed above :(

Regards,
Visham

Lenard 04-13-2006 06:44 AM

Thanks for the info about the nic and laptop..... this looks interesting;

http://www.tmeyer.de/toshiba_a80_154.html <--Quoting;

Update: The problem still persists with Linux 2.6.14. The Marvell/Yukon drivers (there are two now) both will not work on the Toshiba.

Download the new driver source here: SysKonnect Linux driver download page. Choose product "PCI Express Desktop Adapter: SK-9E21D", Type "Driver", System "Linux", click "Search" and download the driver.


I went a did some google searches and came up with an idea why your custom kernel fails to boot; https://www.redhat.com/archives/taro.../msg00224.html

In the .config file 'Block devices' section check for;

CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_BLK_DEV_INITRD=y

The kernel-devel2.6.16 rpm for FC4 is not the development tools I was speaking of, you do seem to have them afterall. You would not have been able to build a kernel without them.

vishamr2000 04-13-2006 03:55 PM

Hi,

I recompiled everything as showed in the webpage http://www.tmeyer.de/toshiba_a80_154.html. The NIC still does not work. I had already dwled the driver and tried installing but it didn't work. I had to disable it because it prevented the kernel compilation. I no longer get the "kernel panic" msg, which is a great relief. however, the laptop hangs after displaying the boot statements like:

Setting hostname localhost.localdomain: [oK]
Setting up Logical Volume Management: No volume groups found [oK]
Checking filesystems [OK]
Remounting root filesystems in read-write mode: [OK]
Mounting local filesystems: [OK]
Enabling local filesystem quotas: [OK]
Enabling swap space: [OK]

At this point, i just have my cursor blinking and it stays like that..Any ideas as to what might be wrong?

I also saw these msgs:

1) Warning: /etc/modprobe.conf line 1: ignoring bad line starting with 'Cannot'

2) Checking for new hardware: You are attempting to run "system-config-display" which requires administrative priviledges. but more info is needed in order to do so.
Password for root:

When I enter my root password, it gives me an error.

Lenard 04-13-2006 06:09 PM

Boot with the older kernel and disable the service kudzu;

chkconfig --levels 345 kudzu off

Afterall how often do you change hardware in your laptop.

vishamr2000 04-14-2006 01:26 AM

Yep it now boots into the new kernel..really many many thx for all the effort you've made to help me solve these problems..without it, I don't know in what state I would have been ;-)

It's just the NIC configuration that is still causing problems..and making it work is vital for me.

Do you think if I should boot in the new 2.6.16 krnel, install the kernel headers packages for a 2.6.16 kernel and then try to install the driver? will it not overwrite the files of the default kernel that ships with FC4, i.e 2.6.11-1.1369? Will it cause problems when I boot in the default kernel?

Warm regards,
Visham

Lenard 04-14-2006 06:41 AM

Quote:

Originally Posted by vishamr2000
Yep it now boots into the new kernel..really many many thx for all the effort you've made to help me solve these problems..without it, I don't know in what state I would have been ;-)

Your welcome, glad to help.

Quote:

It's just the NIC configuration that is still causing problems..and making it work is vital for me.
Maybe possible using ndiswrapper and the Windows drivers;

http://ndiswrapper.sourceforge.net/

This site a fairly good hardware section check it out.


Quote:

Do you think if I should boot in the new 2.6.16 krnel, install the kernel headers packages for a 2.6.16 kernel and then try to install the driver? will it not overwrite the files of the default kernel that ships with FC4, i.e 2.6.11-1.1369? Will it cause problems when I boot in the default kernel?
Installing the kernel headers packages is not needed, you have the source code and the headers already. The kernel headers packages are good to build drivers for the supplied binary kernels.

Now that your happy with your new kernel, if you want you can go back to where you built the kernel and do;

make rpm (creates the source and binary rpm packages for your kernel)

cd /usr/src/redhat/RPMS/<arch>

rpm -i <kernel-version>.arch.rpm --justdb

This adds the package only to your installed rpms database, does not install the binary rpm, no need as it is already installed. But now if desired one can remove older kernel(s) with; rpm -e kernel-<version_number>

vishamr2000 04-15-2006 05:09 AM

Hi,

I checked the ndiswrapper..basically for wireless NICs. The NIC I have is a Marvell/Yukon Fast Ethernet..I heard that it is detected by Fedora Core 5 and it works without any problem..is there a way to copy a file or the driver file from FC5 and try toinstall it in FC4?

Regards,
Visham

Lenard 04-16-2006 11:02 AM

No, but it is possible to download the FC5 kernel source and build your own. Note this will require a bunch of work, as the FC5 kernel makes use of new tools like hal. pcmciautils and udev.

Hmmm.... while thinking about this reply. This might be your problem with your custom built 2.6.16 kernel.....

$ uname -a
Linux Aspire5000 2.6.16.5 #1 Thu Apr 13 14:13:09 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux

$ rpm -qa --queryformat="%{n}-%{v}-%{r}.%{arch}.rpm\n" 'pcmciautils' 'udev*' 'hal*' | sort
hal-0.5.7-3.i386.rpm
hal-0.5.7-3.x86_64.rpm
hal-devel-0.5.7-3.x86_64.rpm
pcmciautils-012-1.x86_64.rpm
udev-084-13.x86_64.rpm

All the binary rpms above are built from the FC5 source rpms.


All times are GMT -5. The time now is 03:21 AM.