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

Re: "Waiting for root file system ..."



Robert P. J. Day 写道:
  ok, here's what i think i've discovered (given that, again, i'm a
relative newcomer to debian), so i'm going to ask some dumb questions
which might go a long way to clarifying some things.

  no matter what i tried, when i booted this (recently upgraded to)
etch system to the newly-installed 2.6 kernel (either 2.6.18 or
2.6.24, either original or rebuilt), i got:

  Waiting for root file system...

and it hung, with all evidence pointing to the fact that the booting
system simply couldn't see the hard drive, which it could see under
the earlier (devfs-enabled) 2.4.27 kernel given the right megaraid
drivers being loaded in that earlier kernel.

  so i ripped open the initrd file (something i have done
many, many times under other circumstances), and went looking for
the script that printed "Waiting for root file system...", which i
found at scripts/local, specifically this excerpt:

=====

	# If the root device hasn't shown up yet, give it a little while
	# to deal with removable devices
	if [ ! -e "${ROOT}" ]; then
		log_begin_msg "Waiting for root file system..."

		# Default delay is 180s
		if [ -z "${ROOTDELAY}" ]; then
			slumber=180
		else
			slumber=${ROOTDELAY}
		fi
		if [ -x /sbin/usplash_write ]; then
			/sbin/usplash_write "TIMEOUT ${slumber}" || true
		fi

		slumber=$(( ${slumber} * 10 ))
		while [ ${slumber} -gt 0 ] && [ ! -e "${ROOT}" ]; do
			/bin/sleep 0.1
			slumber=$(( ${slumber} - 1 ))
		done

		if [ ${slumber} -gt 0 ]; then
			log_end_msg 0
		else
			log_end_msg 1 || true
		fi
		if [ -x /sbin/usplash_write ]; then
			/sbin/usplash_write "TIMEOUT 15" || true
		fi
	fi

	# We've given up, but we'll let the user fix matters if they can
	while [ ! -e "${ROOT}" ]; do
		echo "	Check root= bootarg cat /proc/cmdline"
		echo "	or missing modules, devices: cat /proc/modules ls /dev"
		panic "ALERT!  ${ROOT} does not exist.  Dropping to a shell!"
	done

=====

  that's when i noticed the 180 second delay, and since i'd never
actually waited that long previously, this time i was patient and,
sure enough, after 3 minutes, i got those diagnostics shown at the
end and dumped into busybox.

  and once i was in busybox, i verified that:

* there were no /dev/sda* entries
* /proc/cmdline did indeed contain "root=/dev/sda1", which is
  correct
* the modules megaraid_mm and megaraid_mbox were loaded
* there are no megaraid rules in /etc/udev

  this seems to be a pretty clear indication that i just need to add
a udev rule file for the megaraid modules to create the /dev/sda*
entries, yes?  because without *something* creating those /dev/sda*
entries, i'm pretty well doomed to failure, yes?

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================


So here, your best choice seems to try.
here's my z60_hdparm.rules file:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/etc/init.d/hdparm hotplug"
Hope this helps.

At least it's been working with me for at least one year without any problem.
I'm using debian testing branch.
But etch's udev seems to be 0.105.
Mine is 0.125.
Don't know if the rule is the same.


Reply to: