LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   My hard drive seems to be read-only (https://www.linuxquestions.org/questions/linux-general-1/my-hard-drive-seems-to-be-read-only-337875/)

hominy 06-27-2005 10:14 PM

My hard drive seems to be read-only
 
My hard drive seems to be read-only. There are many error messages at boot and shutdown which complain of read-only files.

memcheck86 found no problem

fdisk tells me the following:

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 19331 155276226 83 Linux
/dev/hda2 19332 19457 1012095 82 Linux swap

Matir 06-27-2005 10:30 PM

Can you give details of the message? Also, what does 'mount' show? Maybe some script is trying to write to the drive while it is mounted read-only?

hominy 06-28-2005 06:45 AM

You asked about the exact text of the error message. There are very many error mesages. At boot, every program which tries to write to a file complains. I am running Knoppix 3.6 from the CD right now. I will reboot from the HD at some point and get the exact text of some of the error messages..

Since the problems began my system only boots in single user mode.

I found the following in syslog.0. Doesn't look good.


Jun 25 03:39:00 linuxbox kernel: EXT3-fs: INFO: recovery required on readonly filesystem.
Jun 25 03:39:00 linuxbox kernel: EXT3-fs: write access will be enabled during recovery.
Jun 25 03:39:00 linuxbox kernel: (fs/jbd/recovery.c, 255): journal_recover: JBD: recovery, exit status 0, recovered transactions 1487545 to 1487797
Jun 25 03:39:00 linuxbox kernel: (fs/jbd/recovery.c, 257): journal_recover: JBD: Replayed 4341 and revoked 14/184 blocks
Jun 25 03:39:00 linuxbox kernel: EXT3-fs: hda1: orphan cleanup on readonly fs
Jun 25 03:39:00 linuxbox kernel: kjournald starting. Commit interval 5 seconds
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 14140642
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 14140717
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538373
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538414
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538466
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538478
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538513
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538517
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538527
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538973
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 4538974
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 17383686
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 17383844
Jun 25 03:39:00 linuxbox kernel: ext3_orphan_cleanup: deleting unreferenced inode 8536122
Jun 25 03:39:00 linuxbox kernel: EXT3-fs: hda1: 14 orphan inodes deleted
Jun 25 03:39:00 linuxbox kernel: EXT3-fs: recovery complete.
Jun 25 03:39:00 linuxbox kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jun 25 03:39:00 linuxbox kernel: EXT3 FS on hda1, internal journal
Jun 25 03:39:00 linuxbox kernel: Generic RTC Driver v1.07
Jun 25 03:39:00 linuxbox kernel: EXT3 FS on hda1, internal journal
Jun 25 03:39:00 linuxbox kernel: warning: process `update' used the obsolete bdflush system call

...............also found the following a little farther down in syslog.0

Jun 25 03:39:00 linuxbox kernel: ttyS1: LSR safety check engaged!
Jun 25 03:39:00 linuxbox kernel: ttyS1: LSR safety check engaged!

Matir 06-28-2005 08:50 AM

Those messages indicate a possible filesystem issue, though if you only see them once, I would not be too worried about them.

hominy 06-28-2005 11:14 AM

Still, I can't use my computer. Apparently because the apps can't write to the hard drive.....

Far from seeing them once, they are there every time I reboot.

Matir 06-28-2005 11:20 AM

Once the system is up, what does 'mount' show?

hominy 06-28-2005 05:52 PM

rebooted the crippled system.

mount returns

/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,nodiratime)

Matir 06-28-2005 10:32 PM

Ah, I'd guess the errors are indeed kicking it over to ro. You might want to try mounting it as ext2 using a LiveCD and then using fsck to repair possible filesystem damage. Are you seeing any read/write errors on the hardware?

hominy 06-29-2005 12:29 AM

First: Thanks, Matir, for hanging with me on this problem.

Next:
started knoppix 3.6 CD kernel 2.6
Typed
mount -t ext2 /dev/hda1 /mnt

invoked e2fsck /mnt/hda1
Got back the "bad superblock" message

invoked e2fsck via fsck /mnt/hda1
got back
/dev/hda1 was not cleanly unmounted, check forced.
Pass1:....
....
Pass5:.....
/dev/hda1: 153173/19415040 files (1.4% non-contiguous), 2572614/38819056 blocks

When I went back to a HD boot the problem seemed unchanged.
Again I booted from the live CD. I got the same results listed above.

BTW, can't figure out how to cut and paste text from a Knoppix root terminal

I see no evidence of hardware errors, but the only diagnostic I've run is memcheck86.

Matir 06-29-2005 12:47 AM

Well, it seems the filesystem is clean. The only other thing I could think of would be a corrupt journal with ext3. Try changing your (real) fstab to mount the partition as ext2 instead of ext3 and see if problems resolve, but beware: no journaling will take place during this. I don't think it could cause any harm, but I'm honestly not 100% sure. A test on a spare partition here showed no problems with doing this, if it's any reassurance.

hominy 06-29-2005 02:27 AM

I changed my real fstab to mount /dev/hda1 as ext2
This did not change the symptoms.
I did see "EXT3: no journal on disk" That's approximate. Boot messages scroll past so rapidly.
Mount still returned "/dev/hda1 on / ext3". This was a surprise.
I opened /etc/fstab just to be sure that it indeed called for hda1 to be mounted as ext2.

I would really like to be able to capture the boot messages, for study and for forwarding.

It isn't critical that I get this box up immediately. The only program which is unavailable elsewhere on my vast <g> network is my webserver.

I'm going to poke around the web for possible solutions.

I'll be delighted to hear any further suggestions.

Again, thanks.

Matir 06-29-2005 02:31 AM

Wow, I didn't think it would mount it ext3... unless you're using an initrd or something?

hominy 06-29-2005 05:19 PM

Ja, there is an initrd folder on hda1, but it's empty.
There are several initrd.img files in /mnt/hda1/boot

Matir 06-29-2005 07:02 PM

Hrrm, I wonder if the initrd contains a mount line for root. I would guess it would have to. Or perhaps it's the product of the kernel auto-detecting the root fs.

hominy 06-30-2005 10:45 PM

Here are the first few lines of my boot messages. I think that line seven is the first line which differs from the usual.

ACPI: BIOS age (1997) fails cutoff (2001), acpi-force is required to enable ACPI
audit(1120208914.297:0): initialized
initrd-tools: 0.1.74
mount: fs type devfs not supported by kernel
umount: devfs not mounted
Mount: fs type devfs not supported by kernel
ext3: No journal on filesystem on hda1
unount: devfs: not mounted
INIT: versionversion 2.78-knoppix booting
grep: /proc/cmdline: no such file or directory
Setting parameters of disk: (none).



All times are GMT -5. The time now is 06:47 AM.