Solved

Read only file system

Posted on 1997-02-03
1
366 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
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now