LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Filesystem mounted as read-only? Why? How? (https://www.linuxquestions.org/questions/linux-newbie-8/filesystem-mounted-as-read-only-why-how-505101/)

Misfit138 11-26-2006 08:16 PM

Filesystem mounted as read-only? Why? How?
 
Neither my grub/menu.lst nor my fstab seem to be in error (as far as I can tell) but I got a forced FSCK, (after 39 boots)and it fails because my filesystem is mounted as read only.
I am not sure what is telling it to mount as read only, though, any ideas? On boot up I see a message like 'kinit mounting readonly', and when I change it back (mount -n -o remount,rw /) and reboot, I see a message scrolling down saying that it is being re-mounted as read only again!
What am I doing wrong?

here is my fstab (note-I had to change hdc1 to 0 0 to get around the forced fsck temporarily)

# /etc/fstab: static file system information
#
# <file> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0

/dev/cdrom /mnt/cd iso9660 ro,user,noauto,unhide 0 0
/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0
/dev/fd0 /mnt/fl vfat user,noauto 0 0

/dev/hdc1 / ext3 defaults 0 0
/dev/hdc2 swap swap defaults 0 0
/dev/sda1 /mnt/hd1 auto user 0 0

here is my menu.lst

# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /boot/vmlinuz26 root=/dev/hdc1 vga=773
initrd /boot/kernel26.img

I remember after my initial system update, I got a kernel panic error, but got around it by changing initrd.img to kernel26.img....could this be related?

nadroj 11-26-2006 08:58 PM

i dont use grub but youll notice in the second last line of your menu.lst at the end of the line is 'ro' for, i assume read-only. maybe change that?
i dont remember the boot process but i know it starts as read only then remounts it read-write.. can you be more specific about what is the problem? ie error messages? does the system not fully boot?

Misfit138 11-26-2006 09:23 PM

Well, i can get around it by pressing ctrl-D, but I am uncomfortable leaving it alone since the fsck tells me there's something wrong, I guess. I have had fsck on my other linux boxes and they never fail for being 'mounted as read-only'....so I was wondering where the configuartion setting for this might be located, and if I might be able to tweak it so that it passes the fsck..? I know I must have done SOMETHING wrong, but I just don't know what.

BTW- I took out the 'ro' from my /boot/grub/menu.lst, but it still complains.

nadroj 11-26-2006 09:31 PM

again never used grub--do you have to run a command after you change its configuration for it to use this new configuration, as needed with lilo?

would you be able to download a small live cd such as DSL (50mb) or other and mount it read-write and do fsck on it then?

Misfit138 11-26-2006 09:50 PM

Well, the system seems fine, I just don't know where else to look.

The exact error is this:

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.

btmiller 11-26-2006 10:02 PM

The fsck program should never fail because the filesystem is mounted read-only. In fact, it's a really bad idea to run fsck on a writeable filesystem so it pretty much has to be mounted read only or not mounted at all for a safe fsck.

It sounds like the automatic fsck done by init is failing. After it falls to the shell and making sure the root filesystem is indeed mounted read only try running:

fsck -C /dev/hdc1

(assuming hdc1 is your root partition as posted above).

This will hopefully complete successfully and you can type "init 3" to get back up to full mulriuser mode with the filesystems mounted read-write.

Misfit138 11-27-2006 06:27 AM

Quote:

Originally Posted by btmiller
The fsck program should never fail because the filesystem is mounted read-only. In fact, it's a really bad idea to run fsck on a writeable filesystem so it pretty much has to be mounted read only or not mounted at all for a safe fsck.

It sounds like the automatic fsck done by init is failing. After it falls to the shell and making sure the root filesystem is indeed mounted read only try running:

fsck -C /dev/hdc1

(assuming hdc1 is your root partition as posted above).

This will hopefully complete successfully and you can type "init 3" to get back up to full mulriuser mode with the filesystems mounted read-write.

Took a while, but yeah, it worked! Thanks!


All times are GMT -5. The time now is 05:53 AM.