Solved

Read only file system

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

911 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

19 Experts available now in Live!

Get 1:1 Help Now