Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
06-25-2003, 07:09 PM
|
#1
|
LQ Newbie
Registered: Jun 2003
Location: UK
Distribution: Red Hat 7.2/9.0/Gentoo 2005/Ubuntu 8.049.0.4
Posts: 3
Rep:
|
Half Dead Penguin - Startup failure/Filesystem error
Linux novice with a half dead box:
RH7.2
Intel i386 PIII
1 X SCSI IBM HD(sda: sda1 sda2 sda3)
1 X Maxtor ATA HD (hdb)
Have got boot disk
Have got Install CD's
Haven't got backups (stupid i know))
Have looked at "E2fsck" man, checked out most relevant threads and FAQ's and I'm still confused
SCSI drive seems to be running ext3 file system - not sure about ATA drive tho'
The box hung when Mozilla died while logged in as root (stupid again) and nothing was doing to get it to shut down cleanly, so I had to switch off (it's got a firewall on as well and I can't telnet in and there's no SSH enabled)
On restart the box gets as far as the "Wecome to Red Hat Linux" text, then runs through the first few startup processes OK:
Mounts proc filesystem
unmounts initrd
Configuring kernal parameters
setting clock
loading default keymap
loading default font
Activating swap partitions
setting hostname
mounting USB filesystem
initializing USB controller
then I get the "Your system appears to have shutdown uncleanly" message and it goes into the file system check and returns:
"Checking root filesystem"
"/ contains a filesystem with errors, check forced"
"/:
Inode 802848 has illegal block(s)."
"UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
(i.e., without -a or -p options)"
then I get "[FAILED] "
dropped into the shell, enter root password.
to prompt "(Repair filesystem)".
Tried to look at "/etc/fstab", get to "/etc" not "/fstab" - "cd" gets "Not a directory". Guess this means "/fstab" is dead?
Doing "CDFISK" gets:
"/dev/sda2 on / type ext3(rw)
usbdevfs on /proc/bus/usb type usbdevfs(rw)
none on /dev/pfs type devpfs (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
Having really looked around at poss guidance(man's/threads on this group)
but still unsure and need to know:
can I apply some kind of fix that will recover the filesystem intact (and if that's realistic with my setup and lack of brain) or recreate.
if an ext3 filesystem has some really easy way of recovering and that applies to the box I've got to fix (unlikely I know 'cos I guess it would already have recovered by itself if it was going to).
can I use boot disk/repair file from install CD to get fix that will leave apps/configs as they were.
Help/pointers/suggections gratefully accepted. Im knackered and don't expect anyone to be looking much at this now, crashing out in about 30 mins. but e-mail alert on if someone takes pity.
|
|
|
06-25-2003, 07:22 PM
|
#2
|
Member
Registered: Jun 2003
Location: Europe / Germany / Saarland / Neunkirchen
Distribution: Debian (SID), Gentoo
Posts: 131
Rep:
|
Hi,
do a
remount / -o mount,ro
after that check every device with fsck
f.e. for /dev/sda2 (/):
fdisk /dev/sda2
after that, i guess you get lots of questions that you answer with yes (Y) you do a
sync
and the system is syncin all drives, and then you do a
reboot
and the system should come up in a proper status again
hope i could help
cu
|
|
|
06-25-2003, 07:56 PM
|
#3
|
LQ Newbie
Registered: Jun 2003
Location: UK
Distribution: Red Hat 7.2/9.0/Gentoo 2005/Ubuntu 8.049.0.4
Posts: 3
Original Poster
Rep:
|
Thanks for that Stony,
It looks like a good fix, but I'm not sure how to find out what all the device names are. Should there be some on the ATA drive (and will those all be "/something/hdb" ?, with exactly the same "/something" for each SD1 or hdb1 etc.
Just to check as well, is that fdisk or should it be fsck? Or do I need to use "E2fsck" instead. Sorry to be dim about this.
Thanks again,
AB
|
|
|
06-26-2003, 06:16 AM
|
#4
|
Member
Registered: Jun 2003
Location: Europe / Germany / Saarland / Neunkirchen
Distribution: Debian (SID), Gentoo
Posts: 131
Rep:
|
Hi,
eeer, fdisk was a mistake of me =) ... you have to use fsck
and all other device names should be in /etc/fstab
cu
|
|
|
06-26-2003, 06:20 AM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Tried to look at "/etc/fstab", get to "/etc" not "/fstab" - "cd" gets "Not a directory". Guess this means "/fstab" is dead?
|
no it means it is not a directory - it is a text file.
for a list of drives on your system: "fdisk -l"
|
|
|
06-26-2003, 07:21 AM
|
#6
|
LQ Newbie
Registered: Jun 2003
Location: UK
Distribution: Red Hat 7.2/9.0/Gentoo 2005/Ubuntu 8.049.0.4
Posts: 3
Original Poster
Rep:
|
Thanks again Stony and Acid,
I worked out the fsck/fdisk thing, and ended up using "E2fsck" with no flags, and fixing "/dev/sda1" and "/dev/sda2". I got a "bad blocks" (well not that but similar) for the affected INODE and there were loads of affected sectors - think it was sectors as I was a bit tired by then.
Took a chance, put my knackers on the line and said "Y" to all the suggested fixes and all was well. From a brief glimpse of one of the messages that popped up, it looked like a log file was the only casuality and so far everything looks OK. I'm still not sure if/what my IDE drive is doing (anything) under Linux, but at least I've got a chance to find out how to work this out now.
I really will get Samba going now, as my only bup device (OnStream ADR DP30 parallel port) is not Linux friendly so I'll have to to get it running across the network to a W2000 box and then network to it via that.
Any suggestions (and on whats good for a small network bup-BRU/Amanda look a bit over the top) or should I poke this one onto another thread/forum?
Thankyou both again,
AB
|
|
|
All times are GMT -5. The time now is 09:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|