Horrible ordeal trying to boot LFS. Tried older version - won't boot either
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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
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:
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.