-
Can't Mount Partitions (Even after re-installing HAL)
Ok, I did some reading up on this one first. I saw most people with this same problem after installing Knoppix to the hard-drive merely re-installed HAL (Hardware Abstraction Layer) and BOOM. Their problem was solved. But I still cannot mount my Windoze partition? Here is the error I'm getting when I try to mount:
Code:
Could not mount device.
The reported error was:
Error opening partition device: Permission denied
Failed to startup volume: Permission denied
Failed to mount '/dev/hda1': Permission denied
-
Senior Member
registered user
If you would like to post the contents of your /etc/fstab file we might see a clue.
-
Here is the information you requested....
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,uid=knoppix,gid=knoppix 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,uid=knoppix,gid=knoppix 0 0
-
Senior Member
registered user

Originally Posted by
Israel
Here is the information you requested....
Code:
# /etc/fstab: filesystem table.
...
/dev/hda1 /media/hda1 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0
...
/dev/sda1 /media/sda1 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
The ",uid=knoppix,gid=knoppix" is your problem (assuming that you did not re-use "knoppix" for your HD-installed User Name).
You need to remove those strings from your fstab thus:
Code:
# /etc/fstab: filesystem table.
...
/dev/hda1 /media/hda1 ntfs noauto,users,exec,umask=000 0 0
...
/dev/sda1 /media/sda1 vfat noauto,users,exec,umask=000,shortname=winnt 0 0
AND modify your /usr/sbin/rebuildfstab file as shown here http://www.knoppix.net/forum/viewtopic.php?t=26759
to YOUR user name, otherwise it will just get reset back to knoppix user next time the system runs rebuildfstab !
Good luck
-
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
-
Senior Member
registered user
In rebuildfstab, you don't want the $ in front of Israel, as you are now using the explicit string and not a string parameter label. So your lines should read:
Code:
[ -n "$user" ] && options="$options,uid=Israel"
[ -n "$group" ] && options="$options,gid=Israel"
[Edited 09:07hrs GMT]:-
In /etc/fstab you still(or again) have the commas which are now trailing the end of umask=000 in
/dev/hda1 /media/hda1 ntfs noauto,users,exec,umask=000, 0 0
and at the end of shortname=winnt in
/dev/sda1 /media/sda1 vfat noauto,users,exec,umask=000,shortname=winnt, 0 0
(They may have got back in there as a consequence of the rebuildfstab failing on uid=$Israel and gid=$Israel)
Edit the above and see how that works - good luck
-
Hmmm... I tried that, didn't work for me? Re-booted, still couldn't get it to work? Here they are again:
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
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
-
Senior Member
registered user
Oh, 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
Code:
ls -l /usr/sbin/rebuildfstab
and restore executability by
Code:
chmod 0755 /usr/sbin/rebuildfstab
(or by right-click on the file in Konqueror, select Properties, Permissions, check "is executable" box).
However, it's still not obvious why your hda1 won't mount
. What method are you using to mount ?
e.g. have you tried from the command line
Code:
mount -t ntfs /dev/hda1 /media/hda1
?
e.g.are you using the desk-top icon?
e.g.are you using right-click on the device in KDiskFree ?
-
I believe I may have found the answer. I was trying to just use the desktop icon, but when I tried to use the command line I was suggested to pick a couple of options first, one of which was ntfsfix:
Code:
root@Mephistolist:/home/Israel# ntfsfix /media/hda1
Mounting volume... Error opening partition device: Is a directory
Failed to startup volume: Is a directory
FAILED
Attempting to correct errors... Error opening partition device: Is a directory
FAILED
Failed to startup volume: Is a directory
Volume is corrupt. You should run chkdsk.
I've had a problem with this and even tried running chkdsk /F from the Recovery cd to fix all that, but nothing seems to help? I guess it's just a hardware issue?
-
Senior Member
registered user
Hmmm, I think the questions need to go further back in the whole process ... I'm not sure whether, or not, you're implying a problem with the windows partition itself...
1) Are you able to mount hda1 from the Live CD | DVD ?
1A) (and if not, was the media integrity validated OK on booting with the cheatcode knoppix testcd ?)
If 1) is OK then we can infer that the problem lies with the HD-installed Knoppix
Otherwise, are you trying to mount either:
2) a known-working Windows partition for working data transfer TO of the Linux system ? (NB if you try FROM Linux it's at possible risk to your NTFS filesystem - numerous postings on the forum refer)
or
3) a Windows partition with a problem to be rescued from Linux ?
If the answer is 2) or 3) the problem would seem to be related to the NTFS partition itself. I'm afraid I can't help much there, not having used NTFS since the days of Windows NT4, and I would not have it on a machine where I also use Linux
Oh,
4) You tried chkdsk ; if you run whichever of gparted and|or qtparted is on your Knoppix, or a GParted Live CD, does that give any more information?
Similar Threads
-
By Briana83 in forum Hdd Install / Debian / Apt
Replies: 7
Last Post: 05-11-2007, 10:59 PM
-
By redhawk in forum Hardware & Booting
Replies: 0
Last Post: 08-20-2006, 12:35 PM
-
By jackren in forum Hdd Install / Debian / Apt
Replies: 6
Last Post: 03-24-2004, 02:03 PM
-
By sb73542 in forum General Support
Replies: 6
Last Post: 02-13-2004, 01:32 AM
-
By henrique in forum Customising & Remastering
Replies: 0
Last Post: 09-24-2003, 12:05 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Compaq 242506-001 Netelligent 100 FDDI DAS Fiber SC PCI Network Adapter Vintage
$249.00

Vintage HP 21MX 1000 M-Series Minicomputer Chassis Backplane Parts AS-IS
$228.19

vintage Gateway motherboard, socket 370 1ghz cpu, 256mb ram, cables, power switc
$69.99

Lot of 2 Vintage Plextor PX-43CS SCSI CD-ROM Caddy Drives + 4 Caddies Used
$55.99

Original Vintage Old Style STANDARD Black CD Jewel Case (Heavy Duty) 90g Lot
$316.95

HP Pavilion a1000 Intel Pentium 4 3GHz 1GB 250GB Vintage Windows XP MS Office PC
$70.00

Vintage Personal Accounting & Essential Office 2 CD-ROM PAK For Windows 3.0
$114.00

Vintage Lot of 18 PC CD Rom Home School Children Kid Learning Fun Activity Games
$54.99

Vintage Teac FD-505 5.25" 3.5" Combo Drive 19307571-00
$199.99

VINTAGE COLLECTIBLE Comp USA Maxtor 20 GB 3.5 Inch EIDE Hard Drive NEW SEALED
$500.00