# viewing windoze files from linux



## busterdog (Nov 17, 1999)

Is it possible whilst in linux red hat to view windows files.
I want to change the linux background and the file is on the windows drive.
BTW, triple boot between 98se, xp home and red hat.

Many thanks

BD


----------



## lynch (Aug 3, 2002)

Yes it is possible.You need to figure out your partitions to do it,though.How many hard drives? If you have everything on one hdd ,that makes it a little easier. You can open a terminal as root and type:
fdisk -l /dev/hda
to get your present partition table.
Post the results from that so we'll know what partition to mount.
lynch
* EDIT: I have fixed the typos in my replies in this thread in case someone in the future uses this info.It will lessen the confusion,I think *


----------



## busterdog (Nov 17, 1999)

> _Originally posted by lynch:_
> *Yes it is possible.You need to figure out your partitions to do it,though.How many hard drives? If you have everything on one hdd ,that makes it a little easier. You can open a terminal as root and type:
> fdisk -l /dev/hda
> to get your present partition table.
> ...


Just the 1 h/d
I am about 1 day old with linux. Could you tell me how to open a terminal as root?
Got my hard drive partitioned into 4.
1) Win 98
2) XP
3) linux
4) spare for storage

Thanks for ya time lynch


----------



## lynch (Aug 3, 2002)

