Click to See Complete Forum and Search --> : i need help mounting a windows drive so that i can access my files from linux
jiggolo182
01-26-2004, 03:15 PM
hi, i am running Red Hat 7.3 (yes i know its outdated) and i am trying to access one of my Windows partitions to transfer some files to another partition so i can reformat. i am using the following command mount -t ntfs /dev/hda1 /mnt/windows but it says that /mnt/windows is not a dir and when i try to mkdir windows it says i dont have the privleges to do so. i am doing all of this from Root.. how can i not have priveleges??? does anyone know how to get past this?? im sort of a linux newbie but im trying to learn but im starting to get frustrated! thanks!
Icarus
01-26-2004, 03:18 PM
Red Hat does not have NTFS support by default. You need to recompile the kernel for the support.
otherwise, your doing it right...unless there is no directory /mnt/windows...if not "mkdir /mnt/windows" ;)
jiggolo182
01-26-2004, 03:30 PM
ok.. i know nothing about recompiling the kernel so i might just have to give up for the moment and take a loss on data. the mkdir /mnt/windows command doesnt work.. i get some errors and even when i try to create the dir as a root and give everyone access to it.. it still doesnt work.. i even checked the properties on hda1 in the /etc dir and still no luck.. any other ideas about this? at one point i had access to it and somehow i cant get it back.. i do have an automount program that may have something to do with me not being able to create mounting points for new drives.. please help
azambuja
01-26-2004, 03:47 PM
If you're desperate you can use a program (application) called explore2fs if I'm not mistaken, for windows. It can view *only* ext2 (perhaps ext3, I don't know). Google for it, download it, run it, and you should see your linux partition. Open an explorer window and drag the files you wanna copy to the folder of the partition you want. I think that's pretty much how it works. If it complains about a dll, try this: http://linux.process.com.br/downloads/explore2fs/diskio2.dll
Good luck.
Icarus
01-26-2004, 04:01 PM
Or grab a pre-compiled Red Hat kernel
http://linux-ntfs.sourceforge.net/rpm/index.html
Thanks to mdwatts for the link ;)
jiggolo182
01-26-2004, 04:36 PM
the explore2fs program seems to be just the opposite of what i need. i cant boot into windows because it crashes so i am trying to access my files saved on that drive (/dev/hda1 in linux) to move some files so that i can reinstall 2000. the explore2fs program looks like you can only install it on windows. as with the kernel, i believe my machine is a i586 but it also has an athlon processor so im not sure which one i would need... its been a while since ive booted into linux so please bare with me if i seem retarded, thanks...
Icarus
01-26-2004, 04:41 PM
Heh, retarded comments aside...
You said your using Red Hat 7.3 on an Athlon? You can get away with any of the kernels, but I would suggest the athlon one...worse case is it won't boot, but Grub will keep the old kernel is the list so you can boot to that one on case.
jiggolo182
01-26-2004, 05:15 PM
ha.. i boot into linux from a boot disk that i created so i didnt even bother with lilo or grub.. plus i was new to the whole dual-boot pc thing and i didnt wanna mess up my existing windows installation.. at one time i had access to /dev/hda1 and it was mounted in /mnt/windows but now it says thats not a dir and it doesnt show up when i look for it. i have an automount system installed on the computer that automatically mounts a FAT partition from windows.. that has mp3s, documents, stuff like that on it and that one works fine so maybe i need to modify something in the auto-autofs (my automount program) so that it can access hda1 but i wouldnt know where to start. i suppose that maybe i could email the guy that wrote the program and see if he might know of anything... he basically rewrote the program so that it would work with RedHat.. along with Suse and Mandrake. lemme know what you think would be easiest..
Icarus
01-26-2004, 05:28 PM
Keep the boot disk handy, you may need it when this is all done :)
Boot into Linux, open a terminal
su - to root
# grub-install /dev/hda1
That will install Grub to the boot sector on the first drive (your Windows drive, don't worry it'll be ok ;)
Get the kernel with the NTFS support.
rpm -ivh kernel-ntfs-2.4.20-28.7.athlon.rpm
reboot without the floopy, you should get the Grub menu and it should be selected for the new kernel
once booted if everything is good, you should be able to open a terminal and su to root
# mkdir /mnt/windows
# mount -t ntfs /dev/hda1 /mnt/windows
you will need to be root to transfer the files, but you should have access.
jiggolo182
01-26-2004, 05:49 PM
ok, i downloaded the one that you told me but apparently i dont have the correct kernel.. how can i check which i kernel i have so that i can download the correct ntfs kernel? below is the error that i received.. by the way, the Grub install went fine (no errors reported)
[root@Gobel root]# rpm -ivh kernel-ntfs-2.4.20-28.7.athlon.rpm
error: failed dependencies:
kernel = 2.4.20-28.7 is needed by kernel-ntfs-2.4.20-28.7
Icarus
01-26-2004, 05:59 PM
Ahh....that's odd..
Well, what you need then is this kernel (ftp://ftp.freshrpms.net/pub/updates/redhat-7.3-i386/kernel-2.4.20-28.7.athlon.rpm)
install that then the ntfs one
...so this ntfs seems to be just the module, how large is that RPM?
jiggolo182
01-26-2004, 06:06 PM
alright i just download this kernel...
kernel-2.4.20-28.7.athlon.rpm and its size is 12576KB
i didnt install it yet though since you didnt tell me to...
jiggolo182
01-26-2004, 06:08 PM
oh i just saw that you told me to install that kernel then the ntfs kernel.. haha. one question.. upgrading the kernel doesnt change any of the programs or settings that i have for linux does it?
Icarus
01-26-2004, 06:15 PM
Nope, it will only affect some modules (nvidia and ati drivers are the main ones) nothing should change
and I was asking for the size of the ntfs kernel, too lazy to download it myself :D
jiggolo182
01-26-2004, 06:18 PM
i have an nvidia graphics card and that was a ***** to install the drivers for... should i just abort this whole project?? the ntfs kernel size was 38kb...
Icarus
01-26-2004, 06:48 PM
Yup, that RPM is just the module for the kernel
Lets make it easier on us and get one for your running kernel :)
do a uname -a and goto the NTFS Kernel Red Hat 7 page (http://linux-ntfs.sourceforge.net/rpm/redhat7.html) and get the athlon kernel for that kernel and install the ntfs module with "rpm -ivh whatever-ntfs.rpm"
This will not require you to re-install the nVidia driver (bonus!) and should be available without a reboot (I won't gurentee it, but I bet that is the case ;))
You may need to "modprobe ntfs" but you should be good from there
jiggolo182
01-26-2004, 07:06 PM
ok so i downloaded the correct kernel.. it installed fine.. i did the modprobe ntfs command and then tried this...
[root@Gobel mnt]# mkdir windows
mkdir: cannot create directory `windows': Permission denied
[root@Gobel mnt]# mount -t ntfs /dev/hda1 /mnt/windows
mount: mount point /mnt/windows does not exist
[root@Gobel mnt]#
im pulling my hair out.. haha
dboyer
01-26-2004, 07:25 PM
can i see a "ls -l" of both / and /mnt? (importantly to me, at least, what are the permissions on /mnt, and what other folders are in /mnt)
you can mount a filesystem anywhere, really... you could mount it in /root/windows, /windows, /mnt/cdrom even... just need a folder somewhere
jiggolo182
01-26-2004, 07:52 PM
results of ls -l in / .....
[root@Gobel /]# ls -l
total 149
drwxr-xr-x 2 root root 4096 Jul 3 2002 bin
drwxr-xr-x 4 root root 1024 Jul 19 2002 boot
drwxr-xr-x 18 root root 86016 Jan 26 01:10 dev
drwxr-xr-x 57 root root 4096 Jan 26 18:46 etc
drwxr-xr-x 6 root root 4096 Jul 14 2002 home
drwxr-xr-x 2 root root 4096 Jun 21 2001 initrd
drwxr-xr-x 7 root root 4096 Jul 3 2002 lib
drwx------ 2 root root 16384 Jul 1 2002 lost+found
drwxr-xr-x 2 root root 0 Jan 26 01:10 misc
drwxr-xr-x 3 root root 0 Jan 26 01:10 mnt
drwxr-xr-x 2 root root 4096 Aug 23 1999 opt
dr-xr-xr-x 101 root root 0 Jan 25 20:10 proc
drwxr-x--- 31 root root 4096 Jan 26 18:11 root
drwxr-xr-x 2 root root 4096 Jul 3 2002 sbin
drwxrwxrwt 16 root root 4096 Jan 26 17:57 tmp
drwxr-xr-x 15 root root 4096 Jul 1 2002 usr
drwxr-xr-x 16 root root 4096 Jul 1 2002 var
results of ls -l in /mnt ....
[root@Gobel mnt]# ls -l
total 32
drwxrwxrwx 19 nfsnobod nfsnobod 32768 Dec 31 1969 music
Icarus
01-26-2004, 08:44 PM
OK, that's messed up
Root can't make a directory and the directory in /mnt is music created in 1969!??
It is an NFS (Network File System) and nfsnobod is NFS nobody user account.
What does mount list?
when you su over to root did you do a plain su or "su -" ?
Try it with the "su -" (this loads roots profile and paths)
jiggolo182
01-26-2004, 08:56 PM
i dont have a mount dir or is that a command that i am supposed to run? i am logged into linux as root and i am running Xwindows while i run these commands although i am doing them from a command prompt... i figured since im already root that i didnt need to use the su or su -. i just tried it as su - though and still got
[root@Gobel mnt]# su -
[root@Gobel root]# cd /mnt
[root@Gobel mnt]# mkdir windows
mkdir: cannot create directory `windows': Permission denied
[root@Gobel mnt]#
going bald.. haha
jiggolo182
01-26-2004, 09:06 PM
here are the results from the mount command.. if i were smart i would have run it before i posted the last comment.. heh
[root@Gobel mnt]# mount
/dev/hda4 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda3 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
automount(pid1018) on /misc type autofs (rw,fd=5,pgrp=1018,minproto=2,maxproto=3)
automount(pid1051) on /mnt type autofs (rw,fd=5,pgrp=1051,minproto=2,maxproto=3)
automount(pid1028) on /home/staff type autofs (rw,fd=5,pgrp=1028,minproto=2,maxproto=3)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/hda5 on /mnt/music type vfat (rw,uid=65534,gid=65534,umask=000000)
dboyer
01-26-2004, 09:43 PM
Id try this for fits and giggles...
# su -
# cd
(should be root in root's home directory)
# mkdir windows
# mount -t ntfs /dev/hda1 /root/windows
or you could do:
# su -
# cd /
(should be root in root)
# mkdir windows
# mount -t ntfs /dev/hda1 /windows
When all else fails, ghetto rig!
jiggolo182
01-26-2004, 09:51 PM
ok here's what i get after running that command....
[root@Gobel brandon]# su -
[root@Gobel root]# mkdir windows
[root@Gobel root]# mount -t ntfs /dev/hda1 /root/windows
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
or too many mounted file systems
i dunno about the bad option or bad superblock but i do know that the /dev/hda1 partition is ntfs format!
i hate being a newbie..
Icarus
01-26-2004, 10:01 PM
You'll get use to it :)
Try "modprobe ntfs" and then mount it
jiggolo182
01-26-2004, 10:28 PM
hmmm ok.. so here's the latest.. rebooted to see if that would have any effect.. i noticed that since i installed grub i couldnt boot into windows even if i wanted to (or i just dont know how) because it never gave me an option of what OS to boot into.. i had to boot into linux by using the bootdisk that i had been using before i installed Grub earlier today. after booting into linux i retried the commands for mount -t ntfs /dev/hda1 /root/windows
/mnt/windows
and neither of those commands worked... i got the bad superblock error for /root/windows and i got the /mnt/windows does not exist and it wont let me create it saying "acces denied" still...
also, how can i remove Grub? so that i can get my computer back to its original state. if i have to use the bootdisk to boot into linux then why do i install Grub?
im checking this forum like a hawk.. keep the ideas coming..
dboyer
01-26-2004, 10:30 PM
i hate being a newbie..
We've all been there, heck, ive even had this same exact problem with redhat myself :)
just keep in mind that with most distro's, this is pretty easy, and part of the problem is that you're using RH7.3 (aka, don't get discouraged! linux isn't always this bad... )
bwkaz
01-26-2004, 11:30 PM
Originally posted by jiggolo182
automount(pid1051) on /mnt type autofs (rw,fd=5,pgrp=1051,minproto=2,maxproto=3) I've never used autofs myself, but I'd bet this is why you can't create subdirectories of /mnt.
Try putting them somewhere else (like you're doing), I suppose.
When you reboot, loaded modules are lost. You have to modprobe ntfs again after reboot if you didn't.
If you did... I'm not sure. Does fdisk -l recognize the partition type of hda1 at least?
jiggolo182
01-27-2004, 12:01 AM
ok.. i ran modprobe ntfs again and then ran both of these commands...
mount -t ntfs /dev/hda1 /root/windows
mount -t ntfs /dev/hda1 /mnt/windows with no luck in either. next i ran fdisk -l and those results are listed below...
[root@Gobel root]# fdisk -l
Disk /dev/hda: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1889 15173361 7 HPFS/NTFS
/dev/hda2 2551 9729 57665317+ f Win95 Ext'd (LBA)
/dev/hda3 1890 1895 48195 83 Linux
/dev/hda4 1896 2550 5261287+ 83 Linux
/dev/hda5 2551 9663 57135141 b Win95 FAT32
/dev/hda6 9664 9729 530113+ 82 Linux swap
/dev/hda1 is 20 gig partition from an 80GB drive... 14 gigs are for windows and 4 are linux...
i also emailed the guy who wrote auto-autofs and i helped him beta test it for red hat so hopefully he will remember me but i wont hear from him until morning since he lives in germany and there is a 6 hour time difference... lemme know if ya got anymore ideas in the meantime...
Icarus
01-27-2004, 08:16 AM
That's interesting, I don't have any NTFS partitions here I can check with but is HPFS the same as NTFS? I've found this on mounting HPFS in Linux
4.5 Accessing HPFS from Linux
* Homepage: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
* Download: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/hpfs-0.99b.tar.gz for 2.0 kernels; and http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/hpfs-1.98b.tar.gz for 2.2 kernels
* Author: Mikulas Patocka < mikulas@artax.karlin.mff.cuni.cz >
* Access: Read-Write, extended attributes, long names.
* License: GPL
This driver is part of Linux kernel (2.1.x+). It can read and write to HPFS partions. Access rights and owner can be stored in extended attributes. Few bugs in original read-only HPFS are corrected. It supports HPFS386 on Warp Server Advanced.
If you have kernel with HPFS support, say "Y"es to 'OS/2 HPFS filesystem support' in Filesystems submenu. Then recompile kernel using 'make dep bzImage', reboot and try to mount your HPFS partition (e.g. mount /dev/hda2 /mnt -t hpfs).The rest of the File Systems HOWTO is here (http://linuxselfhelp.com/HOWTO/Filesystems-HOWTO.html#toc4) and also includes NTFS but really doesn't cover more then what we have gone through
Red Hat 7.3 is very old also, but with everything we have done it should work. Did modprobe ntfs load? Check to make sure the module is loaded by lsmod and make sure ntfs is loaded when trying to mount the drive.
jiggolo182
01-27-2004, 10:47 AM
this is turning out to be a much bigger project than i had hoped for.. is there a way to uninstall Grub so that i can at least try to boot into windows and see if it keeps crashing on me? i was content with using the bootdisk for linux... very frustrated but im not gonna give up on linux.. yet
jiggolo182
01-27-2004, 10:49 AM
oh yeah.. and ntfs is the first thing listed when i run the lsmod command
Icarus
01-27-2004, 11:04 AM
To remove the bootloader, get a windows boot disk
fdisk /mbr
if you have an XP install CD, boot that and select repair boot sector
jiggolo182
01-27-2004, 11:12 AM
win2k is my other OS.. will that cd work or should i just create a bootdisk for 2000 and do it that way?
shakin
01-27-2004, 11:21 AM
I'd suggest perhaps installing Suse Linux over top of Red Hat. You can do this without overwriting Windows, it will setup Grub with dual boot and you can use Suse's YaST to easily mount the NTFS partition with a GUI.
ubenpdon
01-27-2004, 01:17 PM
or get part magic and then convert to fat32.
dboyer
01-27-2004, 05:19 PM
a win2k disk will work great.. just go into repair mode adn type "fdisk /mbr" like mahdi said...
wouldn't be significantly harder to add windows to grubs boot list... that will take care of it once and for all
Icarus
01-27-2004, 05:29 PM
Originally posted by dboyer
wouldn't be significantly harder to add windows to grubs boot list... that will take care of it once and for all title Windows
rootnoverify (hd0,0)
chainloader +1
makeactive
in case you were wondering ;)
jiggolo182
01-27-2004, 08:18 PM
title Windows
rootnoverify (hd0,0)
chainloader +1
makeactive
ok.. my hard drive is hda1 so would i need to change the command to read rootnoverify (hda1, 0) ?
Icarus
01-28-2004, 12:26 AM
No, (hd0,0) in Grub is /dev/hda1 in Linux...it's kind of complicated, but it kind of goes like this
hda1 = hd0,0
hda2 = hd0,1
hda3 = hd0,2
hdb1 = hd1,0
hdb2 = hd1,1
hdc1 = hd2,0
and so on...
jiggolo182
01-28-2004, 02:17 AM
ok, so i tried those commands in Grub... the only one that didnt work was title Windows.. i kept getting an error 27: unrecognized command. i rebooted to see if the commands worked at all and they didnt (of course) so now i dont know what else to do.. nothing seems to be working.. argh
jiggolo182
01-28-2004, 02:41 AM
ok... so now i have tried to load the win2k cd and run the repair but it said it didnt find an installation of 2000 to repair.. so i looked through the cd from command line and found a fixmbr command.. i ran that and it said that it might ruin my entire hard disk and all data on all partitions would be lost.. i cant afford to lose all my data on the second partition so i decided not to proceed... does anyone have any ideas what to do now???
hardcore
01-28-2004, 03:09 AM
Ok look all you need is your data saved from your win2k partition(s), right? Do this: download the Knoppix ISO, burn it, and pop it in, www.knoppix.org.
I believe that Knoppix has NTFS support, so you should be able to mount your win partition(s).
Then mount the partition's that you want to save your win stuff on, copy the data, done, reboot, reinstall windows, and move the data over.
jiggolo182
01-28-2004, 10:15 AM
if i install that Knoppix wont it install over redhat? and if i install it on my windows partition then i lose that data. perhaps im just not following what you are saying.. please bear with me.. im a newbie in linux
hardcore
01-28-2004, 10:24 AM
Nope, Knoppix is run entirely off of a cd, you CAN install on a hard drive, but the default is to run off the cd.
dboyer
01-28-2004, 05:05 PM
Originally posted by jiggolo182
ok, so i tried those commands in Grub... the only one that didnt work was title Windows.. i kept getting an error 27: unrecognized command. i rebooted to see if the commands worked at all and they didnt (of course) so now i dont know what else to do.. nothing seems to be working.. argh
you should edit the grub configuration file... if i recall correctly, it should be something like /boot/grub.conf or /boot/grub/grub.conf... poke around a bit (locate grub.conf should tell you)
if you inspect the file, you should see the entries for redhat near the bottom of the page. Just try and add the lines:
title Windows
rootnoverify (hd0,0)
chainloader +1
makeactive
that should give you a windows entry on your menu...
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.