Wow, I tried all of that and I still can't mount hda1? Here's my /usr/sbin/rebuildfstab
Code:
#!/bin/bash
# (C) Klaus Knopper Nov 2002
# Calls scanpartitions as root and adds entries to /etc/fstab
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export PATH
umask 022
[ ! -e /proc/partitions ] && { echo "$0: /proc not mounted, exiting" >&2; exit 1; }
if [ -e /var/run/rebuildfstab.pid ]; then
test -d /proc/"$(</var/run/rebuildfstab.pid)" >/dev/null 2>&1 && exit 0
rm -f /var/run/rebuildfstab.pid
fi
echo "$$" >/var/run/rebuildfstab.pid
# Give usb-storage some more time to detect partitions...
sleep 5
XSH=""
[ -n "$DISPLAY" ] && XSH="rxvt -bg black -fg green -cr red -T $0 -e"
[ "`id -u`" != "0" ] && { exec $XSH sudo $0 "$@"; }
TMP="/tmp/fstab.$$.tmp"
ADDEDBYKNOPPIX="# Added by KNOPPIX"
# Simple shell grep, searches for lines STARTING with string
stringinfile(){
while read line; do
case "$line" in $1*) return 0;; esac
done <"$2"
return 1
}
removeentries(){
# Remove comment line $1 and the following line from file $2
# sed '/^# Added by KNOPPIX/{N;d;}'
while read line; do
case "$line" in $1) read line; continue ;; esac
echo "$line"
done <"$2"
}
verbose=""
remove=""
mkicons=""
user=""
group=""
arg="$1"
while [ -n "$arg" ]; do
case "$arg" in
-v*) verbose="yes" ;;
-r*) remove="yes" ;;
-i*) mkicons="yes" ;;
-u*) shift; user="$1" ;;
-g*) shift; group="$1" ;;
*) echo "Usage: $0 [-v[erbose]] [-r[emove_old]] [-i[cons]] [-u[ser] uid] [ -g[roup] gid]" ;;
esac
shift
arg="$1"
done
[ -n "$verbose" ] && echo "Scanning for new harddisks/partitions..." >&2
rm -f "$TMP"
if [ -n "$remove" ]; then
removeentries "$ADDEDBYKNOPPIX" /etc/fstab >"$TMP"
else
cat /etc/fstab >"$TMP"
fi
count=0
while read device mountpoint fstype relax; do
stringinfile "$device " "$TMP" || \
{ count="$((count + 1))"
if [ -n "$mountpoint" -a "$mountpoint" != "none" -a ! -d "$mountpoint" ]; then
mkdir -p "$mountpoint" 2>/dev/null
compat="/mnt/${mountpoint##*/}"
[ -e "$compat" ] || ln -sf "$mountpoint" "$compat" 2>/dev/null
fi
options="noauto,users,exec"
case "$fstype" in
vfat) options="${options},umask=000,shortname=winnt" ;;
msdos) options="${options},umask=000" ;;
swap) options="defaults" ;;
ntfs*) options="${options},umask=000";;
esac
case "$fstype" in
ntfs*|vfat|msdos)
[ -n "$user" ] && options="$options,uid=$Israel"
[ -n "$group" ] && options="$options,gid=$Israel"
;;
esac
echo "$ADDEDBYKNOPPIX"
echo "$device $mountpoint $fstype $options 0 0"; }
done >>"$TMP" <<EOT
$(scanpartitions)
EOT
# Add CD/DVD-Roms
cdcount=0
while read drive name drives; do
case "$drive$name" in drivename:)
for d in $drives; do
mountpoint="/media/$d"
if [ -n "$mountpoint" -a "$mountpoint" != "none" -a ! -d "$mountpoint" ]; then
mkdir -p "$mountpoint" 2>/dev/null
compat="/mnt/${mountpoint##*/}"
[ -e "$compat" ] || ln -sf "$mountpoint" "$compat" 2>/dev/null
fi
stringinfile "/dev/$d " "$TMP" || \
{ cdcount="$((cdcount + 1))"
echo "$ADDEDBYKNOPPIX"
echo "/dev/$d $mountpoint auto ro,noauto,users,exec 0 0"; }
done
break
;;
esac
done >>"$TMP" <<EOT
$(cat /proc/sys/dev/cdrom/info 2>/dev/null)
EOT
[ -n "$verbose" ] && { [ "$count" -gt 0 -o "$cdcount" -gt 0 ] && echo "Adding $count new partitions and $cdcount new cdrom-type devices to /etc/fstab." >&2 || echo "No new partitions found." >&2; }
mv -f "$TMP" /etc/fstab
[ -n "$mkicons" ] && mkdesktophdicons >/dev/null 2>&1
rm -f /var/run/rebuildfstab.pid
[ -n "$DISPLAY" ] && sleep 2
exit 0
And here's /etc/fstab:
Code:
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
usbfs /proc/bus/usb usbfs devmode=0666 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/cdrom /media/cdrom iso9660 defaults,ro,users,noexec,noauto 0 0
/dev/cdrom1 /media/cdrom1 iso9660 defaults,ro,users,noexec,noauto 0 0
/dev/dvd /media/dvd iso9660 defaults,ro,users,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hda1 /media/hda1 ntfs noauto,users,exec,umask=000, 0 0
# Added by KNOPPIX
/dev/hda3 none swap defaults 0 0
# Added by KNOPPIX
/dev/hdc /media/hdc auto ro,noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda1 /media/sda1 vfat noauto,users,exec,umask=000,shortname=winnt, 0 0