DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well I will go with the option of giving kernel parameter. Based on your above reply, I am curious to know that if udev is not compiled into my kernel and then how come I am able to run udev in my current installation.
I never said the kernel on your machine has no udev support, I just said compile your kernel with support for udev BUT NOT FOR DEVFS. I think your kernel is compiled with support for both devfs and udev and that is why you have udev working and mostly that is why you are getting that harmless error message about devfs.
Another reason for getting that error message could be a startup script which is trying to mount devfs. Run grep like this under /etc directory.
grep -Ri devfs *
This would list any file that is referring devfs and you can go about fixing that later.
I'd suggest that you try the latter first and then for the former.
I never said the kernel on your machine has no udev support, I just said compile your kernel with support for udev BUT NOT FOR DEVFS. I think your kernel is compiled with support for both devfs and udev and that is why you have udev working and mostly that is why you are getting that harmless error message about devfs.
Another reason for getting that error message could be a startup script which is trying to mount devfs. Run grep like this under /etc directory.
grep -Ri devfs *
Awesome kevkim55, you are the man. I gave the above command and it retured two files related with devfs:
console-screen.sh
checkroot.sh
Here the contents of two files:
Code:
#
# checkroot.sh Check to root file system.
#
# Version: @(#)checkroot.sh 2.85-23 29-Jul-2004 miquels@cistron.nl
#
SULOGIN=no
VERBOSE=yes
[ -f /etc/default/rcS ] && . /etc/default/rcS
PATH=/lib/init:/bin:/sbin
#
# Helper: is a directory writable ?
#
dir_writable () {
if [ -d "$1/" ] && [ -w "$1/" ] && touch -a "$1/" 2>/dev/null
then
return 0
fi
return 1
}
#
# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to
# be spawned from this script *before anything else* with a timeout,
# like sysv does.
#
[ "$SULOGIN" = yes ] && sulogin -t 30 $CONSOLE
KERNEL=`uname -s`
RELEASE=`uname -r`
MACHINE=`uname -m`
#
# Ensure that bdflush (update) is running before any major I/O is
# performed (the following fsck is a good example of such activity :).
# Only needed for kernels < 2.4.
#
if [ -x /sbin/update ] && [ "$KERNEL" = Linux ]
then
case "$RELEASE" in
0.*|1.*|2.[0123].*)
update
;;
esac
fi
#
# Read /etc/fstab.
#
exec 9>&0 </etc/fstab
fstabroot=/dev/root
rootdev=none
roottype=none
rootopts=defaults
rootmode=rw
rootcheck=no
swap_on_md=no
devfs=
while read dev mnt type opts dump pass junk
do
case "$dev" in
""|\#*)
continue;
;;
/dev/md*)
# Swap on md device.
[ "$type" = swap ] && swap_on_md=yes
;;
/dev/*)
;;
LABEL=*|UUID=*)
[ -x /sbin/findfs ] && dev="`/sbin/findfs \"$dev\"`"
;;
*)
# Devfs definition ?
if [ "$type" = "devfs" ] && [ "$mnt" = /dev ] &&
mountpoint -q /dev
then
devfs="-t $type $dev $mnt"
fi
# Might be a swapfile.
[ "$type" = swap ] && swap_on_md=yes
;;
esac
[ "$mnt" != / ] && continue
rootdev="$dev"
fstabroot="$dev"
rootopts="$opts"
roottype="$type"
( [ "$pass" != 0 ] && [ "$pass" != "" ] ) && rootcheck=yes
( [ "$type" = nfs ] || [ "$type" = nfs4 ] ) && rootcheck=no
case "$opts" in
ro|ro,*|*,ro|*,ro,*)
rootmode=ro
;;
esac
done
exec 0>&9 9>&-
#
# Activate the swap device(s) in /etc/fstab. This needs to be done
# before fsck, since fsck can be quite memory-hungry.
#
doswap=no
case "${KERNEL}:${RELEASE}" in
Linux:2.[0123].*)
if [ $swap_on_md = yes ] && grep -qs resync /proc/mdstat
then
[ "$VERBOSE" != no ] &&
echo "Not activating swap - RAID array resyncing"
else
doswap=yes
fi
;;
*)
doswap=yes
;;
esac
if [ "$doswap" = yes ]
then
[ "$VERBOSE" != no ] && echo "Activating swap."
swapon -a 2> /dev/null
fi
#
# Does the root device in /etc/fstab match with the actual device ?
# If not we try to use the /dev/root alias device, and if that
# fails we create a temporary node in /dev/shm.
#
if [ "$rootcheck" = yes ]
then
ddev=`mountpoint -qx $rootdev`
rdev=`mountpoint -d /`
if [ "$ddev" != "$rdev" ] && [ "$ddev" != "4:0" ]
then
if [ "`mountpoint -qx /dev/root`" = "4:0" ]
then
rootdev=/dev/root
elif dir_writable /dev/shm
then
rm -f /dev/shm/root
mknod -m 600 /dev/shm/root b ${rdev%:*} ${rdev#*:}
rootdev=/dev/shm/root
else
rootfatal=yes
fi
fi
fi
#
# Bother, said Pooh.
#
if [ "$rootfatal" = yes ]
then
echo
echo "The device node $rootdev for the root filesystem is missing,"
echo "incorrect, or there is no entry for the root filesystem"
echo "listed in /etc/fstab."
echo
echo "The system is also unable to create a temporary node in"
echo "/dev/shm to use as a work-around."
echo
echo "This means you have to fix this manually."
echo
echo "CONTROL-D will exit from this shell and REBOOT the system."
echo
# Start a single user shell on the console
/sbin/sulogin $CONSOLE
reboot -f
fi
#
# See if we want to check the root file system.
#
FSCKCODE=0
if [ -f /fastboot ] || [ $rootcheck = no ]
then
[ $rootcheck = yes ] && echo "Fast boot, no file system check"
rootcheck=no
fi
if [ "$rootcheck" = yes ]
then
#
# Ensure that root is quiescent and read-only before fsck'ing.
#
# mount -n -o remount,ro / would be the correct syntax but
# mount can get confused when there is a "bind" mount defined
# in fstab that bind-mounts "/" somewhere else.
#
# So we use mount -n -o remount,ro $rootdev / but that can
# fail on older kernels on sparc64/alpha architectures due
# to a bug in sys_mount().
#
# As a compromise we try both.
#
if ! mount -n -o remount,ro $rootdev / 2>/dev/null &&
! mount -n -o remount,ro /
then
echo -n "*** ERROR! Cannot fsck root fs because it is "
echo "not mounted read-only!"
echo
rootcheck=no
fi
fi
#
# 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=$?
fi
#
# If there was a failure, drop into single-user mode.
#
# NOTE: "failure" is defined as exiting with a return code of
# 4 or larger. A return code of 1 indicates that file system
# errors were corrected but that the boot may proceed. A return
# code of 2 or 3 indicates that the system should immediately reboot.
#
if [ $FSCKCODE -gt 3 ]
then
# Surprise! Re-directing from a HERE document (as in
# "cat << EOF") won't work, because the root is read-only.
echo
echo "fsck failed. Please repair manually and reboot. Please note"
echo "that the root file system is currently mounted read-only. To"
echo "remount it read-write:"
echo
echo " # mount -n -o remount,rw /"
echo
echo "CONTROL-D will exit from this shell and REBOOT the system."
echo
# Start a single user shell on the console
/sbin/sulogin $CONSOLE
reboot -f
elif [ $FSCKCODE -gt 1 ]
then
echo
echo "fsck corrected errors on the root partition, but requested that"
echo "the system be rebooted (exit code $FSCKCODE)."
echo
echo "Automatic reboot in 5 seconds."
echo
sleep 5
reboot -f
fi
#
# Remount root to final mode (rw or ro).
#
# See the comments above at the previous "mount -o remount"
# for an explanation why we try this twice.
#
if ! mount -n -o remount,$rootopts,$rootmode $fstabroot / 2>/dev/null
then
mount -n -o remount,$rootopts,$rootmode /
fi
#
# We only create/modify /etc/mtab if the location where it is
# stored is writable. If /etc/mtab is a symlink into /proc/
# then it is not writable.
#
init_mtab=no
MTAB_PATH="`readlink -f /etc/mtab || :`"
case "$MTAB_PATH" in
/proc/*)
;;
/*)
if dir_writable ${MTAB_PATH%/*}
then
:> $MTAB_PATH
rm -f ${MTAB_PATH}~
init_mtab=yes
fi
;;
"")
[ -L /etc/mtab ] && MTAB_PATH="`readlink /etc/mtab`"
if [ "$MTAB_PATH" ] ; then
echo "checkroot.sh: cannot initialize $MTAB_PATH" >&2
else
echo "checkroot.sh: cannot initialize the mtab file" >&2
fi
;;
esac
if [ "$init_mtab" = yes ]
then
[ "$roottype" != none ] &&
mount -f -o $rootopts -t $roottype $fstabroot /
[ -n "$devfs" ] && mount -f $devfs
. /etc/init.d/mountvirtfs
fi
#
# Remove /etc/nologin, and /dev/shm/root if we created it.
#
NOLOGIN="`readlink -f /etc/nologin || :`"
rm -f "$NOLOGIN"
rm -f /dev/shm/root
: exit 0
Code:
#!/bin/sh
#
# This is the boot script for the `console-tools' package.
#
# It loads parameters from /etc/console-tools/config, maybe loads
# default screen-font, screen font-map, and application charset-map,
# and maybe start "vcstime"
#
# (c) 1997 Yann Dirson
if [ -r /etc/console-tools/config ] ; then
. /etc/console-tools/config
fi
if [ -d /etc/console-tools/config.d ]; then
for i in /etc/console-tools/config.d/*; do
. $i
done
fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SETFONT="/usr/bin/consolechars"
SETFONT_OPT=""
CHARSET="/usr/bin/charset"
VCSTIME="/usr/sbin/vcstime"
# Different device name for 2.6 kernels and devfs
if [ `uname -r | cut -f 2 -d .` = 6 ] && [ -e /dev/.devfsd ]; then
VCSTIME_OPT="-2 /dev/vcsa0"
else
VCSTIME_OPT=""
fi
# be sure the main program is installed
[ -x "${SETFONT}" ] || exit 0
# set DEVICE_PREFIX depending on devfs/udev
if [ -d /dev/vc ]; then
DEVICE_PREFIX="/dev/vc/"
else
DEVICE_PREFIX="/dev/tty"
fi
reset_vga_palette ()
{
if [ -f /proc/fb ]; then
# They have a framebuffer device.
# That means we have work to do...
echo -n "]R"
fi
}
setup ()
{
VT="no"
# If we can't access the console, quit
CONSOLE_TYPE=`fgconsole 2>/dev/null` || exit 0
if [ ! $CONSOLE_TYPE = "serial" ] ; then
readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e /dev/console
if [ $? -eq 0 ] ; then
VT="yes"
reset_vga_palette
fi
fi
[ $VT = "no" ] && exit 0
# start vcstime
if [ "${DO_VCSTIME}" = "yes" -a -x ${VCSTIME} ] ; then
echo -n Starting clock on text console: `basename ${VCSTIME}`
${VCSTIME} ${VCSTIME_OPT} &
echo .
fi
# Global default font+sfm
if [ "${SCREEN_FONT}" ]
then
echo -n "Setting up general console font... "
SCREEN_FONT="-f ${SCREEN_FONT}"
# maybe use an external SFM
[ "${SCREEN_FONT_MAP}" ] && SCREEN_FONT_MAP="-u ${SCREEN_FONT_MAP}"
# Set for the first 6 VCs (as they are allocated in /etc/inittab)
NUM_CONSOLES=`fgconsole --next-available`
NUM_CONSOLES=`expr ${NUM_CONSOLES} - 1`
for vc in `seq 0 ${NUM_CONSOLES}`
do
${SETFONT} --tty=${DEVICE_PREFIX}$vc ${SETFONT_OPT} ${SCREEN_FONT} ${SCREEN_FONT_MAP} || { echo " failed."; break; }
if [ "$vc" -eq 6 ]; then echo " done."; fi
done
fi
# Per-VC font+sfm
PERVC_FONTS="`set | grep "^SCREEN_FONT_vc[0-9]*=" | tr -d \' `"
if [ "${PERVC_FONTS}" ]
then
echo -n "Setting up per-VC fonts: "
for font in ${PERVC_FONTS}
do
# extract VC and FONTNAME info from variable setting
vc=`echo $font | cut -b15- | cut -d= -f1`
eval font=\$SCREEN_FONT_vc$vc
if [ X"$QUIET_PERVC" != X1 ] ; then
echo -n "${DEVICE_PREFIX}${vc}, "
fi
# eventually find an associated SFM
eval sfm=\${SCREEN_FONT_MAP_vc${vc}}
[ "$sfm" ] && sfm="-u $sfm"
${SETFONT} --tty=${DEVICE_PREFIX}$vc ${SETFONT_OPT} -f $font $sfm
done
echo "done."
fi
# Global ACM
[ "${APP_CHARSET_MAP}" ] && ${CHARSET} G0 ${APP_CHARSET_MAP}
# Per-VC ACMs
PERVC_ACMS="`set | grep "^APP_CHARSET_MAP_vc[0-9]*=" | tr -d \' `"
if [ "${PERVC_ACMS}" ]
then
echo -n "Setting up per-VC ACM's: "
for acm in ${PERVC_ACMS}
do
# extract VC and FONTNAME info from variable setting
vc=`echo $acm | cut -b19- | cut -d= -f1`
eval acm=\$APP_CHARSET_MAP_vc$vc
if [ X"$QUIET_PERVC" != X1 ] ; then
echo -n "${DEVICE_PREFIX}${vc} ($acm), "
fi
eval "${CHARSET} --tty='${DEVICE_PREFIX}$vc' G0 '$acm'"
done
echo "done."
fi
# Go to UTF-8 mode as necessary
#
if [ -f /etc/environment ]
then
for var in LANG LC_ALL LC_CTYPE ; do
value=$(egrep "^[^#]*${var}=" /etc/environment | tail -n1 | cut -d= -f2)
eval $var=$value
done
fi
CHARMAP=`LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap`
if test "$CHARMAP" = "UTF-8"
then
/usr/bin/unicode_start 2> /dev/null || true
else
/usr/bin/unicode_stop 2> /dev/null|| true
fi
# screensaver stuff
setterm_args=""
if [ "$BLANK_TIME" ]; then
setterm_args="$setterm_args -blank $BLANK_TIME"
fi
if [ "$BLANK_DPMS" ]; then
setterm_args="$setterm_args -powersave $BLANK_DPMS"
fi
if [ "$POWERDOWN_TIME" ]; then
setterm_args="$setterm_args -powerdown $POWERDOWN_TIME"
fi
if [ "$setterm_args" ]; then
setterm $setterm_args
fi
# Keyboard rate and delay
KBDRATE_ARGS=""
if [ -n "$KEYBOARD_RATE" ]; then
KBDRATE_ARGS="-r $KEYBOARD_RATE"
fi
if [ -n "$KEYBOARD_DELAY" ]; then
KBDRATE_ARGS="$KBDRATE_ARGS -d $KEYBOARD_DELAY"
fi
if [ -n "$KBDRATE_ARGS" ]; then
echo -n "Setting keyboard rate and delay: "
kbdrate -s $KBDRATE_ARGS
echo "done."
fi
# Inform gpm if present, of potential changes.
if [ -f /var/run/gpm.pid ]; then
kill -WINCH `cat /var/run/gpm.pid` 2> /dev/null
fi
# Allow user to remap keys on the console
if [ -r /etc/console-tools/remap ]
then
dumpkeys < ${DEVICE_PREFIX}1 |sed -f /etc/console-tools/remap |loadkeys --quiet
fi
# Set LEDS here
if [ "$LEDS" != "" ]
then
for i in `seq 1 12`
do
setleds -D $LEDS < $DEVICE_PREFIX$i
done
fi
}
case "$1" in
start|reload|restart|force-reload)
setup
;;
stop)
;;
*)
setup
;;
esac
I am really not familar with these kind of start up scripts. If possible can anyone suggest which lines related to devfs should I remove with out wrecking the system. Any ideas/suggestions will be greatly appreciated.....
Recently I noticed the following messages during the bootup on my Debian etch(2.6.13) installation
mount: unknown filesystem type 'devfs'
umount: devfs: not mounted
Partly relevant lines from checkroot.sh
Quote:
if [ "$init_mtab" = yes ]
then
[ "$roottype" != none ] &&
mount -f -o $rootopts -t $roottype $fstabroot /
[ -n "$devfs" ] && mount -f $devfs
. /etc/init.d/mountvirtfs
fi
Notice the line "[ -n $devfs" ] && mount -f $devfs" which tries to mount devfs. I couldn't see a line that tries to unmonut devfs as the error you receive during boot is from both mount and umount.
If you could tell me about when you see these error messages, things could become clearer. It is necessary to observe at what stage these error messages are output. During the initial kernel boot up phase ? During initrd stage ? During runlevel 3 (or 5) ?
Btw, do you use an initrd image to boot into your system. If yes, it could be possible that linuxrc (or init) script contained in the initrd image is causing these messages to be output.
As you're able to boot successfully and have no problems whatsoever, I think these error messages can safely be ignored. Take my personal experience, during booting off SuSE 10.0 I get 2-3 screenfuls of error messages on ibtables as I ain't got iptables confgiured. These messages are output by SuSEFirewall which I need but without the iptables. I don't bother with these messages although, I could rid of these messages by commenting out the relevant lines in SuSEFirewall init script.
You want to dig deeper, come back and tell me if you've got an initrd image. I could hint you as to how to check the contents of initrd if you've never dealt with initrds before.
Notice the line "[ -n $devfs" ] && mount -f $devfs" which tries to mount devfs. I couldn't see a line that tries to unmonut devfs as the error you receive during boot is from both mount and umount.
If you could tell me about when you see these error messages, things could become clearer. It is necessary to observe at what stage these error messages are output. During the initial kernel boot up phase ? During initrd stage ? During runlevel 3 (or 5) ?
Btw, do you use an initrd image to boot into your system. If yes, it could be possible that linuxrc (or init) script contained in the initrd image is causing these messages to be output.
As you're able to boot successfully and have no problems whatsoever, I think these error messages can safely be ignored. Take my personal experience, during booting off SuSE 10.0 I get 2-3 screenfuls of error messages on ibtables as I ain't got iptables confgiured. These messages are output by SuSEFirewall which I need but without the iptables. I don't bother with these messages although, I could rid of these messages by commenting out the relevant lines in SuSEFirewall init script.
You want to dig deeper, come back and tell me if you've got an initrd image. I could hint you as to how to check the contents of initrd if you've never dealt with initrds before.
Thanks for the detailed explanation. That was quite insightful.
yes, I am using initrd to boot into my system. What is the other method to boot without initrd called?
Also I get the error messages as soon as the linux starts booting. Infact these are 3rd messages from the beginning when my system boots.
Technically if the kernel has all the support for your hardware built, should successfully initialize and configure your system and mount the root filesystem. There's no need for an initrd if kernel manages to do the above. Try passing noinitrd as the kernel parameter while booting. This should skip initrd stage. If this doesn't help you i.e. if you get "kernel panic" message then you'll require initrd image.
Now, copy /boot/<initrd-image-file> to another directory and run gunzip on it. This should decompress the initrd. Then run the following:
grep -i devfs </path/to/decompressed-initrd-image>
If the output shows references to devfs post them here and I'd probably direct you to a link or suggest something myself.
Technically if the kernel has all the support for your hardware built, should successfully initialize and configure your system and mount the root filesystem. There's no need for an initrd if kernel manages to do the above. Try passing noinitrd as the kernel parameter while booting. This should skip initrd stage. If this doesn't help you i.e. if you get "kernel panic" message then you'll require initrd image.
Now, copy /boot/<initrd-image-file> to another directory and run gunzip on it. This should decompress the initrd. Then run the following:
grep -i devfs </path/to/decompressed-initrd-image>
If the output shows references to devfs post them here and I'd probably direct you to a link or suggest something myself.
Thanks for keeping the track of my question.
Ok, you said to decompress my initrd, but the things is my initrd is at location /boot/initrd.img-2.6.13. Is it in compress stage? I thought to decompress anything, it should end in either .bz2 or .gz, but my initrd.img-2.6.13 file which is the initrd does not have any of those extensions.
To be certain you'll have to find out what the decompressed initrd image is - an ext2/3 image or a cpio archive. Run:
file /some/directory/initrd.img-2.6.13
This shall tell ya what type of file initrd image is. Based on that you can wither mount it as a loopback device or extract it to some directory using cpio.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.