LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-11-2011, 09:35 AM   #1
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Rep: Reputation: 7
grub 1.99 in LFS????


i have grub 2 installed in my debian and the book says that i have to install grub 1.99.my question is that isn't it going to be a problem.i mean at last i should have my lfs in grub files that's /etc/grub/grub.cfg.as you know it's grub legacy.can grub 2 handle grun 1.99? the configuration files are different!i'm a little confuse
 
Old 11-11-2011, 10:26 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

grub version 1.99 _is_ grub2

Grub (1 / legacy) => version 0.9x
Grub2 => version 1.9x

Hope this helps.
 
Old 11-11-2011, 10:36 AM   #3
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
i'm pretty sure there are two version of grub 2.first one is grub legacy and the second one is called grub.
 
Old 11-11-2011, 10:39 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by devilboy09 View Post
i'm pretty sure there are two version of grub 2.first one is grub legacy and the second one is called grub.
Nope, there are only 2 grub versions: Legacy (or 1) and 2.

- GRUB (WIKI)
- GNU GRUB - Home

Hope this helps.
 
Old 11-11-2011, 10:54 AM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by devilboy09 View Post
i'm pretty sure there are two version of grub 2.first one is grub legacy and the second one is called grub.
Grub Legacy is often referred to as 'grub'. Grub2 was updated but still referred to as grub2.

Post #2 is correct as far as I have read.

GNU Grub

Sorry was not fast enough druuna


To answer your question, if grub legacy will boot it so will grub2.

Yes they have a different file structure so the grub.cfg will not look exactly like menu.lst.

Last edited by Larry Webb; 11-11-2011 at 10:58 AM.
 
Old 11-11-2011, 11:07 AM   #6
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Here is one of the easiest tutorials I have run into and refer to often. Check out "Section 12"

grub2
 
Old 11-11-2011, 11:10 AM   #7
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
thank you guys
 
Old 11-11-2011, 11:26 AM   #8
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
by the way, where should i issue commands from chapter 8 Making the LFS System Bootable?
should i logout from chroot before issuing these commands?
 
Old 11-11-2011, 11:31 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Quote:
Originally Posted by devilboy09
where should i issue commands from chapter 8 Making the LFS System Bootable?
should i logout from chroot before issuing these commands?
This should be done from inside the chrooted environment (this one: From now on, when reentering the chroot environment after exiting, use the following modified chroot command).

Hope this helps.
 
Old 11-11-2011, 11:33 AM   #10
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
i didn't reenter the chroot.should i do it?
 
Old 11-11-2011, 11:37 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Didn't I just say so in post #9???

Or: Yes, you should.
 
Old 11-11-2011, 11:41 AM   #12
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
ok.one last question.when i install grub, can i still choose my host os in boot menu.the book says "grub-install /dev/sda The following command will overwrite the current boot loader"
i installed my lfs in /dev/sdb1 and /dev/sdb2 is swap.i'm a little bit confused.
 
Old 11-11-2011, 11:51 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by devilboy09 View Post
ok.one last question.when i install grub, can i still choose my host os in boot menu.the book says "grub-install /dev/sda The following command will overwrite the current boot loader"
i installed my lfs in /dev/sdb1 and /dev/sdb2 is swap.i'm a little bit confused.
I already answered this one in your other thread: Boot Problem, where you stopped replying.

In the other thread you are talking about building LFS in a VM, in this thread it looks like you do not.....

In short:
- If you are building LFS inside a VM: Yes, you do need to install and configure grub.
- If you are creating a multi-boot system (Debian and LFS together on one physical machine for example): No, you don't. You need to add an LFS entry to the grub configuration that is already present (Debian's in this case).

Hope this helps.

Last edited by druuna; 11-11-2011 at 11:53 AM. Reason: Clarity
 
Old 11-11-2011, 12:01 PM   #14
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
i installed debian on vmware the disk name is /dev/sda and it has 3 partitions i add another disk for lfs /dev/sdb it has 2 partitions / and swap.
i already have /etc/fstab on debian.in chapter 8 the book says you shold create /etc/fstab in chroot envirement.so there is 2 fstab in one system.it's not gonna work,right?
afew pages later i suppose i should compile kernel(in chroot, i guess).well the systemmap and vmlinuz will be installed in /boot in the chroot envirement where my host doesn't know about it, so i can't choose my lfs in boot menu.i think you undrestand what's my problem!

Last edited by devilboy09; 11-11-2011 at 12:02 PM.
 
Old 11-11-2011, 01:14 PM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by devilboy09 View Post
i installed debian on vmware the disk name is /dev/sda and it has 3 partitions i add another disk for lfs /dev/sdb it has 2 partitions / and swap.
Ok, clear. You now have 2 options, pick the one you want:

1) You want to be able to use Debian or LFS -> Make the VM dual boot, do _not_ install/configure grub as described in the LFS documentation. Grub is already present and configured on Debian. You _do_ need to add an entry to /boot/grub/grub.cfg on Debian. I do believe you can use the update-grub command to do this (do check to see if lfs is added). If all is set up correctly, you will get the choice when starting the VM to start Debian or LFS.

2) You only installed Debian to install LFS -> If you do not want Debian any more (you are only interested in LFS) you need to install and configure grub as described in the LFS documentation. You have to substitute sda/sdaX, used in the LFS documentation to sdb/sdbX. The documentation uses examples, you do need to change those to what you have chosen! If this is set up correctly, you get one choice when starting the VM: LFS (and a fall-back/rescue entry for LFS).


Quote:
i already have /etc/fstab on debian.in chapter 8 the book says you shold create /etc/fstab in chroot envirement.so there is 2 fstab in one system.it's not gonna work,right?
Those are 2 different systems, they don't interact and each needs its unique configuration files.

Quote:
afew pages later i suppose i should compile kernel(in chroot, i guess).well the systemmap and vmlinuz will be installed in /boot in the chroot envirement where my host doesn't know about it, so i can't choose my lfs in boot menu.i think you undrestand what's my problem!
You are building a system (LFS) inside another system (Debian) and use a chrooted environment to do so. Both need to be separate systems later on.

You might want to re-visit this chapter: 1.1. How to Build an LFS System. Especially the In Chapter 6, the full LFS system is built..... part.

Hope this helps.
 
  


Reply

Tags
grub, grub 2, lfs


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
error in 6.34 grub lfs-6 sharmashikha Linux From Scratch 1 07-05-2005 09:22 AM
Adding LFS to GRUB dinolinux Linux - Software 5 06-30-2005 12:06 PM
Grub install LFS 5.x cuco76 Linux From Scratch 5 07-02-2004 05:29 PM
Boot LFS with Grub darkmage Linux From Scratch 2 08-20-2002 01:53 PM


All times are GMT -5. The time now is 02:26 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