/dev/root on /, full hd install

I recently posted about this problem (http://puppylinux.com/blog/?viewDetailed=00880): full hd install, Puppy thinks that the root partition is unmounted. Running 'mount' shows something like:

/dev/root on / type ext3 (rw)

I googled and found I'm not the only one with this problem. In a Debian bugzilla they recommend making /dev/root into a symlink to the actual partition:

This poor guy asked the same question on a Gentoo forum, never got an answer:

Here is some further discussion on the problem in the Arch bugzilla, with suggested solutions:

I tried the symlink idea, but it doesn't fix what 'mount' and 'df' return. However, I can implement my own special fix -- I already have 'df' as a wrapper script that calls either the busybox applet or the full 'df', and I can modify so that the "correct" partition is returned. I'll probably fix it tonight.

Note1: Perhaps the core of the problem is that /etc/mtab is no longer a separate file. The major distros, Puppy included, have /etc/mtab as a symlink to /proc/mounts.

Note2: I have just discovered that 'rdev' returns the correct root partition.

Posted on 14 Jul 2009, 9:26


Posted on 13 Jul 2009, 22:35 by BarryK
Yay, I fixed it! I modified my 'df' script.

Posted on 14 Jul 2009, 2:26 by ttuuxxx
Hi Barry

Since you fixed it, maybe inform the poor guy on the forum how you did it, you just migh make his year, lol

Posted on 14 Jul 2009, 9:48 by BarryK
A solution
'rdev' is an applet in the latest Busybox in 416. It only returns a valid partition when there is a full hd installation, otherwise nothing. That's fine.

416 has 'df' as a Busybox applet, also 'df-FULL' which is the full version. However, the executable 'df' is a script that calls either of the above.
In 416 and earlier, I needed the script as those two df's produce different output, and some of my scripts rely on the format of the output from the busybox applet, some packages need the full df for installation. My 'df' script solved that problem. Anyway, that is a different issue.

What I have now done is eliminate the need for the busybox applet, by ensuring that the full df returns sensible information that does not break my scripts. Most important, it returns the proper root partition. Here is the latest df script:


#(c) Barry Kauler 2009, licence GPL2
#w482 fix for /dev/root.

DF="busybox df"
[ "`which df-FULL`" != "" ] && DF="df-FULL"


RETSTUFF="`echo "$RETSTUFF" | grep -v '^rootfs '`"

#replace /dev/rootfs with correct root partition...
#rdev is a busybox applet...
ROOTPARTITION="`rdev | grep ' /$' | cut -f 1 -d ' ' | grep -E '/dev/sd|/dev/hd|/dev/mmc'`"
nPATTERN="s%^/dev/root %${ROOTPARTITION} %"
[ "$ROOTPARTITION" ] && RETSTUFF="`echo "$RETSTUFF" | sed -e "$nPATTERN"`"

echo "$RETSTUFF"
exit $RETVAL


Ttuuxxx, note, that guy on the Gentoo forum didn't post in 2004, that was when he/she joined the forum! It was very late, my eyes were getting blurry! I edited the original post to this thread, removed the reference to 2004.

Posted on 14 Jul 2009, 10:19 by BarryK
Gentoo forum
Ok, I posted to the Gentoo forum!