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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-13-2003, 02:15 PM
|
#1
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Rep:
|
init error
I am having a very similar problem to one already posted, but I've built this system differently, hence the new thread (sorry).
I get the 'spawning too fast' message (after Setting up default gateway [OK]) on all 6 runlevels when booting. I chrooted into the lfs system (from gentoo), and found that there didn't exist a '/sbin/getty'. Is this normal? Could this be the cause? I didn't see anything labeled 'getty' under the lfs-packages directory. Have I accidentally skipped something?
I also get this on bootup (before the init errors):
swapon: cannot stat /dev/hda2: No such file or directory [FAILED]
It then lets me know that S10Swap exited with a treutrn value of 255. I built the lfs system with gentoo linux. Has anyone ever successfully done this before? Are they able to share the same swap partition?
|
|
|
04-13-2003, 04:22 PM
|
#2
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
spawning too fast simply means somethign in /etc/inittab couldn't be started. Because it's set to respawn (all the gettys are), init keeps trying and trying until it blocks it with that error.
A few reasons that could cause it:
1) Invalid line in /etc/inittab pointing to a file that simpy doesn't exist
2) The program seg faults when init starts it
/sbin/getty doesn't exist and that's normal. LFS systems normally use the agetty program from the util-linux package (under the login-utils subdirectory of util-linux)
So check /etc/inittab and check what your getty lines are and make sure you can execute it. Try booting into LFS like this:
LILO: lfs init=/bin/bash
Then when the shell starts, check /etc/inittab and run that command, like this:
/sbin/agetty tty2 9600
And switch to tty2 (alt+f2) and try to login.
If you use devfs, use /sbin/agetty vc/2 9600 instead.
Yes, you can share swap partitions between different distributions.
If swapon says it can't stat /dev/hda2 no such file or directory, make sure that the /dev/hda2 file actually exists. The error simply means the file isn't there.
|
|
|
04-13-2003, 05:48 PM
|
#3
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
ok, what I've done is changed all the /sbin/agetty ttyx 9600 lines to /sbin/agetty vc/x 9600 in the inittab file, and I can now get a (none) login: prompt after boot.
The problems are:
Should there be something other than (none) at the login prompt??
there is no /dev/hd x. Actually there is quite a small amount of things listed in /dev. I'm clueless on how to create the proper dev entries.
Thank you so much for your help and patience... I am quite the
EDIT: I'm sorry I didn't mention this before, but I am using /dev filesystem in the kernel. Hence the reason I changed those entries in inittab.
EDIT2: Ok, I figured out what symlinks needed to be created (I feel like such a dumby), but they don't stick after a reboot. What I had done was jump in /dev and do the following:
ln -s discs/disc0/disc hda
ln -s discs/disc0/part1 hda1
ln -s discs/disc0/part2 hda2
ln -s discs/disc0/part3 hda3
ln -s discs/disc0/part4 hda4
was that the proper way to do it?
Last edited by ixion; 04-13-2003 at 06:10 PM.
|
|
|
04-13-2003, 10:29 PM
|
#4
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
(none) in the login prompt represents the hostname. (none) means that the hostname isn't set yet. Your localnet script probably doesn't run properly during boot up.
Not having /dev/hdx is normal when you are using devfs. Instead you should use those new paths like /dev/discs/disc0/partx to access your partitions. You can create symlinks if you want for backwards compatibility, but the whole point of devfs was to get rid of all those files in /dev and put them in a more logical hierarchy and have it updated automatically by the kernel so you only have files that you would actually use.
Now, symlinks can be handy sometimes, especially when it comes to software that doesn't know about the devfs style. You could use devfsd (a daemon that maintains stuff in /dev - pretty much symlinks and other things) but I personally don't bother. You have the source, just change it to use devfs style paths. It's a small thing to change a lot cleaner too.
Lastly, you can just disable devfs in the kernel and use the old style device files (created with the MAKEDEV script)
|
|
|
04-15-2003, 01:56 PM
|
#5
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
I checked '/etc/hostname', but failed to check my localnet script. I will check that tonight (if I have time  )... now if it does contain my hostname, how can I tell it's not running correctly on startup?
I tried setting fstab to the proper paths (/dev/discs/disc0/part2, etc.), but upon reboot it bombed out with a major error and halted. I can boot into gentoo and chroot in just fine. I'm guessing I should invest in devfsd, but where shall I obtain it from? It's not listed in the base packages.
This brings me to a small question. What is the preferred method/source for obtaining source for packages and such? I'm thinking of installing gentoo's portage on my lfs system, but before I can do that, I still think I need a couple more things installed. Even if I don't need anything else, I would still like to know where all the lfs l33t's go to get their source.  sourceforge? freshmeat?
|
|
|
04-16-2003, 08:39 AM
|
#6
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
mmkay, hostname is now reflected at the prompt (it was localnet as you said, thanks  )... the root partition is mounted on boot as '/dev/root', which works just fine for me... all I need to know is what is the designation of the swap partition with this new dev filesystem? /dev/root is pretty self-explanatory, but I see no /dev/swap. LFS complains every boot that it can't mount a swap partition, and rightly so (it's currently designated in fstab as /dev/hda2)..
|
|
|
04-16-2003, 11:41 AM
|
#7
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
you don't mount a swap partition, you run "swapon" on it.
like: swapon /dev/hda2
If that fails, then either hda2 is not a swap partition (check with cfdisk), or you didn't run mkswap /dev/hda2 to format it as a swap partition.
|
|
|
04-16-2003, 01:24 PM
|
#8
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
/dev/hda2 is a swap partition that is used by gentoo also (which has no problem with it). I will run mkswap from lfs and see what happens.
In all honesty, I've started an lfs system here at work on one of my boxes, and am noticing quite a few things that I most likely had skipped at home (not intentionally). It actually took me over 2 weeks to get it up and going at home because I only had '5 minutes here, 10 minutes there' to work on it. This, in my opinion, is no way to build an LFS system. I will rebuild it once I can sit down for a couple hours straight, and I'm confident I will have a much more positive experience.
I apologize for the questions with obvious answers, I'm certain is has all rooted from mistakes during install.
Thank you very much for all your help!
|
|
|
04-16-2003, 01:40 PM
|
#9
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
if the swap partition is used by Gentoo already, you don't need to run mkswap on it, as it's already formatted.
When you get a minute, can you give us the output of the "swapon /dev/hda2" command?
|
|
|
04-16-2003, 01:57 PM
|
#10
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
I will let you know. I'm at work right now, and don't have a remote ssh setup at home, so I will have to wait until tonight or (most likely) tomorrow before checking it.
I honestly think things have been messed up by me leaving during the install, and picking back up in the wrong spot. 
|
|
|
04-17-2003, 10:08 AM
|
#11
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
ok, here's something that might be of interest to you. I finished my lfs box here at work, but upon reboot I get a message very similar to the one before.
One thing I have not considered is that gentoo mounts /boot on a seperate partition for safety reasons. I am going to mimic gentoo's fstab in lfs and see what happens, but something tells me there's more to it than that. Is there something I should add to the init to mount the partition and then unmount it?
edit: The error message stated that e2fsck needed to be updated. I downloaded the latest source, installed it, voila! I'm FINALLY booting into LFS!
Thank you so very much for your help. I'm not always able to properly explain what I mean, so I very much appreciate your patience with me during all this.
Last edited by ixion; 04-17-2003 at 10:30 AM.
|
|
|
04-17-2003, 11:27 AM
|
#12
|
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372
Rep:
|
No problem. Glad you solved the problem.
|
|
|
All times are GMT -5. The time now is 04:37 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.
|
Latest Threads
LQ News
|
|