In shell: if [ $( stat -c %d /boot ) -eq $( stat -c %d / ) ] then # /boot is on the same partition as / prefix="/boot" else # /boot is on its own partition prefix="/" fi /usr/bin/stat is in coreutils which is an essential package, so you can count on it being available. -- Paul Martin <pm at debian.org>