LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 01-22-2007, 09:53 AM   #1
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Rep: Reputation: 15
unable to boot from lfs 6.2 after kernel compilation


dear list,

- i have successfully compiled all the modules as mentioned in lfs 6.2 book.
- the kernel is successfully compiled with few warnings.
- i have the following partitions

hda1 - fc3 host
hda2 - swap
hda4 - extended
hd5 - lfs
hd6 - /usr (lfs target /usr)

- i have modified the fedora grub.conf as following

root (hd0,0)
kernel /vmlinuz(fedora 3)
initrd /initrd.img

root (hd0, 4)
kernel /lfskernel-2.6.16.27 root=/dev/hda5

- i have no clue why my lfs would not boot.
in the boot up process the kernel is unable to uncompress the bzImage (which is previously produced by the compilation of source kernel). as mentioned by the lfs book, i have copied this bzImage into the lfs directory /boot.

- after failing to uncompress the bzImage of the target lfs system, my machine reboots and again grub appears. i dont have any error message displayed like kernel panic as it seems I am struck in a too early starge.

please SOS. thanks in anticipation.

-----------
host FC3
vga - S3 chrome
monitor - generic 600 x 800
hdd - 80 gb seagate
512 mb ram
 
Old 01-22-2007, 10:37 AM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
Is it possible that the decompression tools reside in /usr/bin (which would not be available so early in a boot) as opposed to /bin?
 
Old 01-22-2007, 01:16 PM   #3
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Original Poster
Rep: Reputation: 15
unable to boot from lfs 6.2 after kernel compilation

dear daws,

many thanks for your help. as suggested i have copied bzunzip from /bin to /usr/bin. still my kernel never seems to uncompress. besides i am not sure about the problem, as its based on my assumption. could there be any other reason besides this.

any pointers. thanks once again.

best regards
 
Old 01-22-2007, 01:58 PM   #4
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
Hmm ok.

You say

Quote:
i have copied this bzImage into the lfs directory /boot.
so try changing the grub menu.lst to reflect this (sometimes using grub notation works better)

so the kernel line would become:

Code:
kernel (hd0,4)/boot/lfskernel-2.6.16.27 root=/dev/hda5
See if that works.
 
Old 01-22-2007, 11:00 PM   #5
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Original Poster
Rep: Reputation: 15
unable to boot from lfs 6.2 after kernel compilation

dear daws,

as mentioned in the beginning of this thread i have pointed the full path in my /boot/grub/menu.lst

could there be anything else, i have to check. kindly advise.

best regards
 
Old 01-23-2007, 10:58 AM   #6
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
Quote:
root (hd0,0)
kernel /vmlinuz(fedora 3)
initrd /initrd.img

root (hd0, 4)
kernel /lfskernel-2.6.16.27 root=/dev/hda5
I don't like the whitespace in "(hd0, 4)". Try changing it to "(hd0,4)".
 
Old 01-23-2007, 11:48 AM   #7
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
This is true, I didn't notice that. But I think something else is going on. grub seems to find the kernel alright, otherwise it would be a different error, not "unable to decompress".

Oh I found something else. Apparently all kernels are compressed with gzip, bzImage does not mean bzip2 compressed (apparently it gets put into "High memory" or something, went straight over my head anyway). So make sure all gzip related tools are in /bin not /usr/bin.

Code:
mv -v /usr/bin/gzip /bin
rm -v /usr/bin/{gunzip,zcat}
ln -sv gzip /bin/gunzip
ln -sv gzip /bin/zcat
ln -sv gzip /bin/compress
ln -sv gunzip /bin/uncompress
Apart from that I don't know what is going on.
 
Old 01-23-2007, 12:56 PM   #8
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Original Poster
Rep: Reputation: 15
unable to boot from lfs 6.2 after kernel compilation

To

Vitalie Ciubotaru - For your kind attention to this thread
Daws - For your patience and continous attention

Together sorry for this long message

Why we want LFS
---------------
- We need our own custom kernel without distribution specific images, logo and availablity of OS commands
- We have a specific slow but new hardware for mass production
- the hardware is 8" chinese b/w monitor, SChrome VIA Vga Card, VIA PC 1500 barebone

problem in reproducing the code
-------------------------------
my fc3 vga is a little bit shaky making the system hang if too many scrolling is done (in firefox, etc and whatever), making me impossible to cut and paste my menu.lst or grub.conf. what i have tried to do is reproduce the code here. forgive me if they are not exact. (dear vitalie, in my menu.lst there is no white space, its only in my mail. sorry for the not typing exactly as it appeared.)

what we did differently other than what is mentioned in lfs book
---------------------------------------------------------------
- i have two seperate partitions one for / for target lfs in hda5 and another for /usr in hda6. hd5 and hd6 resides in extended partition hd4. hd1 for fc3 and hd2 for swap. hd3 is not represented by any partition.

anything looked strange ?
-------------------------
- except kernel compilation which had few warnings there was no other noticable error or warning for cause of concern during the entire lfs unpack, configure and make process.

- kernel was recompiled after removing the source/linux-2.6.16.27 directory completely after unsuccessful booting and rebooting of lfs

output during boot process (not exact representation)
-----------------------------------------------------

Quote:
kernel /lfs-2.6.16.27 root=/dev/hda5
[linux-bzImage, setup=0x1400, size=0x15efb]
then my machine reboots and grub appears again. hope i have not confused you. thanks for your time.

best regards
 
Old 01-23-2007, 01:07 PM   #9
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Original Poster
Rep: Reputation: 15
Dear Daws,

In a hurry to finish the message, i have forgotten to mention that I have done as what you have said.

