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

Re: util-linux seems to have /sbin/fsck

In article <[🔎] 20040112200552.GA19521@thunk.org>,
Theodore Ts'o  <tytso@mit.edu> wrote:
>This is why I haven't bothered.  /sbin/e2fsck is all of 120k, and
>/sbin/mke2fs is 21k.  If we separated out fsck, it would save a few
>hundred kilobytes, but that's about it.  Still, it might be worth
>doing just for aesthetic reasons; I just haven't bothered because it
>has never seemed to be very high priority to me.
>Something that probabably *is* worth doing is to move
>/etc/init.d/checkfs.sh and /etc/init.d/checkroot.sh from util-linux


>into whatever package contains fsck.  One of the things that I've been
>wanting to do is use the logsave program (also part of e2fsprogs) to
>capture the output of the fsck, and put it into a separate log file.
>This makes it easier for it to be kept and archived separately from
>the boot log, and it's also superior because it filters out the
>progress bar from being logged, which can waste quite a bit of disk
>space, and makes the log file less useful.

The current (not released) bootlogd does the same, it handles
TAB / LF / BS. But bootlogd still has some issues (doesn't always
detect the correct physical console, also logs output from the
single user shell which it probably shouldn't) which is why
it is turned off by default for the time being.

>Miquel, would you have any objections to moving checkfs.sh and
>checkroot.sh into either the e2fsprogs package or into a separable
>fsck package?

Well, it would be painful, I know that much. At least checkroot.sh
does much more more than what the name suggests:

- run sulogin if required
- run /sbin/update if required
- active swap
- check rootfilesystem
- mount rootfilesystem rw
- initialize mtab
- cleanup /etc/nologin

Splitting out the checking of the rootfilesystem from that would
add quite a few scripts instead of just the one we have now.

The reason I haven't integrated logsave into the current scripts
is that bootlogd does basically the same. But bootlogd isn't
perfect - it should be replaced with something better. Perhaps
the logsave approach, using pty's, in a client/server setup
over a named pipe ? /dev/bootlogd| ? A few simple hooks in
/etc/init.d/rcS and /etc/init.d/rc and this would work. Those
hooks could also trivially be used for dummy-mode redhat-style
"Starting apache .. [OK]" output.


Reply to: