LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   grub 1.99 in LFS???? (http://www.linuxquestions.org/questions/linux-from-scratch-13/grub-1-99-in-lfs-913007/)

devilboy09 11-11-2011 08:35 AM

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

druuna 11-11-2011 09:26 AM

Hi,

grub version 1.99 _is_ grub2

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

Hope this helps.

devilboy09 11-11-2011 09:36 AM

i'm pretty sure there are two version of grub 2.first one is grub legacy and the second one is called grub.

druuna 11-11-2011 09:39 AM

Hi,
Quote:

Originally Posted by devilboy09 (Post 4521581)
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.

Larry Webb 11-11-2011 09:54 AM

Quote:

Originally Posted by devilboy09 (Post 4521581)
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.

Larry Webb 11-11-2011 10:07 AM

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

grub2

devilboy09 11-11-2011 10:10 AM

thank you guys

devilboy09 11-11-2011 10:26 AM

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?

druuna 11-11-2011 10:31 AM

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.

devilboy09 11-11-2011 10:33 AM

i didn't reenter the chroot.should i do it?

druuna 11-11-2011 10:37 AM

Didn't I just say so in post #9???

Or: Yes, you should.

devilboy09 11-11-2011 10:41 AM

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.

druuna 11-11-2011 10:51 AM

Hi,
Quote:

Originally Posted by devilboy09 (Post 4521627)
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.

devilboy09 11-11-2011 11:01 AM

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!

druuna 11-11-2011 12:14 PM

Hi,
Quote:

Originally Posted by devilboy09 (Post 4521648)
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.


All times are GMT -5. The time now is 05:09 AM.