|
|
Package: sysvinit
Version: 2.86-1
Severity: normal
I have been using 2.4.2x happily for some time.
Recently I installed Linux kernel 2.6.9-rc2 by downloading
kernel source from www.kernel.org.
This was motivated to test the new version of tmscsim scsi card driver
under that kernel.
(I upgraded various packages so that kernel module loading is handled
under 2.6.x, etc. by rading /usr/src/linux/Documentation/Changes.)
uname -a output:
Linux duron 2.6.9-rc2-test-tmscsim #8 Thu Sep 23 04:43:04 JST 2004 i686
GNU/Linux
This is what I observed under 2.6.9-rc2.
fsck message not shown at all during (re)boot:
I noticed that during a reboot after a reset button is hit
due to hard hung of the said kernel or my hardware,
fsck is obviously invoked after swap was added.
(I could hear the excessive hard disk access when
fsck would have been invoked under 2.4.2x and
when progress bar would have been shown on the console.)
However, NO output from the fsck program was shown.
No progressive bar and spinning characters at all.
This made me very uncomfortable.
After swithcing back and forth between 2.4.2x and 2.6.9-rc2
after such hard reset a few times made me realize
fsck output is not generated at all under 2.6.9-rc2.
Fsck is definitely run, though.
fsck output messges have been shown under 2.4.2x
without any problems in the last several months.
I tried to check if I could figure out what is going on.
I looked at /etc/init.d/checkroot.sh. (Maybe I should check
/etc/init.d/checkfs.sh as well, but it can wait.)
There are two things I noticed.
[1] Is the redirection using "exec" in the correct direction?
One thing I noticed is this.
In the file, /etc/init.d/checkroot.sh, there is a "shell magic" to
handle redirection of stdin (I think, but not sure. See my comment
below.)
Namely, the construct below to handle the "read" built-in
and shell variable setting inside loop construct
under many different shell implementations.
(The idea is to handle a shell implementation which may calls
shell sub-process for handling loops and still get the variable
setting correct.)
I consulted "man bash" and a FAQ page
http://www.faqs.org/faqs/unix-faq/faq/part3/section-8.html
or (the same contents with less fancy markup)
www.cit.gu.edu.au/~anthony/info/shell/shell.file.desc">http://www.cit.gu.edu.au/~anthony/info/shell/shell.file.desc
to try to understand, however, there seems to be a typo or two.
--- begin excerpt from /etc/init.d/checkroot.sh
exec 9>&0 </etc/fstab
... omission ...
while read dev mnt type opts dump pass junk
do
... omission ...
done
exec 0>&9 9>&-
--- end excerpt.
From what I understand by reading "man bash" and the FAQ pages
shown in the above URLs, it seems to me that the "9>&0" should
read "9<&0" on the first exec line. And "0>&9" should read "0<&9"
on the second exec line.
Aren't these typos?
(I am not sure what "9>&-" should read yet. But maybe
"9<&-".)
[2] TERM variable setting.
Setting aside the possible problem from a potential typos
mentioned above (I am not sure if they are or not),
I looked further on why no progressive bar was shown.
Now I notice when the fsck is invoked in the startup script,
/etc/init.d/checkroot.sh or /etc/init.d/checkfs.sh,
and $TERM is
set to "dumb" or "network" or "unknown" or not set at all, this
progress bar display (-C option to fsck)
is not done by the Debian start up script.
Maybe between 2.4.2x and 2.6.9-rc2,
the boot console $TERM setting changed? I am not sure.
A
"find /usr/src/linux -type f -name "*.c" -print | xargs egrep TERM
showed that TERM=linux settings in the code, but
it could be that TERM is changed somewhere else.
--- begin Excerpt from /etc/init.d/checkroot.sh
if [ "$doswap" = yes ]
then
[ "$VERBOSE" != no ] && echo "Activating swap."
swapon -a 2> /dev/null
fi
... omission...
#
# The actual checking is done here.
#
if [ "$rootcheck" = yes ]
then
if [ -f /forcefsck ]
then
force="-f"
else
force=""
fi
if [ "$FSCKFIX" = yes ]
then
fix="-y"
else
fix="-a"
fi
spinner="-C"
case "$TERM" in
dumb|network|unknown|"")
spinner="" ;;
esac
# This Linux/s390 special case should go away.
if [ "${KERNEL}:${MACHINE}" = Linux:s390 ]
then
spinner=""
fi
echo "Checking root file system..."
fsck $spinner $force $fix -t $roottype $rootdev
FSCKCODE=$?
--- end Excerpt
I think I definitely saw Activating Swap message when
fsck was run without any output.
I was staring the temporarily halted screen output during the
silent fsck program execution and near the bottom of
the screen was this adding /dev/hxx to swap or some such
message.
That is just before the fsck was obviously invoked (without any
output but I could still hear the disk head movement and
so figured out that fsck was running.).
Now I am not sure if I saw "Checking root file system..." message
during a reboot after the RESET button was hit due to a hung. I
was not paying enough attention. Sorry about this.
But definitely, I didn't see at all the
growing ASCII character-base horizontal bar with a spinning char on
the right (/ - \ |). This is a way to show progress bar. This is
shown with the -C option to fsck.
I am not using s390. So obviously
- either "-C" is reset to "" because of TERM value, OR
- the output from this shell is eaten by some other mechanism.
That led to my observation point [1] above.
I need to understand the stdio/stdout setting of the shell
invoking this script. Possibly the shell is screwing up stdout?
(But then swapon command seemed to be successful in
writing out output message to the console. This makes my
doubt in [1] as less suspicious. Hmm... )
Anyway, if you can figure out what is going on,
I would appreciate it very much.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-rc2-test-tmscsim
Locale: LANG=ja_JP.ujis, LC_CTYPE=ja_JP.ujis (ignored: LC_ALL set to ja_JP.ujis)
Versions of packages sysvinit depends on:
ii coreutils 5.2.1-2 The GNU core utilities
ii initscripts 2.86-1 Standard scripts needed for bootin
ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an
ii sysv-rc 2.86-1 Standard boot mechanism using syml
-- no debconf information
/sbin/fsck -v
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
bash --version
ishikawa@duron$ GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
LC_ALL=C /sbin/tune2fs --version
tune2fs 1.35 (28-Feb-2004)
/sbin/tune2fs: invalid option -- -
--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
|
|