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.
but right now i can't even boot my host.that's my problem !!!
I assume grub works, but you only get 1 entry (LFS) you can boot, not 2 (Debian and LFS)? If that is the case then /boot/grub/grub.cfg on your host is probably messed up.
You might try to connect the debian install dvd/cd or iso (as bootable) to your vm (I do believe you use vmware, have a look at this link: ISO Image Files & VMware). If that works and you can boot from the cd/dvd you might be able to repair your debian system (don't bother with LFS right now). I'm not familiar enough with vmware to give you an alternative.
If you do get a grub menu, you might be able to use grub's edit option (press e in menu) to change the entry and make debian boot so you can repair grub.cfg. You do have to know the name of the kernel/initrd image that is used by debian.......
If you cannot get either of the above to work and repair debian I wouldn't know how you can boot debian and keep working on this system.
From LFS (from inside the chrooted environment): /etc/inittab, /etc/fstab and the output of ls -la /boot
and /boot is empty
I do hope this is /boot on your LFS system and not on your host. Its not good either way, but if this is from your host you cannot use grub to access debian, you do need to use a dvd/cd.
I also don't understand why /boot is empty if this _is_ from the LFS system....... Have a look ath the first code block in post #11. Why didn't you do the cp commands in the middle part?
/boot is on my lfs.in post #17 roken said i should exit chroot before issue the copy commands
Roken is wrong.
You did ask a question about that (post #18) and both spiky0011 and me told you those steps should be done inside the chrooted environment (FOLLOW THE BOOK!!!).
I was going to ask this privately, though you have disabled IM, so I'll have to do it here.
What exactly is wrong with my instructions? The only difference between the two systems is a separate boot partition, though that doesn't preclude a separate /boot folder (one on the host system and one on LFS). Provided this is correctly accounted for (as I indicated) my guide works without incident.
"Roken is wrong" isn't much help without an indication of what you think is wrong, so perhaps you could expand a little.
What exactly is wrong with my instructions? The only difference between the two systems is a separate boot partition, though that doesn't preclude a separate /boot folder (one on the host system and one on LFS). Provided this is correctly accounted for (as I indicated) my guide works without incident.
"Roken is wrong" isn't much help without an indication of what you think is wrong, so perhaps you could expand a little.
I already pointed out one in post #30, which includes the reason why.
Another one would be:
Quote:
Originally Posted by Roken
chroot to LFS and:
Code:
make mrproper #(to clean up the build environment)
exit chroot, and then
Code:
cp /boot/config-3.1 .config
Code:
gedit .config #(use your favourite text editor. You can also do this with vim in a chroot to lfs, but this is faster and easier)
The cp command as given is from within the chrooted environment, _not_ outside. Same problem with this:
Quote:
Originally Posted by Roken
Code:
make
make modules_install #This should do almost nothing
exit chroot
copy bzImage, System.map and .config to /boot per the LFS book
All those steps should be done inside the chrooted environment. I do understand that you like gedit more then vi(m), but you over complicate things and make mistakes in your posted example(s).
In general you used your own environment, which deviates on many points from devilboy09's. Someone with experience might pick that up and adjust it to their own setting, but it should be clear that devilboy09 isn't experienced at all when it comes down to building kernels, using grub and multi-boot systems.
I try to make my examples compliant to the environment of the OP and also try to keep them as simple as possible while staying true to the commands posted in the LFS book.
i really love to do that spiky0011.but i can't boot my host
roken's post ruined my grub
In actual fact there is nothing whatsoever in my post that, if done as described, would break grub for your host OS.
Nevertheless, repair of grub can be done from your LFS boot by chrooting to your Debian install and reinstalling grub there. This will restore the default grub back to where you were (with the same erroneous entry that you had for LFS when you started)
Nevertheless, repair of grub can be done from your LFS boot by chrooting to your Debian install and reinstalling grub there. This will restore the default grub back to where you were (with the same erroneous entry that you had for LFS when you started)
i can't even boot with lfs and i can't choose my debian host .there is no boot menu!!!
that's what i'm wonder about.when turn the machine on it goes straight to my lfs and i don't have a choice.
and about my previous post that i said you ruined my lfs, that wasn't what i meant.you really help me to build the lfs with your answers.i'm sorry if i upset you,i really am
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.