LinuxQuestions.org
Review your favorite Linux distribution.
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 04-13-2003, 02:15 PM   #1
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Rep: Reputation: 30
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?
 
Old 04-13-2003, 04:22 PM   #2
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 04-13-2003, 05:48 PM   #3
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
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/hdx. 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.
 
Old 04-13-2003, 10:29 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
(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)
 
Old 04-15-2003, 01:56 PM   #5
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
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?
 
Old 04-16-2003, 08:39 AM   #6
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
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)..
 
Old 04-16-2003, 11:41 AM   #7
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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.
 
Old 04-16-2003, 01:24 PM   #8
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
/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!
 
Old 04-16-2003, 01:40 PM   #9
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
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?
 
Old 04-16-2003, 01:57 PM   #10
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
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.
 
Old 04-17-2003, 10:08 AM   #11
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
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.
 
Old 04-17-2003, 11:27 AM   #12
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
No problem. Glad you solved the problem.
 
  


Reply


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
init error jiawj Red Hat 1 11-16-2004 08:04 AM
error: No init found. Try passing the init= option to the Kernel neylitalo Linux - Laptop and Netbook 3 01-22-2004 09:34 PM
INIT error ..:eMa:.. Red Hat 0 10-26-2003 03:08 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM
ERROR please HELP ME!!!! No init found. Madmanator Linux - General 3 07-30-2002 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration