LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-20-2004, 10:37 PM   #1
dick220369
LQ Newbie
 
Registered: Jan 2004
Posts: 8

Rep: Reputation: 0
Can't get recompiled kernel to load!!!!!


i am running suse 9.0 for amd64 and have just tried to upgrade to kernel 2.6.1 using the following instructions which i followed to a 'T' :

cd /usr/src
**"Change Directory To /usr/src"**

ls -alc
**"check for symlink (ex. /usr/src/linux->/usr/src/linux-2.4.18)"**

file linux
**"double check with this command (output ex.) linux: symbolic link to linux-2.4.18-14"**

rm linux
**"remove symlink"**

tar -zxvf linux-x.x.x.tar.gz
**"unpack the tarball (new kernel)"**

ln -s /usr/src/linux-x.x.x /usr/src/linux
**"make a new link to the new kernel"**

cd linux
**"type this to change to the directory"**

----------------------------
Now Comes The Fun Part~!
----------------------------
make mrproper
**"this removes the current .config and other files"**

cp /usr/src/linux-2.4.x/.config /usr/src/linux
***this is if you want to use your old config***

<-->Your Choice<-->
make config
**"basic config from terminal"**
make bzImage
**"to make the kernel image (compile and creates compressed image of kernel)"**
make modules
**"compile your selected modules"**
make modules_install
**"to install newly compile modules (installs to /lib/modules/linux.x.x.x)"**


--------------------------------------------
Now Its Time To Install Your New Kernel~!
--------------------------------------------

Remove the following links:
rm -rf /boot/System.map
rm -rf /boot/vmlinuz

Then copy the newly created kernel and system.map to /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-x.x.x
cp /usr/src/linux/System.map /boot/System.map-x.x.x

Make the new links:
ln -s /boot/vmlinuz-x.x.x /boot/vmlinuz
ln -s /boot/System.map-x.x.x /boot/System.map

Next remove existing initrd.img file:
rm -rf /boot/initrd.x.x.x.img

..And create the new one:
/sbin/mkinitrd /boot/initrd-x.x.x.img x.x.x
(Note: )
The last set of x.x.x is the eqivalent to your new kernel version and it looks to /lib/modules for that version.

<-> And Finally Edit Your /etc/lilo.conf file <->
image = /boot/vmlinuz-x.x.x
label = New Kernel
root = /dev/hdx
read-only

Exit and Save lilo.conf
type "sbin/lilo"

AND REBOOT!!!

but upon rebooting i get the following message :

ACPI : ( supports s0 s1 s3 s4 s5 )
started krxiod 20
started krsecd 21
md : Autodetecting RAID arrays
md : autorun ...
md : ... autorun DONE
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 file system).
Mounted devfs on /dev
VFS: cannot open root device "302" or unknown -block(3,2)
Please append a correct "root=" boot option
Kernel panic VFS: Unable to mount root fs on unknown-block(3,2)

this is about my 10th recompile, albeit using different HOW-TO's. i'm fed up having to reload linux and start again.

please can someone give me an idea of what's happening. its not filesystem support related because i've recompiled all available filesystems straight into the kernel and not as modules. the same for chipset options.
 
Old 01-20-2004, 10:42 PM   #2
Joey.Dale
Member
 
Registered: Jun 2003
Location: Tampa, Fl
Distribution: Gentoo, Slackware
Posts: 828

Rep: Reputation: 39
it should have been
make mrproper
make dep
make clean
make bzImage
make modules
make modules_install
make install (works on most distros)
 
Old 01-21-2004, 01:22 AM   #3
demmylls
Member
 
Registered: Aug 2003
Location: AT
Distribution: Fedora Core 3
Posts: 404

Rep: Reputation: 30
i think you did compile ext2/ext3 file system into kernel.
you must not make ext2/ext3 FS as modules because it havent loaded into kernel yet when bootup.
compile ext2/ext3 fs (depend on you partition format) into kernel.

if you really want to compile it as module then there a way areund it by using initial memory.
that i not quite sure how to do it you should search goole for it.

i got the same problems as you.
 
Old 01-21-2004, 06:42 AM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
Quote:
Originally posted by Joey.Dale
it should have been
make mrproper
make dep
make clean
make bzImage
make modules
make modules_install
make install (works on most distros)
well if you noticed he is compiling a 2.6.1 kernel and the steps he is doing are correct... the is actually my howto, and he just modified it down to the steps he has taken ..
anyways, the point at hand, i actually had the same error lastnight compiling the 2.6.1 kernel on my box, but it was actually after a successful compile ...
when i did it i forgot to include support for my highpoint raid, and 3 of my harddrives didn't pick up so i backed up my config, did make mrproper and then did an oldconfig and just added that stuff, but i got that error ..
the only thing i did to correct my problem was remove the source directory and kernel in /boot , and re-extracted the tarball and started fresh again ... and again i had a successful compile ...
i have no idea how this error comes about, because i know i have the right lilo entries, because as i stated, i did compile twice successfully with the same lilo entries, but yet it said its wrong ...
so i guess if you don't mind you could post your lilo.conf file if you could (not only the new entries), or you could try from scratch if you want ...

p.s. its just you having bad luck, not that the howto doens't work just keep at it
 
Old 01-21-2004, 08:59 AM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
i too had faced this problem.
but it got rectified after i used the correct config file and installed the new tools which came along with 2.6 kernel
at
http://people.redhat.com/~arjanv/2.6/RPMS.kernel/
at least install modutils,initscripts,mkinitrd.
if they do not install ,install them using --force in rpm command
after that i compiled the source again and the same procedure
make bzImage
make modules
......

and it worked.
since ur not using redhat check out binaries for ur O.S
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recompiled kernel failing thelonewolf Debian 10 08-02-2005 10:10 PM
XFree86 won't with recompiled kernel imwithstupid Mandriva 0 11-01-2004 10:33 AM
recompiled kernel 2.6.3-13 what does this mean? rbonafied Mandriva 8 06-07-2004 12:00 PM
recompiled kernel not in use taoweijia Linux - Newbie 1 01-09-2004 08:33 AM
recompiled kernel and no vmlinuz.old or kernel module for Nvidia Bruce Hill Slackware 13 12-11-2003 01:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration