Solved

Read only file system

Posted on 1997-02-03
1
371 Views
Last Modified: 2006-11-17
Hi,

I thought I had successfully installed Linux and everthing was cool.
Yesterday I went in to make some configuration changes to support X.
Just before giving me the logon prompt there were a slew of messages that
said 'Read only file system' and 'Cannot open utmp'.
How do I fix this problem. I loaded Slackware 3.0 off a CD.

Any help would be appreciated,

Thanks

Vince
0
Comment
Question by:vjoseph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
mstonge earned 50 total points
ID: 1584163
It would appear that you may have corrupted your rc.sysinit file when you installed X.  rc.sysinit is the script that mounts your root filesystem, it first mounts it as read-only and then as read-write.  I don't know how it's going to look like but here is a good copy.

#! /bin/sh
#
# /etc/rc.d/rc.sysinit - run once at boot time
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
#

# Set the path
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH

# Read in config data.
. /etc/sysconfig/network

# Start up swapping.
echo "Activating swap partitions"
swapon -a

# Set the hostname.
hostname ${HOSTNAME}
echo `hostname`

# Check filesystems    
if [ ! -f /etc/fastboot ]; then
        echo "Checking filesystems."
        fsck -A -V -a

        # A return of 2 or higher means there were serious problems.
        if [ $? -gt 1 ]; then
                echo
                echo
                echo "*** An error occurred during the file system check."
                echo "*** Dropping you to a shell; the system will reboot"
                echo "*** when you leave the shell."

                PS1="(Repair filesystem) #"; export PS1
                /bin/sh

                echo "Automatic reboot in progress."
                reboot
        fi
fi

# Remount the root filesystem read-write.
echo "Remounting root filesystem in read-write mode."
mount -n -o remount,rw /

# Clear mtab
>/etc/mtab

# Enter root into mtab.
mount -f /

# Mount all other filesystems (except for NFS). Contrary to standard usage,
# filesystems are NOT unmounted in single user mode.
echo "Mounting local filesystems."
mount -a -t nonfs

# Clean out /etc.
rm -f /etc/mtab~ /etc/fastboot /etc/nologin
>/var/run/utmp

# Delete UUCP lock files.
rm -f /var/lock/LCK*

# Delete stale subsystem files.
rm -f /var/lock/subsys/*

# Delete stale pid files
rm -f /var/run/*.pid

# Set the system clock.
echo -n "Setting clock: "
. /etc/sysconfig/clock
if [ ${CLOCKMODE} = "GMT" ]; then
        clock -u -s
else
        clock -s
fi
date

# Right, now turn on swap in case we swap to files.
echo "Enabling swap space."
swapon -a 2>&1 | grep -v "busy"

# Initialize the serial ports.
if [ -f /etc/rc.d/rc.serial ]; then
        . /etc/rc.d/rc.serial
fi

# Autoload the default modules
if [ -f /etc/rc.d/rc.modules ]; then
        /etc/rc.d/rc.modules
fi


This is of a linux kernel 1.2.13


Marc
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question