LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 03-20-2006, 05:34 PM   #1
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Rep: Reputation: 30
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
 
Old 03-20-2006, 05:50 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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?
 
Old 03-20-2006, 06:01 PM   #3
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
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
 
Old 03-20-2006, 06:14 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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.....
 
Old 03-20-2006, 06:20 PM   #5
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
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
 
Old 03-20-2006, 06:22 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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....

Last edited by pixellany; 03-20-2006 at 06:23 PM.
 
Old 03-20-2006, 06:30 PM   #7
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
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
 
Old 03-20-2006, 07:12 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
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.
 
Old 03-20-2006, 07:51 PM   #9
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
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
 
Old 03-21-2006, 02:13 AM   #10
mbreith
Member
 
Registered: Feb 2006
Location: oregon
Distribution: PIII fedora2 | P4 fedora2 | Thinkpad fedora2
Posts: 54

Rep: Reputation: 15
Quote:
Sorry I should have explained, I didn't actually dual boot I just swapped the drives around!
You're doing what . I can see how that could cause some erratic behavior.
 
Old 03-21-2006, 05:29 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
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.
 
Old 03-21-2006, 03:32 PM   #12
paddyjoy
Member
 
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by mbreith
You're doing what .
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error mounting ext3 filesystem... mount: /dev/hdd1: can't read superblock versaulis Linux - Software 5 11-26-2006 08:34 PM
Fedora core 3 apparently not remounting root filesystem read-write during boot amundsen_eric Fedora 3 05-17-2005 05:46 AM
Mounting root filesystem with data=writeback Phaethar Red Hat 2 01-29-2004 04:47 PM
Read-only root filesystem at the boot karimson Linux - General 0 03-20-2003 05:01 AM
Mounting root filesystem in read only mode. Ocran Linux - Software 3 07-01-2002 12:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration