LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 05-16-2010, 06:45 AM   #1
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Rep: Reputation: 15
Angry Horrible ordeal trying to boot LFS. Tried older version - won't boot either


I spent days on 6.6, finally i gave up, i couldnt get it to boot it would have a kernel panic.... Now i tried 6.5 since 6.6 didnt work. Now grub wont compile, i assume its because i have an x64, the book says to use LILO instead in that case, but provides no instructions as to how to do that, and grub is bad enough with instructions so im not going at LILO blind, so i follow the instructions for grub2 from 6.6 instead...

Now i reboot for the test and i am able to get to command prompt for grub2. Following the book (6.6) type
Code:
grub> root (h0,1)
it finds it and thinks its ext2 (i thought its ext3 but whatever). Than i try the next command
Code:
grub> kernel /boot/grub/core.img
but it says it can't find it (even though its there) so im unable to boot of course......

Before when i issued
Code:
 grub-mkconfig -o /boot/grub/grub.cfg
it put the path to the root and kernel. This time it put almost nothing. This is my current grub.cfg

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

Now my computer is partitioned with lfs on the very first partition. I told it (hd0,1) which as i understand is correct for grub2. I really have no clue what if anything i am doing wrong or if lfs or linux in general has developed a soul to hate me with, but id really like to make it boot?
 
Old 05-16-2010, 09:20 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello,

It's so strange that you didn't get it to work. There must be some typo made along the way. I'm no expert at all and I got mine running. Can you mount (since you cannot boot) the LFS partition and post the output of
Code:
ls <mountpoint>/boot
Kind regards,

Eric
 
Old 05-16-2010, 09:57 AM   #3
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hello,

It's so strange that you didn't get it to work. There must be some typo made along the way. I'm no expert at all and I got mine running. Can you mount (since you cannot boot) the LFS partition and post the output of
Code:
ls <mountpoint>/boot
Kind regards,

Eric
ls */boot
Code:
config-2.6.30.2  grub  lfskernel-2.6.30.2  System.map-2.6.30.2
 
Old 05-16-2010, 10:34 AM   #4
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello,

From the LFS 6.6 book, page 214 (Linux-2.6.32.8) comes this quote:
Quote:
The filename below can be changed to suit your taste, but the stem of the filename should be vmlinux to be compatible with the automatic setup of the boot process described in the next section. The following command assumes an x86 architecture:
Code:
cp -v arch/x86/boot/bzImage /boot/vmlinux-2.6.32.8-lfs-6.6
You apparently didn't follow the book as you should because your kernel image has the name
Code:
lfskernel-2.6.30.2
which, following the book, is advised to begin with vmlinux to be compatible with the boot setup.

Can you check and redo the kernel part and the GRUB part? I'll bet you'll have better results then. Just follow the book and don't change anything to customize to your likings unless you know exactly what your doing and to what packages your changes might affect.

Kind regards,

Eric
 
Old 05-16-2010, 10:59 AM   #5
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hi,

Please disregard my previous post, I just checked the LFS 6.5 book which mentions the lfskernel name. That's apparently a change they made in 6.6 using the new Grub.

I'd just try to run the Grub part again to see if it detects your kernel correctly.

Kind regards,

Eric
 
Old 05-17-2010, 02:51 AM   #6
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
which, following the book, is advised to begin with vmlinux to be compatible with the boot setup.
Ok, that was why it wasnt booting. Now its able to boot to the LFS bootloader, but crashes from there. Im thinking it just doesnt work on 64 bit machines without a 32 bit host.
 
Old 05-17-2010, 02:59 AM   #7
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hi Lyle,

A question, have you compiled everything for 32bit environment and changed to 64bit where packages indicated what should be done for 64bit? Having a 64bit CPU doesn't mean you HAVE to compile for that architecture. You can perfectly compile everything, just following the book, for a 32bit platform. I haven't tried to compile a full 64bit LFS yet but from what I've noticed reading the book, it doesn't always seem clear where you need to apply changes all the time.

Also once you have compiled everything following the LFS book you should be able to boot into LFS. The host is not needed any more after the full completion of the LFS book. You should be able to boot into it, if not then most likely you have made a mistake.

I remember from my last run loosing 4 hours just because of a space character I typed in by mistake.

Kind regards,

Eric

Last edited by EricTRA; 05-17-2010 at 03:01 AM.
 
Old 05-20-2010, 12:39 PM   #8
Lyle
Member
 
Registered: May 2010
Location: Guyana, South America
Distribution: Debian, Sabayon
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hi Lyle,

A question, have you compiled everything for 32bit environment and changed to 64bit where packages indicated what should be done for 64bit?
I don't recall anything specific to 64-bit except some symlinks which i did do. Did i overlook something?
 
Old 05-20-2010, 12:42 PM   #9
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hi,

Since I only did the 32bit part I wouldn't be able to tell you, but I assume it's a 'tricky' part that has to be well looked at so that your system can find the correct libraries.

Kind regards,

Eric
 
Old 05-20-2010, 08:56 PM   #10
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,483

Rep: Reputation: 66
This illustrates why I hate grub2.... I really wish LFS would have stayed with legacy_grub since grub2 is still considered experimental.

for the OP what I am wondering is if you are trying to boot the disk image or what. Or do you just name your kernels with the .img extension?
 
  


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
Can't boot LFS ( kernel panic - not syncing ) LFS 6.6 Lyle Linux From Scratch 14 05-15-2010 03:22 AM
Failed boot versions, have to boot from previous version bryank99 Linux - Newbie 2 04-05-2010 09:47 AM
Boot from USB on older hardware action_owl Linux - General 1 03-01-2010 03:38 AM
How do I boot an older kernel version buckeyedog Linux - Newbie 10 10-18-2007 09:07 AM
Best linux boot from CD for older computer? cranston Linux - Newbie 5 02-29-2004 04:32 PM


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

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