LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Text based login failed but no errors (https://www.linuxquestions.org/questions/linux-software-2/text-based-login-failed-but-no-errors-72147/)

Duukkis 07-12-2003 12:18 PM

Text based login failed but no errors
 
When I type my name to the right side of login: and press enter nothing happens. Only new line appears to below the previous line. When I write to it and press enter the same repeats. This is really strange because I didn't do anything related to login managers and so on yesterday and I don't see any errors during the linux starting. What I have done wrong or is this something else that isn't my fault?

jailbait 07-12-2003 02:45 PM

If you cannot get into your Linux system at all then you will have to use a rescue system. Boot into the rescue system and mount your / partition.

The first place I would look for problems is in /etc/passwd. Does your login id exist in /etc/passwd? Are the fields in /etc/passwd overwritten or scrambled?

Another place to look in /etc/inittab. Is /etc/inittab set up to start the correct runlevel and to start mingetty?

Duukkis 07-13-2003 01:54 PM

I haven't tought to /etc/passwd file and /etc/inittab but I can look and post results here in wednesday because I'm at home then.

Duukkis 08-03-2003 11:32 AM

I booted using rescue system:
rescue root=/dev/hdb3 and all were going fine until Kernel panic: VFS: Unable to mount root fs on 03:43 error appeared. I decided to use:
rescbf24 root=/dev/hdb3 then because I have 2.4 kernel. The Beginning looked promising because that error doesn't appeared. But rescue system doesn't helped because Linux booted exactly the same way as before and I still have to type my username and password. I don't know what is my correct runlevel but it was 2 when I looked it at the same time I looked other booting logs. What is mingetty:confused: How can I fix /etc/passwd and /etc/inittab:confused:

jailbait 08-03-2003 01:51 PM

" I don't know what is my correct runlevel but it was 2 when I looked it at the same time I looked other booting logs. What is mingetty How can I fix /etc/passwd and /etc/inittab"

Runlevel 2 is probably the wrong runlevel. The runlevel is set in /etc/inittab. You need some way to edit /etc/inittab, probably from a rescue system.

In /etc/inittab the line to change will say:
id:2:initdefault:
if you are booting into runlevel 2

The runlevels that you should choose are:
id:3:initdefault:
if you want to boot to the command line.
or:
id:5:initdefault:
if you want to boot to the graphic login screen (either kdm or gdm)

mingetty is the program that gives you the login prompt. Somewhere in /etc/inittab there should be a table of when mingetty is called. Don't mess with mingetty before you get runlevel straightened out.

/etc/passwd has a table of passwords and authority. The first line is for root and should look like this:
root:x:0:0:root:/root:/bin/bash

Corin 08-03-2003 02:00 PM

The default run levels explained above apply to SuSE, RedHat and numerous others distributions.

However on Debian (as with a number of other things) things are sometimes different.

On Debian, the default run level for virtual console terminal login is run level 2, and for graphical display manager login (ie X is started) is in run level 3.

Set the value appropriate to your needs in the /etc/inittab default run level field.

Duukkis 08-04-2003 03:47 AM

Thanks. Now I know what I supposed to do but I don't know how. I have to type my details (username and password) to mingetty before I can edit any files even in rescue system.

jailbait 08-04-2003 09:52 AM

There are two possible approaches to getting into your system:

1. You have several virtual consols, each with its own mingetty. You access these consoles with Alt F1 through alt F8. Use the rescue system to boot into your system, then see if you can get any of the virtual consoles to give you a login prompt.

2. Boot into the rescue system but do not use root=/dev/hdb3. Instead make a directory (say rescue) and then mount /dev/hdb3 on that directory. Then you can access your editor and other programs as /rescue/usr/local/editor or whatever.

Duukkis 08-06-2003 12:52 PM

Number 1. It doesn't work
Number 2. If I type only rescue I can't do anything because this error appears Kernel panic: VFS: Unable to mount root fs on 03:43. It appears also when I write rescue root=/dev/hdb3 and rescbf24. I can only get to mingetty if I type rescbf24 root=/dev/hdb3 and mingetty doesn't work. Do I have any possibility to use rescue system to fix mingetty or do I have to reinstall whole distribution?

jailbait 08-06-2003 01:52 PM

I am out of ideas on how to find a working login prompt by booting into the broken system and somehow skirting around the lack of a login prompt.

I don't think that you can fix your problem with the rescue system that you are using. You need a rescue system that will run completely on its own without needing working components on your broken system.

You could try a different rescue system. I recommend either knoppix or tomsrtbt if you have them available. Boot knoppix or tomsrtbt. Then you will be running a working Linux system. Then mount your broken system and work on it from the rescue system.
You can run working components, like an editor, from your rescue system and fix broken files, such as perhaps /etc/inittab or /etc/passwd.

If you can't scare up a good rescue system then you will probably have to reinstall.

Duukkis 08-06-2003 02:52 PM

Thanks! I will try to rescue with knoppix or tomsrtbt. See you later ;)

Duukkis 08-22-2003 08:32 AM

I didn't use Knoppix or tomsrtbt because I got a new idea. I checked my system by booting from bootdisk and typing:
linux.bin init=/bin/bash/ rw
Then I got a command line (init<version number>) where I can write what I want. Both /etc/passwd and /etc/inittab seemed to be allright. There are id:2:initdefault: line in /etc/inittab which propably means that I'm running runlevel 2. Should it be 3 just as jailbait said? My friend which is also using Debian said that both runlevel 2 and 3 are recommended runlevels.

jailbait 08-22-2003 02:51 PM

" I checked my system by booting from bootdisk and typing:
linux.bin init=/bin/bash/ rw"

Great :)

"I'm running runlevel 2. Should it be 3 just as jailbait said?"

No. When I said that the runlevel should be 3 I did not know that Debian uses non standard run levels.

"Both /etc/passwd and /etc/inittab seemed to be allright."

Good. The boot logic seems to be OK up through /etc/inittab. In /etc/inittab there is a table of which script to run based on what runlevel that you want to run. Find the script that is run for runlevel 2 and take a look at that script to see if you can find errors. What you should do is follow the startup logic from /etc/inittab to where a login prompt is issued. This logic varies a lot from one distribution to another and I do not know how Debian does it.

Another, completely different possibility, is that your bootloader has an error in it. Check /etc/lilo.conf and make sure that it is right. Then issue lilo so that you have a fresh lilo bootloader on your MBR.

You could also try different run levels. Look at the comments in /etc/inittab and it should tell you what each run level means. Find the runlevel that boots to a GUI login screen and try that. If it works then you know for sure that the problem is somewhere in your run level 2 scripts.

Duukkis 08-23-2003 07:20 AM

Sorry but I can't do anything to fix my system anymore. It is totally in chaos because I check /dev/hdb3 with e2fsck although there was a warning that checking mounted partitions isn't advisable. All files are now with wrong inode numbers or something and I can't see them. If anyone knows a simple way to fix it and tell it to me I would be very grateful! In other case it would be much easier to reinstall whole system because I don't have any important files in my hd.

Corin 08-23-2003 05:56 PM

If you run fsck on a mounted file system, then usually you will completely trash your file system. Unless you have a backup of your file system somewhere to restore, after remaking the file system with mke2fs, then you have no alternative but to re-install the system. But before doing that, see if you can save any customizations you have done to a separate partition such as /home or /usr/local which will not be overwritten during the reinstallation.


All times are GMT -5. The time now is 10:13 PM.