LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2002, 07:15 AM   #1
RichardP
LQ Newbie
 
Registered: Jan 2002
Location: London, UK
Distribution: Redhat 7.2
Posts: 5

Rep: Reputation: 0
Unhappy Problems compiling RedHat 7.2


:smash:

I've spent a long while trying to recompile Redhat 7.2.

My problem is that I want to turn on Token Ring support. So here was my plan. Get the source installed from the RedHat 7.2 cd's, grab the arch/i386/defconfig file and copy it to .config. Using either make xconfig or make menuconfig edit .config to include TR support. Then:

make dep && make clean
make bzImage
make modules
make modules_install
cp System.map /boot/System.map-x.x.x
cp arch/i386/bzImage /boot/bzImage-x.x.x
modify lilo.conf and run lilo -v -v (I like to see the output!)

Ok. the above was from memory so ignore the spelling mistakes and the x.x.x versions...

The machine boots and lilo appears, I select the new kernel and it loads... The last section on the screen are two Yenta messages listing IRQ's and then the system hangs. It looks to me that the kernel has actually loaded but it's at the stage where it hands over to /etc/rc.d/init.d to boot up the demons etc, I don't think it's mounted '/' at this point. When I built the system I partitioned '/boot' seperate from '/' so perhaps /boot is mounted and '/' needs to be aswell?....

Could someone let me know how to sort out this problem.

Thanks

R.
 
Old 01-30-2002, 07:38 AM   #2
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
In RH7.0 and 7.1, I do it a different way. Actually I do it to the word, the way the INSTALL files says (mostly because I'm too lazy to do it otherways).

It works something like

% make mrproper

...

% make xconfig

... (nice graphical tool)

% make dep

...

% make bzImage

The new bootable image resides arch/i386/bzImage. As a hint, try recompiling without adding / deleting modules. In other words don't configure anything.

If the image compiles and leaves a bzImage you know that at least the compiler works properly.

Then try adding modules or trimming the kernel down. Often, I don't compile the kernel properly (I think you have to know a lot of stuff to get it JUST right for your machine) and it hangs at boot.

Try using grub. It's much simpler than lilo.
 
Old 01-30-2002, 07:45 AM   #3
RichardP
LQ Newbie
 
Registered: Jan 2002
Location: London, UK
Distribution: Redhat 7.2
Posts: 5

Original Poster
Rep: Reputation: 0
It's not the compile that is the problem... I get the bzImage and copy it to the /boot area...

The image even boots up.... but it hangs during boot... I don't think the <root> partition is mounted, so the system hangs. (I could be completely wrong!)

I tried a recompile with no changes and the same happens.

R.
 
Old 01-30-2002, 08:09 AM   #4
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Right, I see.

Then grub is the only thing I can recommend (of course, if you can't get a shell, this is not much use ... )

Grub can load the image from anywhere on the drive.

Get it at http://www.gnu.org/software/grub/grub.html or ftp://alpha.gnu.org/pub/gnu/grub.

and ..

tar -xzvf grub-0.5.96.1.tar.gz
cd grub-0.5.96.1
./configure
make
make install

I believe I heard grub is the preferred bootloader for distros after RH7.1.

Can you get a shell ? Have you tried rescue mode?

If neither works, a reinstall may be necessary - these things are set to test us ...

Bert
 
Old 01-30-2002, 09:18 AM   #5
RichardP
LQ Newbie
 
Registered: Jan 2002
Location: London, UK
Distribution: Redhat 7.2
Posts: 5

Original Poster
Rep: Reputation: 0
... still no luck...

I've installed the version of Grub which comes with RedHat 7.2 (v0.9)....

I've added the new Kernel to the grub.conf file using the same settings as the existing one (apart from the kernel name). Rebooting gives exactly the same problem. The kernel which comes with redhat works a treat... the compiled one is not happy at all.

As you mentioned, I'm tempted to reinstall. I may just have one big <root> file system with everything installed. At least that way I know everything is available.

Thanks for your help.

R.
 
Old 01-30-2002, 11:24 AM   #6
RichardP
LQ Newbie
 
Registered: Jan 2002
Location: London, UK
Distribution: Redhat 7.2
Posts: 5

Original Poster
Rep: Reputation: 0
Still no luck....

Here is what I've done...

Wipe hard disk...
Install Redhat 7.2 from scratch, selecting default options for everything...
login as root
cd /usr/src/linux-2.4
cp arch/i386/defconfig .config
make mrproper
... time passes
make config (.config loaded as defaults ... accept all defaults)
make dep
... time passes
make clean
... time passes
make bzImage
... time passes
cp System.map /boot/System.map-2.4.7-10custom
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.7-10custom
make modules
make modules_install
vi /boot/grub/grub.conf
... copy the existing Red Hat Linux section to a new section. Replace 2.4.7-10 with 2.4.7-10custom in the new section.
cd /boot
mkinitrd initrd-2.4.7-10custom.img 2.4.7-10custom
shutdown -r now

....
Machine reboots...
select Red Hat Linux (2.4.7-10custom) from the grub menu
Kernel starts to boot... and hangs.

Same place, same problem.

CTRL-ALT-DEL to reboot... select Red Hat Linux (2.4.7-10) from the grub menu.... and in we go.

Looking at the boot up screens the custom install stops just before the mounting root section in the normal bootup.

Ideas anyone?

Thanks

R.
 
Old 01-30-2002, 11:47 AM   #7
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
The install or readme file tarred with the kernel image gives instructions on this, which I stick to.

This is how I do it and it always works for me:

everything on the root ( / ) partition apart from the swap and /boot.

% cd /usr/src/linux/

(the README actually says copy the source out of this area)

% make mrproper
% make xconfig
% make dep
% make bzImage

In the menu.lst on the grub floppy (for test purposes to make sure that it's pointing to the right place) give the path to the bzImage.

If you need some more details on how to configure grub, have a look at an old post of mine under an old alias here .

Hope this is of some help.

Bert
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems compiling 2.6.x kernel on RedHat 8.0 africantiger Linux - Newbie 0 07-13-2004 10:42 PM
Problems installing amsn (TK compiling problems) JNewton Linux - Software 0 05-24-2004 01:07 PM
Compiling redhat 9.0 cholzsc1 Linux - Software 10 07-14-2003 07:50 PM
Problems compiling .c files in RedHat Linux 8.0 evanmac Linux - General 1 03-02-2003 12:05 AM
problems compiling ac97_codec.c in Redhat 7.3 Luis Alvarado Linux - Hardware 2 07-14-2002 09:57 PM


All times are GMT -5. The time now is 10:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration