diff --git a/ChangeLog b/ChangeLog index d44922a..6179b1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 13 Mar 2008; Andrew Gaffney generic/linuxrc: + Add a check after mounting NEW_ROOT to see if /dev exists and /sbin/init is + executable before moving on + 13 Mar 2008; Andrew Gaffney gen_initramfs.sh: Change the location we copy the intiramfs to for integrated initramfs diff --git a/generic/linuxrc b/generic/linuxrc index 768e2ce..2af1d75 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -403,7 +403,14 @@ do # else not a good root and start over. if [ "$?" = '0' ] then - break + if [ -d ${NEW_ROOT}/dev -a -x ${NEW_ROOT}/sbin/init ] + then + break + else + bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again" + got_good_root=0 + REAL_ROOT='' + fi else bad_msg "Could not mount specified ROOT, try again" got_good_root=0