LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   F8 freezes during boot - "getpwnam failed for roota" (https://www.linuxquestions.org/questions/fedora-35/f8-freezes-during-boot-getpwnam-failed-for-roota-640067/)

Magmagal 05-05-2008 11:31 AM

F8 freezes during boot - "getpwnam failed for roota"
 
Fedora 8 freezes during boot - "getpwnam failed for roota"

--------------------------------------------------------------------------------

Hi all,

I'm running F8 dual-boot with XP on a Dell Inspiron 6000. Yesterday, Fedora ran fine all day - no sign of problems. Last night I switched over to the Win side for a few hours, and then shut the computer down for the night. This morning, I tried to boot into Fedora, and it hung on "Enabling local filesystem quotas". Left it for an hour or so, nothing happened. Tried rebooting into both available kernels several times, same thing. Windows still boots fine.

I booted into text mode and found an error "getpwnam failed for roota" at "Enabling local filesystem quotas". I can't find any information on this problem and 'roota' seems very strange to me. Any ideas??

Thanks in advance for any help you can provide.

unSpawn 05-07-2008 06:37 AM

Quote:

Originally Posted by Magmagal (Post 3143528)
I booted into text mode and found an error "getpwnam failed for roota" at "Enabling local filesystem quotas". I can't find any information on this problem and 'roota' seems very strange to me.

From 'man getpwnam': "The functions getpwnam() and getpwuid() search the password database for the given login name or user uid, respectively, always returning the first one encountered.". The password database is /etc/passwd, and 'getent passwd root roota' should show the account info. By default you should have only one account with UID 0 called "root". AFAIK it's still in kernel time when the "Enabling local filesystem quotas" message appears, so that's definately not good. Have there been any situations earlier on where the system performed "weird"? Or did you experience any crashes earlier on or do things that made the system instable? Anyway. Check your login database ('last') and system and daemon logs for irregularities, verify your installation with 'rpm -qVa 2>&1> /tmp/rpmqVa.log' and check rpmqVa.log for details like missing files and MD5 hashes not matching (see 'man rpm' for explanation of verify output). If you are going to post details or errors, please use BB code tags for readability and post *exact* messages, not descriptions of.

Magmagal 05-09-2008 08:49 AM

Thanks for your response. This is the first case of this behavior or of an all-out crash of which I am aware. I didn't do anything that I know of that made the system unstable, certainly not during the days right before the problem began.

In /var/log/messages I found the following (repeated every 30 minutes during the day before the boot-up freezing started until I shut down to switch to the Windows partition):

May 4 04:29:14 localhost smartd[2591]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
May 4 04:29:14 localhost smartd[2591]: Device: /dev/sda, 1 Offline uncorrectable sectors


Running 'badblocks -v -v /dev/sda' gives:

Pass completed, 0 bad blocks found

Running 'fsck -p /dev/sda' gives

fsck 1.40.2 (12-Jul-2007)
WARNING: couldn't open /etc/fstab: No such file or directory
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda
/dev/sda:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>

Magmagal 05-09-2008 12:43 PM

Also, there is no daemon.log in /var/log - would it be anywhere else? How do I check the login database? 'rpm -qVa 2>&1> /tmp/rpmqVa.log' creates an empty rpmqVa.log file.

Magmagal 05-10-2008 01:59 PM

A few more pieces of information.

1. Digging back through old /var/log/messages files, I see that the bad sector message was appearing for over one month. Running a selftest with smartctl (smartctl -l selftest /dev/sda) gives the following:

SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA
#1 Extended offline Completed without error 0% 7
-

2. If I change the entry for root in /etc/passwd to roota (after booting into the system with the rescue CD), I then get a message of "getpwnam failed for root" during bootup at the same point, and the same freeze.

3. Also, looking at lastlog shows only one entry. The full text of lastlog is below:

Username Port From Latest
root **Never logged in**


This strikes me as strange since I have certainly logged in as root and I usually login with another account on this machine (e.g., magmagal, which I still see a line for in the /etc/passwd file).

Is is possible that some file went corrupt? That I got hacked or got a virus somehow?? Any thought or suggestion would be appreciated.

Magmagal 05-18-2008 02:30 PM

Well, I still have no idea what caused the problem, despite spending lots of time trying to figure it out, but I solved it. Running fsck manually and answering yes to all prompted changes solved whatever was wrong.

Here's what I did:

1. Boot from Rescue CD
2. Answer no to prompt about mounting the filesystem ('Skip')
3. At the command line, enter the following sequence of commands:
> lvm pvscan
> lvm vgscan
> lvm lvscan
> lvm -lvchange -ay /dev/VolGroup00/LogVol00 (using information from previous commands)

4. Run fsck and answer 'y' to all prompts:
> fsck /dev/VolGroup00/LogVol00

After fsck finished I rebooted and the system appears to be completely back to normal. There were lots of changes made by fsck, but I did not document them.

unSpawn 05-18-2008 08:23 PM

Good to see you fixed things on your own. WD


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