LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial 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-13-2013, 07:15 PM   #31
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 493

Rep: Reputation: 133Reputation: 133

Maybe it's just a typo. These are different...
Quote:
Originally Posted by engineer in post #26
Code:
[root@localhost boot]# ls
config-3.2.6  grub  System.map-3.2.6  vmlinuz-3.2.6-lfs.7.1
Quote:
Originally Posted by engineer in post #28

I've also checked that the files were copied in Section 8.3 (vmlinuz-3.2.6-lfs-7.1, System.map-3.2.6, and config-3.2.6) were all placed in the /boot directory of the /mnt/lfs partition for the LFS system.
 
Old 01-14-2013, 04:41 PM   #32
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 493

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by engineer in post #28

Where does grub look for the information to choose which kernels (or OS) to display for selection on booting? Is this the information in the grub.cfg file? If so, it is correctly reading that file, since the kernel listed in Grub's boot menu is the 3.2.6 lfs kernel. Once I choose a kernel to boot, where does Grub look for the image (or what tells grub where to look for the image)?
GRUB 2 is more complicated, does more things, and has components with new names, but it still works basically a lot like legacy GRUB did. In a traditional BIOS-MBR setup like yours (I think), a small program (boot.img) is embedded in the master boot record of the first hard drive and is executed at boot time. That little program loads and executes a bigger one (a copy of core.img) that usually and traditionally is embedded in the normally unused sectors between the master boot record and the first partition (nowadays, this copy of core.img goes in other places for GPT drives and EFI computers). The core.img program includes modules to access the file system where it finds the grub.cfg file and other needed modules. It creates the menu screen using the information in grub.cfg. You select something from the menu and core.img uses the information in the grub.cfg file to find the boot files to load and execute, to load other modules that may be needed, and to pass parameters to the kernel.

If you are using the boot loader of another system (such as Fedora's) to boot LFS, then its boot.img and core.img were embedded and its grub.cfg is being used, so that menuentry stuff you have been agonizing over needs to be in Fedora's grub.cfg. In that case, a grub.cfg in the LFS /boot partition would not be needed nor used. But if you installed LFS's GRUB in the master boot record (with the grub-install /dev/sda command), then LFS's core.img was embedded and its grub.cfg is being used and where your menuentry stuff has to go and be accurate.

Last edited by stoat; 01-14-2013 at 08:24 PM.
 
Old 01-14-2013, 08:04 PM   #33
engineer
Member
 
Registered: Oct 2007
Distribution: LFS
Posts: 65

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stoat View Post
Maybe it's just a typo. These are different...
Well, I owe you a cold beverage.

After I fixed the typo, it booted. Facepalm.
 
Old 01-14-2013, 08:27 PM   #34
engineer
Member
 
Registered: Oct 2007
Distribution: LFS
Posts: 65

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by engineer View Post
Well, I owe you a cold beverage.

After I fixed the typo, it booted. Facepalm.
I've been trying to not be lazy and type the commands so that I could learn them. Turns out this isn't the first time that plan backfired.
 
  


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
[SOLVED] LFS 6.8: Grub Error TKH Linux From Scratch 5 08-20-2011 09:52 AM
Grub error 21 with LFS 6.3 Chapter 8.4 bines Linux From Scratch 10 12-24-2008 04:18 PM
LFS 6.2 grub boot error 15 problem HedAche Linux From Scratch 1 08-02-2007 02:20 PM
error in 6.34 grub lfs-6 sharmashikha Linux From Scratch 1 07-05-2005 09:22 AM
Boot LFS with Grub darkmage Linux From Scratch 2 08-20-2002 01:53 PM


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