Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
Help!!! All of a sudden, my Red Hat 8.0 Linux will no longer boot! The messages scroll up too fast for me to read them, but it throws me out into repair/maintenance mode. The bootup errors start something like:
g"rep /proc/mounts No such file or directory"
Then it makes everything just r/w and so 'dmesg' does not show me this error. Booting with a bootup disk also gives me this error after the initial images etc are loaded.
The rest of the bootup process totally fails and it throws me out to a repair prompt. However, i CAN read my /dev/hda2 etc. partitions after that, except that /boot is completely empty. I can't run e2fsck on anything because it keeps saying there are bad superblocks. I can mount /proc /proc -t proc and view the files in there, however. I'm a complete newbie to troubleshooting like this, so if anyone could provide me with any tips it'd be much appreciated....
Do I have to reinstall the whole system? I thought Linux was supposed to be stable, and I didn't do anything to it to cause this, I don't think!
How could this have happened?
Originally posted by artemis Help!!! All of a sudden, my Red Hat 8.0 Linux will no longer boot! The messages scroll up too fast for me to read them, but it throws me out into repair/maintenance mode. The bootup errors start something like:
g"rep /proc/mounts No such file or directory"
Then it makes everything just r/w and so 'dmesg' does not show me this error. Booting with a bootup disk also gives me this error after the initial images etc are loaded.
The rest of the bootup process totally fails and it throws me out to a repair prompt. However, i CAN read my /dev/hda2 etc. partitions after that, except that /boot is completely empty. I can't run e2fsck on anything because it keeps saying there are bad superblocks. I can mount /proc /proc -t proc and view the files in there, however. I'm a complete newbie to troubleshooting like this, so if anyone could provide me with any tips it'd be much appreciated....
Do I have to reinstall the whole system? I thought Linux was supposed to be stable, and I didn't do anything to it to cause this, I don't think!
How could this have happened?
artie
to check the kernel messages while booting press shift+pgup
and shift+pgdn.
now when you reach maintainance mode use e2fsck or fsck to check your filesystem
try fsck -A
there is a utility called badblocks i think check it out
try man -k bad |grep block
Linux is more stable than other os
keep posted
Ok, thanks.... now I can read the bootup messages. It goes ok past the GRUB screen until...
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
kjournald starting. Commit interval 5 seconds
...
...
Welcome to Red Hat Linux
Mounting proc filesystem: dup2: Bad file descriptor
[ FAILED ]
grep: /proc/mounts: No such file or directory
Configuring kernel parameters: dup2: Bad file descriptor
[ FAILED]
Setting clock (localtime): Sun Feb 23 17:50:20 GMT 2003 dup2: Bad file descriptor
Couldn't open /proc/partitions: No such file or directory
Is /proc mounted?
Then I get dumped out into repair mode after a few more "Bad file descriptor" errors.
I have to mount /proc before running fsck -A. I can see a bunch of files of proc, including mounts, partitions etc.
fsck -A
ERROR: Couldn't open /dev/null (Read-only filesystem)
/: clean, 149405/4980376 files, 785774//9946243 blocks
Warning.. fsck.ext3 for device /dev/hda1 exited with signal 11.
I don't know what the last message means, I tried looking in the man pages. Running fsck on /dev/hda1 seems to indicate that it is "clean" though, no problems. If I run it with fsck -c to check for badblocks, it checks the hard drive for a long time, and then says something like *** WARNING: File System has been changed*** and then finishes. Yet, I still can't reboot, it keeps failing at the same point.
At this point, the /boot partition isn't mounted (/dev/hda1).
However, I can browse all my files on dev/hda2 etc. and everything seems intact. Would a complete RH re-install fix this?
My RH 8.0 system has been pretty stable up until now. Could it be something that I've done to cause this catastrophic failure? I don't understand how this could've happened at all.
ANY suggestions at all would be appreciated, before I give up and reinstall and lose my data.
Originally posted by artemis Ok, thanks.... now I can read the bootup messages. It goes ok past the GRUB screen until...
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
kjournald starting. Commit interval 5 seconds
...
...
Welcome to Red Hat Linux
Mounting proc filesystem: dup2: Bad file descriptor
[ FAILED ]
grep: /proc/mounts: No such file or directory
Configuring kernel parameters: dup2: Bad file descriptor
[ FAILED]
Setting clock (localtime): Sun Feb 23 17:50:20 GMT 2003 dup2: Bad file descriptor
Couldn't open /proc/partitions: No such file or directory
Is /proc mounted?
Then I get dumped out into repair mode after a few more "Bad file descriptor" errors.
I have to mount /proc before running fsck -A. I can see a bunch of files of proc, including mounts, partitions etc.
fsck -A
ERROR: Couldn't open /dev/null (Read-only filesystem)
/: clean, 149405/4980376 files, 785774//9946243 blocks
Warning.. fsck.ext3 for device /dev/hda1 exited with signal 11.
I don't know what the last message means, I tried looking in the man pages. Running fsck on /dev/hda1 seems to indicate that it is "clean" though, no problems. If I run it with fsck -c to check for badblocks, it checks the hard drive for a long time, and then says something like *** WARNING: File System has been changed*** and then finishes. Yet, I still can't reboot, it keeps failing at the same point.
At this point, the /boot partition isn't mounted (/dev/hda1).
However, I can browse all my files on dev/hda2 etc. and everything seems intact. Would a complete RH re-install fix this?
My RH 8.0 system has been pretty stable up until now. Could it be something that I've done to cause this catastrophic failure? I don't understand how this could've happened at all.
ANY suggestions at all would be appreciated, before I give up and reinstall and lose my data.
art
there are three points worth mentioning
check the /etc/mtab
and /etc/fstab files
if they are allright(should contain reference to proc)
try
mount -a
it should work fine
if it doesnot
did you changed /etc/rc.sysinit file
does it contain a line with something like this
"mounting proc filesystem"
mount -n -t proc /proc /proc(in red hat)
or
mount -n -t proc none /proc(mandrake)
if yes it should be ok
next if the above does not work
when you log in to your linux system (through rescue mode or whatever)
try init 3 (and see if everything works fine)
and finally did you do something with the kernel parameters
like change grub.conf file
finally you do not need to install your system again
but if you have no idea of what i am telling you
and if you have no important data
you can install your system again
keep posted
The /etc/fstab file contains a reference to proc, like so:
none /proc proc ....
However mine is a RedHat system and not a Mandrake one....
I can't change anything however, as it is a read-only system.
mount -a doesn't work, complains about there being no proc/partitions file. Then I mount /proc and mount -a no longer gives me any errors, but it doesn't appear to mount /boot either.
init 3 fails in rebooting and booting up the system.
So I just gave up and did a reinstall of RH 8.0. I did not reformat my hard drives so I kept all my data... so I just wasted a little more time. I'm happy to report that it all works now, but I am a little worried as to what had gone wrong to cause this problem. Was my /etc/fstab file changed somehow? Did a program I tried to install try to overwrite these key files? I did not change grub.conf.
The mind boggles....
By the way, thanks a lot, rch, for walking me through this.
Much appreciated!
The /etc/fstab file contains a reference to proc, like so:
none /proc proc ....
However mine is a RedHat system and not a Mandrake one....
I can't change anything however, as it is a read-only system.
mount -a doesn't work, complains about there being no proc/partitions file. Then I mount /proc and mount -a no longer gives me any errors, but it doesn't appear to mount /boot either.
init 3 fails in rebooting and booting up the system.
So I just gave up and did a reinstall of RH 8.0. I did not reformat my hard drives so I kept all my data... so I just wasted a little more time. I'm happy to report that it all works now, but I am a little worried as to what had gone wrong to cause this problem. Was my /etc/fstab file changed somehow? Did a program I tried to install try to overwrite these key files? I did not change grub.conf.
The mind boggles....
By the way, thanks a lot, rch, for walking me through this.
Much appreciated!
Programs do not change /etc/fstab,/etc/mtab,/etc/rc.sysinit files
(if they are not viruses)
Somebody who is using your computer may have
To make your system a bit safer use the superuser mode(root) only when necessary
That is add a user and log in through the user
Whenever you have to do some system stuffs
type su
and then give root password
well you could have gone into the read-write mode through the kernel options rw(sometimes dangerous- you have to do fsck after the rw)
examplein grub)
initrd=(hd0,0)/initrd.img ;your boot partition
kernel=(hd0,0)/vmlinuz root=/dev/hda2 rw
boot
In grub you can also use the e option to edit kernel paramaters
ie in the grub menu choose the operating system you want to boot and press e
And the root partition must have been writable after mount -a
And you did not mention about the rc.sysinit file.This is the most important file as while loading init after booting kernel this file is used.
And another good idea is to backup your grub.conf file
which is in /boot/grub/
Sometimes the same file is named menu.lst
And finally you are welcome
I hope that I can help people like you when the need arises
I have the same problem, I found out that it happen after I installed xprint from xprint.mozdev.org. As I need to print from Mozilla, the only way is to use xprint, have yet to find a way to print through CUPS.
It modified the mtab and maybe some other files, and only full reinstall/format will solve the problem.
Originally posted by michaelang I have the same problem, I found out that it happen after I installed xprint from xprint.mozdev.org. As I need to print from Mozilla, the only way is to use xprint, have yet to find a way to print through CUPS.
It modified the mtab and maybe some other files, and only full reinstall/format will solve the problem.
you have a similiar problem?
could you elaborate
mtab means mounted partitions
mtab can be replaced with a symbolic link to /proc/mounts
(provided you don't use loop devices)
add something then i could try to help
such as looking at /var/log/dmesg
or /var/log/messages
It's the same problem as mention in the atemis original first post (same messages), /proc/mounts No such file or directory.
/proc is not mounted at the beginning... I can manually mount at the repair/maintenance mode.
Well, I have reformatted 3 times over due to the same issue, the logs had long gone. If any of you have the free time, try RH8+KDE+xprint and see the problem.
I have same or very similar problem and am thinking I may have to reinstall RH. Not quite ready to give up, but very close.
I am very interested in something you said: You said you reinstalled but did not lose data? I guess I didn't realize that was possible. Can I assume it is an option in the install process?
Kind regards,
TAH
PS: For anyone interested, the one main difference I see between the Artemis' situation and mine is that when I try to do something like mount -a it tells me "only root can do that" BUT I AM root!!
well find your root device(ie root partition)
you can find those by checking
/etc/fstab
or
/proc/partitions
or
by the command
rdev
now suppose that your root partition is /dev/hda7
you can try
mount -o remount,rw /dev/hda7 /
so that you can remount your root device.
And HwzrHlslndr mount -a should work,coz you should be root
Check the /etc/passwd file and check whether after root there is entry like
0:0 and check if some otheruser has the same entries (ie 0:0)
did you tried running different runlevels like runlevel one
(on the grub menu,press a,then on the redhat boot line press e,then at the end of the boot command type '1' or one
then press enter and press b)(Hope that it does not sound complicated ,read the man page too if it does)
so that you reach runlevel one.
As for installing without losing data simply use the upgrade menu in the cd /or choose install and choose not to format)
sorry, nothing seems to get it done. I think I may be ready to give up and reinstall. Good thing I have so much disdain for Windows; otherwise, I might be tempted to run this win2000 disk sitting in front of me. I need a call from my sponsor. LOL
did you checked the /etc/passwd file
(change your password with the passwd command and try to mount again)
If you have enabled shadow the shadow passwords are in the /etc/shadow file.
I told you to check this line
root:x:0:0:root:/root:/bin/bash
(it should be something like that)
Now if there is another account with 0:0 in it ,it means that somebody maliciously has created a
account with root privileges
Or you could try to create another root account yourself and check if mount does work this time
try
adduser <somebody>
then try to change the passwd of the user
passwd <somebody>
after that edit the /etc/passwd file
somebody:x:X:Y:somebody:/home/sby:/bin/bash
change the values of X and Y to 0 so that somebody get the root privileges
(Hope that you have a single user computer though,coz as you could guess security loopholes
are created)
Now login to that user
(do not use su,it will not work)
and try mounting again
Hope that works
Robin
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.