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.
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
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.
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 10:53 AM.
Reason: Clarity
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 11:02 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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.