Click on the icon that looks like a monitor screen partially covered by a shell.(terminal=shell)
When the terminal window opens,you'll see a prompt like:
* [email protected]: * with a cursor.
type * su * and hit enter.
You'll be prompted for a password.
Type in the root password you made up during installation and hit enter.
(The password entry is blind so you wont see any characters on the screen while you enter the root password)
You should now have a root prompt somthing like this:
* localhost:/home/busterdog # *
The pound symbol(#) indicates root.
Now type:
* /sbin/fdisk -l /dev/hda *
make sure you leave a space between the command( * sbin/fdisk * ),the option( * -l * ) and the argument( * /dev/hda * )
HTH 
lynch


----------



## busterdog (Nov 17, 1999)

bash: fdisk: command not found

BD


----------



## lynch (Aug 3, 2002)

Try this as root:
/sbin/fdisk -l /dev/hda
I keep forgetting that Redhat use the absolute path in bash.
Sorry,I mostly use SuSE.I have RH 7.3 on another comp but I dont use it enough to remember that RH uses the absolute path(by default) for system commands.Try the above-it should work 
lynch


----------



## busterdog (Nov 17, 1999)

Disk /dev/hda: 255 heads, 63 sectors, 7476 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 b Win95 FAT32
/dev/hda2 766 7476 53906107+ f Win95 Ext'd (LBA)
/dev/hda5 766 1772 8088696 b Win95 FAT32
/dev/hda6 2445 7476 40419508+ b Win95 FAT32
/dev/hda7 1773 1785 104391 83 Linux
/dev/hda8 1786 2412 5036346 83 Linux
/dev/hda9 2413 2444 257008+ 82 Linux swap

Partition table entries are not in disk order


Once again, Thanks for ya help lynch

BD


----------



## lynch (Aug 3, 2002)

I'm guessing that win98 is on hda1 and XP is split on hda5 and hda6.You need to make places for your windows partitions so...
You need to log in as root again and type:
* mkdir /mnt/win98 * <press enter>
then type:
* mkdir /mnt/xtd * <press enter>
then type:
* mkdir /mnt/xp1 * <press enter>
then type:
* mkdir /mnt/xp2 * <press enter>
Now,to check to see if they're where they should be,type:
* ls -l /mnt *
They should be visible now.The /mnt/xtd is the extended partition

Now you need to make a symlink for each directory(mount point)
As root,type:
* ln -s /dev/hda1 /mnt/win98 * <enter>
then: 
* ln -s /dev/hda4 /mnt/xtd * <enter>
then: 
* ln -s /dev/hda5 /mnt/xp1 * <enter>
then:
* ln -s /dev/hda6 /mnt/xp2 * <enter>

Be sure that you have a backup copy of /etc/fstab before you make the following changes to that file.To do that,type:
* cp /etc/fstab /etc/fstab.bak * <enter>
The next step is to enter the info you've created into /etc/fstab
Now,when I edit text files,I like to log out of my regular user desktop and, at the graphical login screen,I log back in as root from there.That way I can just open a text editor from the desktop instead of running vi or pico from a terminal(I'm lazy )

So,open a text editor like advanced text editor or kate and open /etc/fstab.
You'll see a bunch of entries for hda7,8,9,cdrom floppy etc.If you see any entries for hda1,hda4,hda5,or hda6 then skip this step.If not,move your mouse cursor to the end of the line that's just above the line for your cdrom drive and press enter to open a new line.Then type:
* /dev/hda1 /mnt/win98 auto noauto,user,umask=0, 0 0 * <enter>
then:
* /dev/hda4 /mnt/xtd auto noauto,user,0 0 * <enter>
then:
* /dev/hda5 /mnt/xp1 auto noauto,user,umask=0,0 0 * <enter>
then:
* /dev/hda6 /mnt/xp2 auto noauto,user,umask=0,0 0 * <enter>
Now save this file and close the text editor.
The next thing to do is log out of the root desktop and login again as a regular user.Once you do that,you can make icons to mnt and access your windows partitions.
The next question I have is: Are you using KDE or Gnome as your window manager.If you're using KDE,just right-click on an empty part of the desktop and choose create new>hard disc...When the window appears,click on the device tab and,from the device drop-down menu,choose hda1 or one of the others.Click okay and you should get an icon you can l-click to mount and access the win98 partition.Repeat the process to make the other partitions except /mnt/xtd:I dont think you need an icon for that.
If you are using Gnome then creating the icons is most likely very simliar but I really dont know.I dont like or use Gnome.
I hope this is what you needed to know.I gave you the basic fstab entries to make those partitions accessable.You can tweak them more to your liking later.
I know this will work because I did it on my Mandrake 8.2 test system this morning just to make sure I remembered how to do it 
You may have to add the "umask=0" option in order to read the windows files as a regular user. 
lynch
* EDIT: fixed typo in filename *


----------



## busterdog (Nov 17, 1999)

Ta lynch

Will try tonight

BD


----------



## busterdog (Nov 17, 1999)

lynch
Everything was going fine until:

cp /etc/fstab /ets/fstab.bak
cp: cannot create regular file `/ets/fstab.bak': No such file or directory

Any ideas?

BD


----------



## lynch (Aug 3, 2002)

Sorry That's a typo.It should read /etc/fstab.bak.
I just missed my misspelling. 
lynch


----------



## busterdog (Nov 17, 1999)

Btw:

Be sure that you have a backup copy of /etc/fstab before.......

If I hav'nt asked too much already, how do I do this?

BD


----------



## lynch (Aug 3, 2002)

Ask all the questions you like ,I dont mind.
If you did this at the terminal:
cp /etc/fstab /etc/fstab.bak 
You should be fine.Just to be sure open your desktop file manager and open the /etc directory.Scroll down past the folders and look for fstab and fstab.bak.They should be next to each other.Open each one and have a look:they should be identical.Redhat may make a copy of that file when you begin to edit the original /etc/fstab.That's okay,too.
What window manager are you using? Is it Gnome or KDE?To open a file manager in either,there should be an icon on the desktop labeled Home.When you click on that,a two-paned window (sort of like windows explorer)will open.In the left hand pane is the directory tree.Look for etc and click on that.
HTH
lynch


----------



## busterdog (Nov 17, 1999)

Thanks lynch

At work now so I will try when I get home and get back to you.

Cheers

BD


----------



## lynch (Aug 3, 2002)

NP 
I keep forgetting were about 5 hours apart:it's 6:00 AM here and I'm just now leaving for work.Be back on the boards in about 11 or 12 hrs.
lynch


----------



## busterdog (Nov 17, 1999)

> _
> 
> So,open a text editor like advanced text editor or kate and open /etc/fstab.
> You'll see a bunch of entries for hda7,8,9,cdrom floppy etc.If you see any entries for hda1,hda4,hda5,or hda6 then skip this step.If not,move your mouse cursor to the end of the line that's just above the line for your cdrom drive and press enter to open a new
> ...


_

lynch

The /etc/fstab is a read only file so I can't change it.
I will have a look though to see if I can find a way to. Doddle in Windows.

I am using Gnome

Thanks

BD_


----------



## busterdog (Nov 17, 1999)

Yo lynch

Installed & using KDE now if it helps

BD


----------



## lynch (Aug 3, 2002)

Logout of your regular account and when the graphical login window appears,log back in as root.Make sure KDE is chosen as window manager.Once you get to the desktop,you just open an editor by clicking on the gear at the bottom left and choose office>editors>kedit.
lynch


----------



## busterdog (Nov 17, 1999)

Got there eventually lynch.
I was having probs but I dont think I was saving the /etc/fstab file correctly. I had no idea how to save a file until I got to the bit where you asked me to edit it and save it. As I said at the start, Linux is very very new to me. I think I am trying to run before I can walk but thats just me. Call it the way I learn. I did the same with W(&%)ze 
If ya see alot more of me in the Linux forum I apologise now  but I do like to learn and now I can see the files it has opened up, more for me to find out about. Thanks for sticking with me and in turn your patience.
I have been with TSG for 3 years band the help & support the Moderators and posters have given me is super.
BTW, hope everything is OK Back East,Way Back East. Here in good old Blighty We have been taken to a 2:2 draw by Macedonia in the qualifying rounds for the Euro 2004 football
cup  
Thanks again mate.

Unless lynch has anymore to say please consider this post resolved and my other troubles will be posted elsewhere 

Cheers lynch, the info will be filed.

BD alias Dave


----------



## lynch (Aug 3, 2002)

lynch


----------



## lynch (Aug 3, 2002)

Sorry for the short reply.I had a dinner date last night and was( as always) running late.
I fixed my typos in this thread so others wont suffer through my one-fingered typing abilities Made note of it where I did edit.
You did well for a new Linux user.Glad to here I could help.I learn just as much as you when I do this,so I say we both benefit.And if others are helped by this thread then we've both done some good.
Dont know a thing about English football,I'm a Philadelphia Eagles fan.That's NFL football 
So,if everything is working for you,I have no problem with a Mod labeling this thread closed.
lynch


----------



## ring02 (Oct 5, 2002)

Hello,

I've done the posts suggestions to get this to work but get the following error message. mount: fs type ntfs not supported by kernel
I am running redhat 8


Any ideas?


----------



## lynch (Aug 3, 2002)

It's interesting that Redhat does'nt compile support for ntfs into thier default kernel.Is this the download version?I think you may be able to load it as a module using modprobe.I'll look into it and post back.
In the meantime,post your fstab to see how RH set up the rest of your partitions.
lynch


----------



## ring02 (Oct 5, 2002)

Sorry Lynch!

I've moved into a new house and have finally set up my linux box.
Here is a look at my fstab.
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0
0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /mnt/xp auto noauto,user,umask=0,00


How do I recompile my kernal to enable ntfs support?

Thanks


----------



## lynch (Aug 3, 2002)

Go  this  site for specific help with RH 8 ntfs support.You'll get 2 options:
1.install the RPM
2.re-compile the kernel
Do the first one(RPM)  It's a lot easier.Before you do anything read the whole page and follow the instructions to select the right RPM.
If you get stuck doing any part of it,post back.
Good luck 
HTH
lynch


----------



## ring02 (Oct 5, 2002)

Hello Lynch,

Installed the rpm package without any errors.
When I try to to modprobe ntfs it just stays at the command line but I do not get a carrage return, it looks as though it locks up.

Any Ideas?


----------



## lynch (Aug 3, 2002)

How long did you wait?And it didnt give you a fresh prompt?Did you check to see if you could read your /mnt/xp files? 
Did you run cat /proc/filesystems as suggested in the FAQ?
lynch


----------



## ring02 (Oct 5, 2002)

Hello,

I never got the return prompt.
I let it sit for about a day I have also tried to read my /mnt/xp but could not. There is no mention of ntfs under proc/filesystems.

Any Ideas?


----------



## lynch (Aug 3, 2002)

I would go back,(if you have'nt already) and make sure you followed the instructions explicitly.Make sure you chose the right rpm for your cpu.
Make sure you checked things with the * dmesg | grep ntfs * command.
You can also try(as root):* lsmod * to manually check for loaded modules.Though grep should find all mention of ntfs.
If that doesnt get any results,I would try installing it again.
lynch


----------



## ring02 (Oct 5, 2002)

hello,

Seems to have worked once I updated to the latest kernal.
Not sure what the problem was.
How can I auto mount this and have all the other logins besides root to access this?


Thanks in advance.


----------



## lynch (Aug 3, 2002)

Glad to hear its working
The easiest way to let non-root users is make a link on the desktop that will mount it for you.
Fstab looks like it's all setup already to let anyone access the windows partition.It just has to be mounted.
I know how to make a link in KDE so I'll proceed assuming that's what you use too
To make a link,right-click an empty part of the desktop and choose Create New>Hard Disc and choose /dev/hda1.You can name it whatever you like on the general tab.Click okay and left-click the icon and see if it mounts. 
lynch


----------



## ring02 (Oct 5, 2002)

Hey Lynch,

I still cannot get anyone else besides root to see the drive.
The error message is You do not have the permissions necessary to view the contents of "xp". here is my fstab again for you to take a look at.

/dev/hda1 /mnt/xp auto noauto,user,umask=0,00

Thanks for your help.


----------



## lynch (Aug 3, 2002)

Make a backup copy of the /etc/fstab file and name it /etc/fstab.bak.Then open /etc/fstab and change the fstab line for XP to look like this:
/dev/hda1 /mnt/xp fs=ntfs dev=hda1 ,noauto,user,umask=0, 0 0
And see if that works.I'm kind of surprised your existing fstab entry isnt letting non-root users read that partition.The "umask=0" section should have set the permissions so non-root users can read ntfs.
lynch


----------

