/dev/root on /, full hd install
July 14, 2009 —
BarryK
I recently posted about this problem (http://bkhome.org/archive/blog2/200907/mount-recognition-problem-full-hd-install.html): 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:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136766
This poor guy asked the same question on a Gentoo forum, never got an answer:
http://forums.gentoo.org/viewtopic-p-5607083.html?sid=24af65900129797c43c555039d7303a4
Here is some further discussion on the problem in the Arch bugzilla, with suggested solutions:
http://bugs.archlinux.org/task/5519
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.
Comments
FixedUsername: BarryK
Yay, I fixed it! I modified my 'df' script.
fixed
Username: 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 ttuuxxx
A solution
Username: BarryK
"'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: [code]#!/bin/sh #(c) Barry Kauler 2009, licence GPL2 #w482 fix for /dev/root. DF="busybox df" [ "`which df-FULL`" != "" ] && DF="df-FULL" RETSTUFF="`$DF $@`" RETVAL=$? 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 ###END### [/code] 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.
Gentoo forum
Username: BarryK
"Ok, I posted to the Gentoo forum!
Tags: woof