LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /dev/hda1 contains a file system with erors, check forced (https://www.linuxquestions.org/questions/linux-newbie-8/dev-hda1-contains-a-file-system-with-erors-check-forced-767649/)

JFvdPol 11-08-2009 03:15 AM

/dev/hda1 contains a file system with erors, check forced
 
I bought an old IBM SureOnbe POS terminal for my daughter that contaions Linux as the operating system. I have never used Linux before. After starting the terminal two time it locked on me.

It gives the following messag:

/dev/hda1 contains a file system with errors, check forced
Duplicate or bad blocks in use!

/dev/hda1: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY
(i.e. without -a or -p options)


*** An error occured during the file system check
*** Dropping you to a shell: the system will reboot
*** When you leave the shell
Give rootpassword for maintenance
(or type Control-D for normal startup):
--------------------
I have connected a keyboard, and the system reacts to Control -D. However it does not react to any numers that I type and I do not know the rootpassword.

Does anyone have any idea what to do now?

camorri 11-08-2009 06:19 AM

This is no small ball of yarn to unwind. There are several things to try. First of all, does this system have a CD-rom drive? If yes, then I would get a live CD and boot that, and use that to try and fix the disk problems.

If there is no other way to boot the system, you are stuck with trying to either guess the root password, or there are a few tools around to change it. Passwords are well protected on linux systems, they are in an encrypted file, so it is almost impossible to hack them.

I would guess this is a Red Hat system, since that is what IBM supported for a long time. ( and still does ).

Another approach is to buy a new hard drive, since we already know there are disk problems, that is not a bat approach. How are you at opening up a system, and removing, and replacing a drive? If you have little or no experience, it might be advisable to find some help. It isn't all that difficult, but there are things to know, like what type of drive it is. IDE, SCSI, SATA etc. If you are lucky, the drive is IDE. There are lots of inexpensive replacements around. If you change the drive, then you can install what ever you like.

Hope this helps.

BTW, if you post the Machine Type and Model, you can go to the IBM web sites and find lots of useful information, including the manuals in PDF format for the hardware.

JFvdPol 11-08-2009 06:54 AM

The system does not have a CD, but it does have a floppy drive. I downloaded a program called Brub2 on a bootable CD and thoughtI might be able some commands that I found such as fsck. I was able to get to a Grub> comment prompt, but it does not recognize the fsck command. Any help on getting the fsck comment top work, or would this make no sence at all in my case.

I am afraid that changing the hard drive is not worth the investment, as I bought this registry as a toy for 25 bucks. It worked the first couple of times but went into trouble after we powered off the system with the powerbutton.

mrrangerman 11-08-2009 06:55 AM

In linux when you type a passwd it will seem like nothing is happening, this is a safety feature. As you first boot the system do you get a Grub menu? If the system has Ubunut installed you may only see a prompt to Press Esc to get a Grub menu. Post back and let us know.

Just do a google search on how to recover a lost passwd on www.google.com/linux I could write it down for you but being your first post that may be against the LQ rules for me to do so.

JFvdPol 11-08-2009 07:08 AM

If I boot the system without the bootable floppy I get only the messages as mentioned in my first post on this subject. With the bootable floppy in the drive I get the Grub menu, but being a Novice I have no idea how I should use it. I do not know if Ubuntu is installed. It seams I only get access to comment promt via floppy.

Thanks for helping me.

michaelk 11-08-2009 07:35 AM

http://www.toms.net/rb/

This is a complete OS and should be able to repair the disk. I would guess that this system uses an ext2 filesystem. Boot the floppy and run e2fsck.

JFvdPol 11-08-2009 08:06 AM

Thanks a lot Michael for this great tip.
I have downloaded the zip-file on a windows system and now I will need to make
a bootable floppy from it. Theinstrcutions say that I need a dos-prompt (not in windows)to do this,
but I do not know how I get a dos prompt after start up, as this was a feature only under windows 95.

Any idea how I can get a bootable floppy under windows?
I realizethat this is a Linus forum, but the only way to get this floopy is under windows unfortunately.
Thanks again for your help.

JamesChamberlain 11-08-2009 08:14 AM

Hmpf. When your machine boots up (before the operating system starts) have you a grub bootloader prompt ?. If so you could use this to boot into single user mode, change the root password, and run fsck manually.

JFvdPol 11-08-2009 08:37 AM

Quote:

Originally Posted by JamesChamberlain (Post 3749107)
Hmpf. When your machine boots up (before the operating system starts) have you a grub bootloader prompt ?. If so you could use this to boot into single user mode, change the root password, and run fsck manually.

I do not get a grub bootloader prompt at all. Is there any way to force this to happen? I only can get a promt when starting from a floppy, but in that case the fsck command does not work. Also I am a complete novice with Linux, so not sure how to get into "single user mode".

JamesChamberlain 11-08-2009 08:46 AM

Quote:

Originally Posted by JFvdPol (Post 3749133)
I do not get a grub bootloader prompt at all. Is there any way to force this to happen? I only can get a promt when starting from a floppy, but in that case the fsck command does not work. Also I am a complete novice with Linux, so not sure how to get into "single user mode".

There's no countdown to select an operating system?

Try:

grub> find /boot/grub/stage1
(This will give a partition, needed for the next step..)
grub> root (hd?,?)
(Replace ? with what was received above, and finally..)
grub> setup (hd0)

Reboot. You should (if installed a newer grub, have a grub boot prompt at startup). From here you can edit the kernel bootup with argument '1' to boot into init 1.

JFvdPol 11-08-2009 09:31 AM

Quote:

Originally Posted by michaelk (Post 3749073)
http://www.toms.net/rb/

This is a complete OS and should be able to repair the disk. I would guess that this system uses an ext2 filesystem. Boot the floppy and run e2fsck.

Is there any way to do this from Windows XO or do I need to install Ubuntu?

pcunix 11-08-2009 09:51 AM

My first thought:

It's probably an old Linux. Why not download Ubuntu, make a CD and reinstall?

Even if you can fix this (and the previous owner may have deliberately scratched the fs), why would you want something installed by unknown persons? It could be full of trojans for al you know. Yu say it was a POS terminal? It may not have much beyond the terminal app on it!

Overwrite it. She'll be happier with a modern Linux anyway.

JFvdPol 11-08-2009 09:58 AM

Quote:

Originally Posted by pcunix (Post 3749197)
My first thought:

It's probably an old Linux. Why not download Ubuntu, make a CD and reinstall?

Even if you can fix this (and the previous owner may have deliberately scratched the fs), why would you want something installed by unknown persons? It could be full of trojans for al you know. Yu say it was a POS terminal? It may not have much beyond the terminal app on it!

Overwrite it. She'll be happier with a modern Linux anyway.

The system only has a floppy and no USB to connect a cd player to it. It is over 10 years old. How to connect a CD-player in this case?

markush 11-08-2009 10:02 AM

Hello JFvdPol and welcome to LQ,

Quote:

Originally Posted by JFvdPol (Post 3749101)
... Theinstrcutions say that I need a dos-prompt (not in windows)to do this,
but I do not know how I get a dos prompt after start up, as this was a feature only under windows 95.

Any idea how I can get a bootable floppy under windows?

In windows click on Start->Execute... (or run...) and type "cmd" and then Enter. This will start the so called dosshell. You may also find the dosshell somewhere under "All Programs" in Windows its called something like "cmd".

Markus

pcunix 11-08-2009 10:25 AM

Quote:

Originally Posted by JFvdPol (Post 3749201)
The system only has a floppy and no USB to connect a cd player to it. It is over 10 years old. How to connect a CD-player in this case?

If it has IDE ( and it almost surely does), you can connect an IDE CD.


All times are GMT -5. The time now is 03:17 PM.