PDA

View Full Version : HAL , fstab , management of Drives



JohnnyH
02-16-2007, 10:16 AM
(I've started this new thread to split out one answer to a multiple-subject question :wink: ).

Knoppix is principally a LiveCD system (with semi-official adaptations for Hard Drive installation).
So in places it is hard-coded for the User Name "knoppix", and you will get fewer problems if you use "knoppix" as your User Name in a Hard Drive installation.

For using another <username> this 'kludge' :!: helps with drives management :
Edit the lines (93 & 94 in Knoppix 5) in /usr/sbin/rebuildfstab
from
[ -n "$user" ] && options="$options,uid=$user"
[ -n "$group" ] && options="$options,gid=$group"
to
[ -n "$user" ] && options="$options,uid=<username>"
[ -n "$group" ] && options="$options,gid=<username>"
You might also need to ensure that the daemons are running by e.g :

dpkg-reconfigure hal dbus

EDITED 14:18 hrs GMT: I've found a bit of code in /etc/init.d/knoppix-hd-autoconfig which allows it to work with any non-root User Name; insert code as shown between lines 92 and (old)93 in /usr/sbin/rebuildfstab to give :-

case "$fstype" in
ntfs*|vfat|msdos)
for d in $(ls -1d /home/*/Desktop); do
if [ -d "$d" ]; then
user="${d%/Desktop}"
user="${user#/home/}"
fi
done
group=$user
[ -n "$user" ] && options="$options,uid=$user"
[ -n "$group" ] && options="$options,gid=$group"
;;
esac
(I show the complete case...esac condition for clarity.)

JohnnyH
03-08-2007, 04:01 AM
Addendum: I've found out that if you edit /usr/sbin/rebuildfstab using KWrite (instead of e.g.vim) it loses its executable status.

You can test for this from the command line by
ls -l /usr/sbin/rebuildfstab
and restore executability by
chmod 0755 /usr/sbin/rebuildfstab
(or by right-click on the file in Konqueror, select Properties, Permissions, check "is executable" box).