LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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-14-2011, 09:35 AM   #31
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7

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 !!!
 
Old 11-14-2011, 10:14 AM   #32
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
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.
 
Old 11-14-2011, 10:29 AM   #33
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
Quote:
Originally Posted by devilboy09 View Post
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?
 
Old 11-14-2011, 10:43 AM   #34
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
/boot is on my lfs.in post #17 roken said i should exit chroot before issue the copy commands
 
Old 11-14-2011, 11:06 AM   #35
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
/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!!!).
 
Old 11-14-2011, 11:35 AM   #36
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 252

Rep: Reputation: 40
@ 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.
 
1 members found this post helpful.
Old 11-14-2011, 12:38 PM   #37
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 Roken,
Quote:
Originally Posted by Roken View Post
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.
 
Old 11-14-2011, 12:40 PM   #38
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,661
Blog Entries: 1

Rep: Reputation: 242Reputation: 242Reputation: 242
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.
 
Old 11-14-2011, 12:52 PM   #39
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
i really love to do that spiky0011.but i can't boot my host
roken's post ruined my grub

Last edited by devilboy09; 11-14-2011 at 01:13 PM.
 
Old 11-14-2011, 01:50 PM   #40
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 252

Rep: Reputation: 40
Quote:
Originally Posted by devilboy09 View Post
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)
 
Old 11-14-2011, 02:07 PM   #41
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
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
 
Old 11-14-2011, 02:21 PM   #42
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,661
Blog Entries: 1

Rep: Reputation: 242Reputation: 242Reputation: 242
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

Last edited by spiky0011; 11-14-2011 at 02:22 PM.
 
Old 11-14-2011, 02:49 PM   #43
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS
Posts: 351

Original Poster
Rep: Reputation: 7
there is neither grub promp nor grub menu.this is new for me since one year age that i started working with linux!!!

Last edited by devilboy09; 11-14-2011 at 02:53 PM.
 
Old 11-14-2011, 03:00 PM   #44
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,661
Blog Entries: 1

Rep: Reputation: 242Reputation: 242Reputation: 242
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
 
Old 11-14-2011, 03:31 PM   #45
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 252

Rep: Reputation: 40
What happens if you press "SHIFT" during boot?
 
  


Reply

Tags
grub, kernel, 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
Good but sorta easy guide to Kernel compiling/Re-Compiling? linus72 Linux - General 1 07-13-2009 01:37 PM
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 01:45 AM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 02:29 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM


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