[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: HELP (patch to fix)



Euan Maxwell declared on Wednesday 24 March 2004 11:30 am:
> > If it got to "init 3", then it mounted to root filesystem. Why is
> > it going to stage 3 though? Normal boot is stage 2.
>
> It seems to have mounted the filesystem ok, just not read-write.

I just ran into this problem tonight after upgrading the kernel to
2.4.24-sparc64 on an Ultra 5 running testing, so I looked at what
was happening.  Aparently, a couple of mount calls in
/etc/init.d/checkroot.sh weren't suceeding, with the error "mount:
you must specify the filesystem type".  It appears that because the
script is supplying both the root device and mountpoint but not the
filesystem type, mount now give an error.  Attached below is a patch
which fixes this (between the '---' lines).

I'm not completely certain why $rootdev and "/" were both being
included on the command line, it seems a bit redundant at the least;
when you're remounting a filesystem, you shouldn't have to respecify
what device was mounted...

This probably is something that affects other people, and probably
should be submitted appropriately, but I'm both sick and tired at the
moment, so that'll have to wait for morning or someone else to do. :)

----------------------------------------------------------------------
--- /etc/init.d/checkroot.sh.old        2004-03-26 00:32:41.000000000 -0500
+++ /etc/init.d/checkroot.sh    2004-03-26 00:48:02.000000000 -0500
@@ -179,7 +179,7 @@
        #
        # Ensure that root is quiescent and read-only before fsck'ing.
        #
-       if ! mount -n -o remount,ro $rootdev /
+       if ! mount -n -o remount,ro /
        then
                echo -n "*** ERROR!  Cannot fsck root fs because it is "
                echo    "not mounted read-only!"
@@ -260,7 +260,7 @@
 #
 if [ "$rootdev" != none ] && [ "$roottype" != none ]
 then
-       mount -n -o remount,$rootopts $rootdev /
+       mount -n -o remount,$rootopts /
 fi

 #
-------------------------------------------------------------------------


Pat
-- 
Purdue University ITAP/RCS        --- http://www.itap.purdue.edu/rcs/
The Computer Refuge               --- http://computer-refuge.org



Reply to: