LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Couldn't open shell, now can't log in to Gnome (https://www.linuxquestions.org/questions/linux-newbie-8/couldnt-open-shell-now-cant-log-in-to-gnome-437138/)

Types With Index 04-20-2006 11:16 AM

Couldn't open shell, now can't log in to Gnome
 
Hello all,

I'm running Ubuntu on an IBM thinkpad A30. I installed it last night, and after what I think was a kernel panic got it up and running (I didn't do anything, it just worked when I ran install a second time). The only change I've made to the system was to run Automatix--it's an app that automatically istalls several useful apps like adobe, skype, flash plugins, and about 30 others. I've run it before on an old machine with no problems. I can't post URL's yet, but if you Google Automatix, the top listing will take you to a download link.

Today I got an error message from my Ubuntu update utility (now I can't remember the message--I'm writing this post from my girlfriend's computer). Something about not being able to write to a file. I found a possible fix on this site that involved working from the command line. When I tried to open a shell ("terminal" in Ubuntu) from the GUI, I got no response. Ctrl-Alt-F2 worked, but I like being able to run GUI-based programs from the command line. So I restarted the machine and now I can't log in. The error message, which was only on the screen briefly, was something about a file possibly being full, but anyway not being able to write to a file and therefore unable to log in.

The machine used to run Windows, in case any of this is a sign of virus infection.

Thanks for any and all help. Also, I'm a rank newbie--I know a little about working from the command line, but not much--and I have never posted to any forum before ever, so etiquette advice is also welcome. Cheers!

pljvaldez 04-20-2006 11:40 AM

Could you login from Ctrl-Alt-F2? Try to post the message it gave you here so we can see what exactly the problem seems to be.

Anyway, if not, you should be able to boot from your install CD. At the boot prompt, type rescue and you should get a root command prompt (so be careful here). From there we'll most likely be able to guide you on what you need to do to fix the problem.

Types With Index 04-20-2006 12:17 PM

Better (or worse) error message
 
Thanks for such a quick reply! I could log in from Ctrl-Alt-F2, and I have the install disk handy. I did Ctrl-Alt-Del to restart (I tried sudo init 6 but got an error saying the file was read-only) to try to get the error message again, and while checking the file system (before the point of the last error), it returned the following:



/ contains a file system with errors, check forced.
Error reading block 98309 (Attempt to read block from filesystem resulted in short read) while doing inode scan.

/: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[fail]

*fsck failed. Please repair manually and reboot. Please note *that the root file system is currently mounted read-only. To *remount it read-write:

* # mount -n -o remount, rw /

* CONTROL-D will exit from this shell and REBOOT the system.

bash: lesspipe: command not found
bash: dircolors: command not found
root@(none):~#




Not wanting to waste anyone's time, I went ahead and ran the command. It ran instantaneously, which I thought was odd for a command like mount. So I hit Ctrl-D like the machine said. It gave me the exact same screen reproduced above. I've once again got what looks to be a root prompt.


I'm off to class now; should be able to work on this more @2:45. Thanks again for all help.

pljvaldez 04-20-2006 01:49 PM

After doing a little bit of reading, I think you need to boot with your install CD and type "single" at the boot prompt.

Find the right partition by typing fdisk -l. It should list /dev/hda and the partitions underneath it. If you just did a standard ubuntu install, there should be only two partitions, / and swap. Then from the command line, run fsck -r /dev/hda1 (or whichever partition is your linux partition). Fix any errors and reboot.

It may be possible that the error above with block 98309 is the beginning of a hard drive failure. Or it might be just an error on the filesystem that can be fixed. If it reports a lot of block failures, you're probably looking at the end of your drive...

Types With Index 04-20-2006 02:30 PM

That worked! I got a whole lot of error messages like the following:

ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector xxxxxxx
Buffer I/O error on device hda1, logical block xxxxxx
hda: dma_intr: status=0x51 {DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 {UncorrectableError }, LBAsect=xxxxxxx, sector=xxxxxxx

I then went through the error correcting process, and when I rebooted it now seems to work. Thanks!


All times are GMT -5. The time now is 05:47 PM.