Description of problem: With devlabel, one could possibly create a symlink to the root fs partition and then reference this symlink in /etc/fstab. If this is done, however, mkinitrd craps out as it is not coded to handle symlinks which point to your root fs. This can easily be fixed with the attached patch: --- /sbin/mkinitrd.orig 2003-02-03 13:17:21.000000000 -0600 +++ /sbin/mkinitrd 2003-02-03 13:20:53.000000000 -0600 @@ -438,6 +438,11 @@ if echo $rootdev | cut -d/ -f3 | grep -q basicmodules="$basicmodules -${loopFs}" # check if the root fs is on a logical volume elif ! echo $rootdev | cut -c1-6 |grep -q "LABEL=" ; then + # check if a symlink is used to point to the root device + if [ `ls -l "$rootdev" | grep -c "^l"` -eq 1 ]; then + realrootdev=`ls -l "$rootdev" | sed -e "s/.*-> \+//"` + rootdev="$realrootdev" + fi major=`ls -l "$rootdev" | sed -e "s/.* \\([0-9]\+\\), *[0-9]\+.*/\\1/"` [ "$major" -ne 58 ] || root_lvm=1 fi Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a symlink to your root fs partition using devlabel 2. Edit /etc/fstab and replace LABEL=/ with the symlink name from step 1 3. Attempt to use mkinitrd Actual results: mkinitrd fails Expected results: mkinitrd success Additional info:
This is issue tracker 15136
Matt Domsch points out that + if [ `ls -l "$rootdev" | grep -c "^l"` -eq 1 ]; then looks prettier as such: + if [ -L "$rootdev" ]; then
Fixed in CVS, though by adding a readlink command to nash and using that
Red Hat Linux and Red Hat Powertools are currently no longer supported by Red Hat, Inc. In an effort to clean up bugzilla, we are closing all bugs in MODIFIED state for these products. However, we do want to make sure that nothing important slips through the cracks. If, in fact, these issues are not resolved in a current Fedora Core Release (such as Fedora Core 5), please open a new issues stating so. Thanks.