Safe runlevel 1

Nathan Coulson conathan at gmail.com
Thu Sep 16 11:09:28 PDT 2004


On Thu, 16 Sep 2004 10:31:04 -0500, James Robertson
<jwrober at linuxfromscratch.org> wrote:
> 
> 
> Nathan Coulson wrote:
> 
> > On Thu, 16 Sep 2004 00:26:28 -0700, Jeremy Utley <jeremy at jutley.org> wrote:
> >
> >>On Wed, 15 Sep 2004 23:53:46 -0700
> >>Doug Reich <dreich at hmc.edu> wrote:
> >>
> >>
> >>>I sent an email out last week detailing trouble I had with my hard
> >>>drive
> >>>and the inadequacy of the LFS bootscripts to allow me to boot into
> >>>runlevel 1, and nobody took any issue with it. I think it's very
> >>>important the LFS ensure that runlevel 1 be as safe as possible, and,
> >>>as
> >>>long as the root partition can be read, it should be able to be booted
> >>>
> >>>into. However, the current mountfs script performs error checking on
> >>>all
> >>>partitions for which it is enabled in fstab and tries to mount them,
> >>>which is going to prevent you from fixing any problems on these
> >>>drives.
> >>>This script should be split so that only the root partition is
> >>>mounted,
> >>>unchecked in runlevel 1, and all mounting and checking can be
> >>>performed
> >>>in higher runlevels (the previous runlevel variable can be checked to
> >>>make sure this isn't done when changing from, say, 3 to 5). Other
> >>>bootscripts should be checked to make sure they aren't doing
> >>>unnecessary
> >>>that would keep the system from booting into a diagnostic mode.
> >>>
> >>>Does anyone have an opinion on this?
> >>>
> >>>-Doug Reich
> >>
> >>I agree that we should perhaps move the mounting of the rest of the
> >>filesystems should be moved to become first in rc3.d.  But....
> >>
> >>We should be checking the root filesystem in rcS.d still - you should
> >>NOT be making any modifications on on unchecked filesystem, and a number
> >>of the things we do will require this.  In a case where root cannot be
> >>mounted read-write, the user will have to use some form of a rescue disk
> >>to fsck the root filesystem.
> >>
> >>-J-
> >
> >
> > Sorry I took a while to reply to this email, I was just getting my
> > computer system setup for college.
> >
> > I do believe this is a great idea, [although I'd have to see what
> > needs a readwrite filesystem later on in rcsysinit.d].  (Looks farely
> > safe, but I am not entirely sure about setclock.  I know cleanfs will
> > be a bit of trouble, and I dont want to run that script everytime you
> > change a runlevel).
> >
> > probably a 2nd mountfs script for the purpose of mounting it for
> > singleuser mode would be a good idea for rc1, or splitting root
> > mount/check from mounting additional filesystems.
> >
> 
> Is there a way in the mountfs script to check the runlevel and only do
> certain stuff based on that value?  I think this would be the best
> solution overall.
> 
> James
> 
> --

I think there is a variable I can check, but I dont like handling
special cases in the scripts [of course if it is the only
solution...].

I'll need to do some research to see what others do anyway.  [I was
talking to jim yesterday and he had some concerns about moving mountfs
to rc#.d.  I didn't understand what they were at the time]


-- 
Nathan Coulson (conathan)
------
nathan at linuxfromscratch org
conathan at gmail com



More information about the lfs-dev mailing list