Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 82685 - rc.sysinit fails with fsck on NFS-based root filesystem
Summary: rc.sysinit fails with fsck on NFS-based root filesystem
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-24 21:00 UTC by Oliver Scheck
Modified: 2014-03-17 02:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-24 22:32:36 UTC


Attachments (Terms of Use)
Patch to correct the bug. (deleted)
2003-01-24 21:06 UTC, Oliver Scheck
no flags Details | Diff

Description Oliver Scheck 2003-01-24 21:00:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2) Gecko/20021203

Description of problem:
rc.sysinit tries to execute fsck.nfs if the root filesystem is on NFS.

The check for an NFS root filesystem is incorrect in rc.sysinit because
a Linux 2.4.x kernel has *two* entries in /proc/mounts for / e.g.:

rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0

To correct this behaviour apply the following patch:

--- rc.sysinit.orig	2003-01-24 19:12:37.000000000 +0100
+++ rc.sysinit	2003-01-24 19:19:54.000000000 +0100
@@ -230,7 +230,7 @@
  
 
 _RUN_QUOTACHECK=0
-ROOTFSTYPE=`awk '/ \/ / { print $3 }' /proc/mounts`
+ROOTFSTYPE=`awk '/ \/ / && ($3 !~ /rootfs/) { print $3 }' /proc/mounts`
 if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" ]; then 
 
         STRING=$"Checking root filesystem"
@@ -302,7 +302,7 @@
 fi
 
 # Remount the root filesystem read-write.
-state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
+state=`awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts`
 [ "$state" != "rw" ] && \
   action $"Remounting root filesystem in read-write mode: " mount -n -o
remount,rw /
 


Version-Release number of selected component (if applicable):
initscripts-6.95-1

How reproducible:
Always

Steps to Reproduce:
1. Rebuild linux kernel for root filesystem on NFS
2. Boot system
    

Actual Results:  fsck.nfs: No such file or directory

Expected Results:  No file system check for NFS root filesystem.

Additional info:

Comment 1 Oliver Scheck 2003-01-24 21:06:34 UTC
Created attachment 89590 [details]
Patch to correct the bug.

Comment 2 Oliver Scheck 2003-01-24 21:09:10 UTC
Comment on attachment 89590 [details]
Patch to correct the bug.

--- rc.sysinit.orig	2003-01-24 19:12:37.000000000 +0100
+++ rc.sysinit	2003-01-24 19:19:54.000000000 +0100
@@ -230,7 +230,7 @@


 _RUN_QUOTACHECK=0
-ROOTFSTYPE=`awk '/ \/ / { print $3 }' /proc/mounts`
+ROOTFSTYPE=`awk '/ \/ / && ($3 !~ /rootfs/) { print $3 }' /proc/mounts`
 if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" ]; then 

	 STRING=$"Checking root filesystem"
@@ -302,7 +302,7 @@
 fi

 # Remount the root filesystem read-write.
-state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
+state=`awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts`
 [ "$state" != "rw" ] && \
   action $"Remounting root filesystem in read-write mode: " mount -n -o
remount,rw /

Comment 3 Bill Nottingham 2003-01-24 22:32:36 UTC
Fixed, will be in next build (7.05-1)


Note You need to log in before you can comment on or make changes to this bug.