LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Root filesystem mounting as Read-Only (https://www.linuxquestions.org/questions/linux-newbie-8/root-filesystem-mounting-as-read-only-426733/)

paddyjoy 03-20-2006 05:34 PM

Root filesystem mounting as Read-Only
 
Hi,

Hope someone can help me out here! I have a computer running FC4, last night I put a second hard drive in it and installed debian on that hard drive. So I have:

Code:

Disk 0: Fedora
Disk 1: Debian

Ok so I boot up in debian, play around for a while, mount my fedora root file system while running debian.

Code:

mkdir /data
mount /dev/hda3 /data

I then reboot and try and boot fedora but the root filesystem (/dev/hda3) gets mounted read only (I get lots of messages complaining about this).

Anyone any ideas?

Paddy

pixellany 03-20-2006 05:50 PM

If you mount hda3 when running in Debian, it is not going to affect how Fedora runs---unless you changed some Fedora configuration files (on purpose or otherwise...;) )

In Fedora, what does cat /etc/fstab say?

paddyjoy 03-20-2006 06:01 PM

Yeah that's what I though as well, here is my fedora fstab. I'm logged onto debian at the moment so fedora root filesystem is on /dev/hdb3:

Code:

debian:~# cat /data/etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                /                      ext3    defaults        1 1
LABEL=/boot1            /boot                  ext3    defaults        1 2
/dev/hda5              /paddy                  ext3    defaults        0 0
/dev/devpts            /dev/pts                devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm                tmpfs  defaults        0 0
/dev/proc              /proc                  proc    defaults        0 0
/dev/sys                /sys                    sysfs  defaults        0 0
/dev/hda2              swap                    swap    defaults        0 0
/dev/fd0                /media/floppy          auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
/dev/hdd                /media/cdrecorder      auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
debian:~#


Paddy

pixellany 03-20-2006 06:14 PM

I dont get it---there's no hdb in here---and how would Fedora be getting switched from hda to hdb?
How are you dual-booting?

I'm not smart enough about fstab to interpret "LABEL" and "defaults"

Somebody smarter please feel free to grab the reins here.....;)

paddyjoy 03-20-2006 06:20 PM

Sorry I should have explained, I didn't actually dual boot I just swapped the drives around! I'm not sure about the LABEL thing either ha ha!

Paddy

pixellany 03-20-2006 06:22 PM

PS:

Mine is similar---look also at /etc/mtab
With similar fstab entries, my "/" gets mounted rw (read-write)

From my fstab:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=SWAP-sda3 swap swap defaults 0 0

From my mtab:
/dev/sda2 / ext3 rw 0 0
/dev/sda1 /boot ext3 rw 0 0

(swap doesn't get mounted--its just there)
(sda because it's a scsi drive....)

There is obviously something else that tells the system how to mount at startup....

paddyjoy 03-20-2006 06:30 PM

My mtab looks like that as well:
Code:

debian:~# cat /data/etc/mtab
/dev/hda3 / ext3 rw 0 0
/dev/proc /proc proc rw 0 0
debian:~#

Could a harware failure cause it to be mounted read only?

Paddy

unSpawn 03-20-2006 07:12 PM

When a filesystem isn't umounted cleanly it's marked that way. Have a quick check as root.
If it is then drop to runlevel 1, remount the partition read-only and use fsck:
Code:

fdisk -l | grep Linux$|awk '{print $1}'|while read p; do tune2fs \
-l $p|grep -q "^F.*te:.*not.clean" && echo "$p not clean"; done

If that's not it then please post actual error messages.

paddyjoy 03-20-2006 07:51 PM

Thanks for the code, they are all marked as clean. I'm not physically at my machine at the moment so I will have to post some actual error messages later. Most of them go along the lines of:
Code:

Can't remove file /tmp/.lock.... (Read only file system)
Thanks,
Paddy

mbreith 03-21-2006 02:13 AM

Quote:

Sorry I should have explained, I didn't actually dual boot I just swapped the drives around!
You're doing what :confused: . I can see how that could cause some erratic behavior.

unSpawn 03-21-2006 05:29 AM

Can't remove file /tmp/.lock.... (Read only file system)
OK. Boot into runlevel 1, mount partition read-write, run fsck on it and reboot properly. On reboot all should be well.

paddyjoy 03-21-2006 03:32 PM

Quote:

Originally Posted by mbreith
You're doing what :confused: .

I have two hard drives on the same IDE cable, I just switch the jumper on the hdd's to determine which one is master.

Seems like I have found the problem, I booted up in runlevel 1, when I tried to remount the root partition,

Code:

mount -n -o remount,rw /
I got an error
Code:

Mount Failed: /dev/hda3 (ext3) and /dev/hdb3 (ext3) both have label /
So I disconnect the debian hdd and fedora boots up fine. I find it strange that this happens because my fedora /etc/fstab has no reference to hdb!

Paddy


All times are GMT -5. The time now is 04:32 AM.