LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-19-2010, 06:34 AM   #1
lennartz
LQ Newbie
 
Registered: Jun 2010
Location: netherlands
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
[Ubuntu Server 9.10] Filesystem mounted read-only


Hi all this is my first problem posted here so be gentle

My root filesystem is mounted read-only and I don´t know why.
It looks like it started after een `apt-get upgrade´, but that is really when I found out about it, packages didn´t install. (read only)

Also...my /home is never mounted automatically (it worked before)
And my USB drives are also never mounted automatically (worked before)
However, after I try an "mount -a" my USB drivers are mounted AND my /home is mounted BUT my root is still read-only mounted.

Things I tried:

- Running fsck on /dev/sda1: clean.
- Starting in recovery mode, all symptoms are GONE. (!)
- tried upgrading in recovery mode.
- Checking UUID´s, they match up.
- Checked dmesg
- Checked messages
- Checked sysstat

I did not alter fstab or any configuration prior to this situation.
I DID changed one thing in fstab trying to fix the problem and that is that I removed the `error = readonly` part in the parameters for SDA1.
It didn´t work.

Here is my fstab:

Code:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=1ee0d402-eb34-44d6-932c-53fe1473b2ba /               ext3    relatime      0       1
# /home was on /dev/sda6 during installation
UUID=3be24c35-fb2a-4558-b846-a9d70d2b024d /home           ext3    relatime        0       2
# /tmp was on /dev/sda8 during installation
UUID=39bf57d1-2e25-4533-a517-87271e8f5922 /tmp            ext3    relatime        0       2
# /var was on /dev/sda7 during installation
UUID=a6bf5b3d-be11-413d-bc68-2b0b2bd54bf9 /var            ext3    relatime        0       2
# swap was on /dev/sda5 during installation
UUID=81ea86d5-f72c-487f-8e34-eef340f149be none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

# Section added for External USB Hard drives.
# The labels are needed to pevent mixup in mounts and device order.
# DO NOT USE device files instead of the labels. /LZ

LABEL=usb1      /storage/usb1   auto    rw,user,auto,exec       0       3
LABEL=usb1copy  /storage/usb1copy   auto    rw,user,auto,exec       0       3
LABEL=usb2      /storage/usb2   auto    rw,user,auto,exec       0       3
LABEL=usb2copy  /storage/usb2copy   auto    rw,user,auto,exec       0       3
update:
Just before the login prompt I get these messages:

Code:
umount: /var (device is busy)
umount: /tmp (device is busy)
umount: /dev (device is busy)
umount: /var/run (device is busy)
I spotted these on the console itself, I work over SSH so..

any suggestion is welcome as I´am a newbie on Linux.

Last edited by lennartz; 08-19-2010 at 06:59 AM. Reason: updated with information
 
Old 08-22-2010, 02:10 AM   #2
aeternitas
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu Lucid 10.04 LTS
Posts: 23

Rep: Reputation: 15
A few questions, if I might...

First, what distro/version are you currently using?

Second, had you made any changes prior to the mentioned apt-get upgrade (software, hardware, and so on) that you can recall?

Do you typically work as yourself (using sudo for administrative tasks like updates and the like), or have you unlocked root for routine use?

Last, when you, say, insert a USB drive and it doesn't auto-mount for you, does they system just sit idly as if nothing has been attached, or does it throw an error at you? If an error is thrown, what is it?

The thing that gets me is the fact that umount of /var, /tmp, /dev/ and /var/run is being attempted...it doesn't strike me as normal (I've never seen it happen myself).
 
Old 08-22-2010, 07:31 AM   #3
lennartz
LQ Newbie
 
Registered: Jun 2010
Location: netherlands
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by aeternitas View Post
A few questions, if I might...

First, what distro/version are you currently using?
Code:
lennart@hermes:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
Quote:
Second, had you made any changes prior to the mentioned apt-get upgrade (software, hardware, and so on) that you can recall?
No, that´s the strange thing. The apt-get upgrade seem to have triggered these events.
When I boot, /home is gone. my USB drives are not mounted and my root is mounted read-only.
If I run a `mount -a`. /home is mounted again. My usb drives are mounted (BUT DO NOT SHOW UP IN MTAB or DF, but DO in /PROC/MOUNTS) and my root is STILL mounted read-only.
All of the symptoms are gone and work right away after boot when I use recovery mode in GRUB. it just works like it alway´s did from there.

Quote:
Do you typically work as yourself (using sudo for administrative tasks like updates and the like), or have you unlocked root for routine use?
I use SUDO.

Quote:
Last, when you, say, insert a USB drive and it doesn't auto-mount for you, does they system just sit idly as if nothing has been attached, or does it throw an error at you? If an error is thrown, what is it?
I don´t use the auto-mount I think?. I have entries in my fstab for the USB drives and they are alway´s connected.


Quote:
The thing that gets me is the fact that umount of /var, /tmp, /dev/ and /var/run is being attempted...it doesn't strike me as normal (I've never seen it happen myself).
I don´t get it either.
I checked /var/log/messages for errors.
The only thing that might mean something (not sure ?

Code:
Aug 22 12:44:30 hermes kernel: [    3.250320] Write protecting the kernel read-only data: 1544k
Also searched /var/log/messages for umount messages. none found.
 
Old 08-22-2010, 03:41 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Try typing dmesg and see if you have any errors when mounting your root partition. Usually a filesystem is mounted read-only when there's some sort of error or problem with tghe filesystem or the underlying hardware. What I usually do is reboot the computer into single user mode (or even better, boot off of a LiveCD) and then manually run fsck ion the affected partition, fixing any errors that might crop up.

Doing normal day-to-day work (even as root) should not cause filesystem corruption or cause the partition to be remounted read-only (well, unless you do something truly dumb like write directly to a raw disk device). Sounds to me like there's a hardware or filesystem issue. Maybe your disk is starting to go bad?

One other thing you can do is run:

tune2fs -l <your root partition>

Replaacing <your root partition> with the actual device node of the root partition. This will see what state the filesystem thinks that it is in.
 
  


Reply



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
Mounted read-write Fat32 partition suddenly becomes read-only?? hohead Linux - General 8 04-05-2007 12:17 PM
Filesystem mounted as read-only? Why? How? Misfit138 Linux - Newbie 6 11-27-2006 06:27 AM
Mounted as Read-only filesystem (fat32) on fc4 robinp Fedora 4 04-21-2006 07:24 AM
NFS: a mounted to b, b mounted to c, c can't read a? Steve Cronje Linux - Networking 9 10-25-2004 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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