LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Compiling the kernel (https://www.linuxquestions.org/questions/linux-from-scratch-13/compiling-the-kernel-913127/)

devilboy09 11-14-2011 09:35 AM

Code:

Both inittab and fstab look ok (btw did you change your hosts /etc/fstab as mentioned in post #11?)
yes i did

but right now i can't even boot my host.that's my problem !!!

druuna 11-14-2011 10:14 AM

Hi,
Quote:

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

druuna 11-14-2011 10:29 AM

Quote:

Originally Posted by devilboy09 (Post 4523610)
Code:

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?

devilboy09 11-14-2011 10:43 AM

/boot is on my lfs.in post #17 roken said i should exit chroot before issue the copy commands

druuna 11-14-2011 11:06 AM

Hi,
Quote:

Originally Posted by devilboy09 (Post 4523765)
/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 ) and both spiky0011 and me told you those steps should be done inside the chrooted environment (FOLLOW THE BOOK!!!).

Roken 11-14-2011 11:35 AM

@ druuna,

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.

Cheers.

druuna 11-14-2011 12:38 PM

Hi Roken,
Quote:

Originally Posted by Roken (Post 4523811)
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.

Hope this answers your question.

spiky0011 11-14-2011 12:40 PM

I think at the moment you must forget lfs and sort debain out good and proper. I take it you do have a live cd.

devilboy09 11-14-2011 12:52 PM

i really love to do that spiky0011.but i can't boot my host
roken's post ruined my grub

Roken 11-14-2011 01:50 PM

Quote:

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

devilboy09 11-14-2011 02:07 PM

Code:

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

spiky0011 11-14-2011 02:21 PM

Is it possible to get in by grub prompt Or do you not get a grub menu come up? sorry missed the bit no boot menu

devilboy09 11-14-2011 02:49 PM

there is neither grub promp nor grub menu.this is new for me since one year age that i started working with linux!!!

spiky0011 11-14-2011 03:00 PM

Do you still have the cd usb that you used to install the os from there you can fix your problem, if not redownload it

Roken 11-14-2011 03:31 PM

What happens if you press "SHIFT" during boot?


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