Quote:
mv -v /usr/bin/gzip /bin
My gzip resides only in /bin so i did not do this step.

Quote:
rm -v /usr/bin/{gunzip,zcat}
same here

Quote:
ln -sv gzip /bin/gunzip
ln -sv gzip /bin/zcat
ln -sv gzip /bin/compress
ln -sv gunzip /bin/uncompress
for all the first 3 commands i received
gzip exists
gzip exists
gzip exists

the last one successfully created gunzip link.

Sorry for my impatience once again.
 
Old 01-23-2007, 04:17 PM   #10
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
Quote:
kernel /lfs-2.6.16.27 root=/dev/hda5
[linux-bzImage, setup=0x1400, size=0x15efb]
I have seen things like this before, on my own system more often than not.

I understand what you mean now, where the system hangs at

Uncompressing kernel ...

The problem may lie in the configuration of the kernel. It is possible that you have forgotten to compile in support for something key in the system. Maybe the filesystem (which should not be a module), or support for the chipset, or you have enabled some experimental code (what I did) by accident... The list goes on. I'm afraid you have to go through the configuration again, recompile and hopefully, after some trial and error, you will find what went wrong.

Sorry I couldn't be more specific. Hope it works out...

Last edited by Daws; 01-23-2007 at 04:19 PM.
 
Old 01-24-2007, 11:05 AM   #11
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
I have seen things like this before, on my own system more often than not.
mate. though its not a good thing, this is the only hope for me now :-)

I understand what you mean now, where the system hangs at

Quote:
Uncompressing kernel ...
i am expecting this but this text never appears.

Quote:
The problem may lie in the configuration of the kernel. It is possible that you have forgotten to compile in support for something key in the system. Maybe the filesystem (which should not be a module), or support for the chipset, or you have enabled some experimental code (what I did) by accident... The list goes on. I'm afraid you have to go through the configuration again, recompile and hopefully, after some trial and error, you will find what went wrong.
Actually I have selected all the option during the previous compilation. Now I have select only certain things that I feel is absolutely necessary. yet no success. I guess i need to make another try and another and another ... :-(. Also I am thinking of making a diff between the .config of LFS and the .config of my FC3 host to see what goes wrong in my compilation.

i have noted some warnings in my compilation and again this is not an exact representation of the output.

fs/bio.c - in function bio_alloc_bioset
warning idx may be used uninitialized in this function

fs/eventpoll.c - in function .............
fs/isofs/namei.c
fs/nfsd/nfsctl.c
fs/udf/balloc.c
fs/udf/super.c
ipc/msg.c
ip/sem.c

sound/core/oss/route.c
i368/math-enu/fpu_entry.c

i have an interesting output when i compiled bzimage and module seperately. the output is

Quote:
Root device is (3,5)
Boot Sector 512 bytes
Setup is 7007 bytes
System is 1942 kb
Kernel: arch/i368/boot/bzImage is ready(#1)
I hope i can give some more clue.

Quote:
Sorry I couldn't be more specific. Hope it works out...
No problems mate, in fact you are my only hope now in the entire community. I wonder why there is no body to reply in the lfs-support@linuxfromscratch.org. may be its due to my poor english.

Reverting ... after a diff of .config

Best Regards
 
Old 01-24-2007, 02:52 PM   #12
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Post verbatim (and in [[code] tags) your grub.lst, output of 'ls -l /boot' on hda5, output of 'fdisk -l /dev/hda', and your kernel configuration.
 
Old 01-26-2007, 11:43 AM   #13
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Original Poster
Rep: Reputation: 15
Dear Daws + List,

I have recompiled and reduced my warnings during compile to a bare minimum. I have read in the redhat manual that certain older bios will not support booting of linux if the hdd cylider is above 1024. So i have backed up the lfs to a new hdd (hdc) in the beginning cylinder. however, i am unable to boot as my grub is not able to find the stage1 located in /boot/grub/

i entered the chroot environment and my grub output is below when i type setup (hd1,0).

Code:
checking if "/boot/grub/stage1" exists ... no
i am sure that stage1 exists in that location. now i guess if i my grub detect my stage1, i can see if the cylinder on which my linux resides is a problem or not.

any pointers.
 
Old 01-26-2007, 11:47 AM   #14
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Run
strace -o log grub
, do the same things and post contents of file log.
 
Old 01-28-2007, 04:44 PM   #15
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
OK this is getting a bit beyond my ability now, all I could offer is guesses. However I do suggest that you ask a mod nicely to move this thread (maybe rename it too) to a different forum, maybe Linux - Kernel or Linux - General. Both forums receive more traffic than the LFS forum and perhaps regulars there will be able to help.

Quote:
I wonder why there is no body to reply in the lfs-support@linuxfromscratch.org. may be its due to my poor english.
There is thread around here somewhere about this, lfs-support do not normally ignore requests for help, it may be due to their strict spam filters. I do not believe they ignored your message due to poor english.

PS. raskin seems to know what he is talking about so it would be in your best interests to follow his advice and post the infomation he and others request if you can.

Good Luck. I hope you get it sorted.
 
  


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
Unable to boot kernel erpe Debian 3 07-13-2006 05:58 PM
Unable to boot any kernel after compile BobNutfield Slackware 13 03-14-2006 02:08 PM
ncurses compilation problem in LFS 5.1.1 lik Linux From Scratch 2 01-14-2005 10:25 PM
kernel problem unable to boot jwijesundra Linux - General 1 01-08-2005 03:10 AM
kernel won't boot after compilation dbzdeath Linux - Software 2 05-06-2003 11:45 AM


All times are GMT -5. The time now is 11:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration