LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   More Madness - My WIndows Physical Drives have Vanished (https://www.linuxquestions.org/questions/linux-hardware-18/more-madness-my-windows-physical-drives-have-vanished-323437/)

barabus 05-14-2005 11:09 AM

More Madness - My WIndows Physical Drives have Vanished
 
HI All.

Just opened the media folder and no sign of my physical windows drives in there. This followed a reboot in which they appeared there but could not open as they had apparently failed to mount on previous boot.

Can anyone explain simply how to restore them and be able to access files there as I have PDF.s there I wish to view?

Thanks

- Barabus

barabus 05-14-2005 11:15 AM

More info:

I logged in as root and could find the drives but again as unmounted

With the following error message:

Code:

mount: can't find /dev/hda5 in /etc/fstab or /etc/mtab

jabfinger 05-14-2005 03:39 PM

You may try this

as root in a terminal:

1. make a directory in /mnt "mkdir /mnt/windows"

2. then manualy mount with "mount -t vfat /dev/hda5 /mnt/windows

Or

1. in a terminal make a directory in /mnt "mkdir /mnt/windows"

2. in a text editor as root add a line in /etc/fstab

"/dev/hda5 /mnt/windows vfat defaults 0 0"

barabus 05-14-2005 09:11 PM

Jabfinger - thanks a lot for this info -

I entered partition info as described in fstab and did the mkdir /mnt/windows as described and can now access both windows drives directly - but only logged on as root.

When I try to do the same in user sessions I get 'cannot enter mount/windows' error message .Any idea how I might fix this?

Thanks again

- Blackbeard

barabus 05-14-2005 10:07 PM

One more question - How about the other ntfs partition 'D' I've tried using /mnt/D etc but nothing doing!

barabus 05-14-2005 10:37 PM

Correction - now can see both partitions (Win C & D) but only when logged in as root! Can I configure to be read in user session also?

Thanks again for this Jabfinger!

jabfinger 05-15-2005 08:13 PM

The section in the line in /etc/fstab

"/dev/hda5 /mnt/windows vfat defaults 0 0"

where it says "defaults" is where you will put your mount options. There are several options that you are able to put here seperated with commas.

try doing a "man mount" and scroll down to the -o section. here you will find a list of options that you may use.

You may try "user,noauto,rw" in this section. This means that any user may mount the filesystem and the filesystem must be mounted explicitly as opposed to mounted automaticaly and the filesystem is r/w.

barabus 05-16-2005 03:17 PM

Thanks again Jabfinger but still nothing doing when logging in as user. I tried configuring fstab (logged in as Root) as follows:

Code:

/dev/hda2            /mnt/windows        ntfs      user,auto,ro          0 0
/dev/hda5            /mnt/D              ntfs      user,noauto,rw          0 0


In each case I get the message "Could not enter......"

As I understand it (case a)I should be able to reboot into the user account the mount should automatically load in the user account with read-only priveleges

Any further thoughts on this? As stated before they are both accessible in root!

- Barabus

jabfinger 05-16-2005 10:06 PM

I am not sure what type of partitions you have for hda2 and hda5. Are they both fat or are they ntfs or is one fat and the other ntfs?

Have you created a mountpoint "D" for hda5 to mount to?

It looks as if your /dev/hda2 will mount automaticly on /mnt/windows during boot and users should have read only access to it as long as the file system type is ntfs. If it is a fat partition then you will have to change your type to vfat on the line in /etc/fstab.

you will have to manualy mount /dev/hda5 with the command "mount /mnt/D" as long as it is an ntfs file system type and you have made a directory "D" in /mnt. You must explicitly mount this file because of the option "noauto" on your line in /etc/fstab. If you wish to mount this file automaticaly during boot you must change the "noauto" to "auto" .

If you are unsure of the filesystem type you are trying to mount you may try placing "auto" in place of ntfs or vfat in /etc/fstab.

barabus 05-17-2005 12:25 AM

Quote:

Originally posted by jabfinger
I am not sure what type of partitions you have for hda2 and hda5. Are they both fat or are they ntfs or is one fat and the other ntfs?

Have you created a mountpoint "D" for hda5 to mount to?

Yes both are ntfs and yes I have 2 mount points: one for windows and one for D and both work fine when logged in as root but do not when logged into the user account!

That said the info I posted were two possible scenarios. For the time being I've switched both back to 'defaults' but both are ntfs filesystems so I left that part unchanged.

What I want to achieve is that both are visible and accessible in the user account as well as the root with perhaps the Windows drive being read only and the D being read write and would like for each to mount automaticall to save fiddling around every time I need to access my files - mainly pdfs and images.

Given this info and what it is I am trying to achieve, I hope you can lend further knowledge to the subject. It's just a little bit of a drag that I have to change sessions evry time I need to access these files. Hope you can help

- Blackbeard

jabfinger 05-17-2005 12:35 PM

Barabus,

Here is part of my /etc/fstab file. I am using Gentoo

/dev/hdb1 /boot ext2 noauto,noatime 1 2
/dev/hdb3 / ext3 defaults 1 1
/dev/hdb2 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
/dev/hda1 /windows vfat noauto,users,rw 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
linux:/home/music /mnt/music nfs suid,dev,exec 0 0
linux:/home/movies /mnt/movies nfs suid,dev,exec 0 0

My windows partition is a vfat which is of course different from the ntfs however the mount process should be the same for both. By placing "noauto,users,rw" as options I am able to mount windows as a regular user by "mount /windows" and can read as well as write to the folder.

As far as automounting them at boot I dont Know what the problem is.

I hope this helps.

jabfinger 05-17-2005 02:52 PM

Update

/dev/hda1 /windows vfat auto,users,uid=1000,rw 0 0

is my new line in /etc/fstab. I added uid=1000 which is my user ID. Now I have access to the windows directory automaticly after boot.

As a side note. I did a little reading in the Suse administrators guide and I think, from what I read, that it is not a good idea to write to your ntfs directory from linux. You may want to make windows a fat file system so you can write to it from linux.

If this dosent help, well:scratch:

barabus 05-17-2005 04:11 PM

Can the uid be an alpha value............. most examples I've seen when googling seem to have numeric values. Is this actually the user account name in windows - or password or what?

I'm a little lost in this sense!

Thanks again for all the useful and helpful info

jabfinger 05-17-2005 07:27 PM

To answer your question No, UIDs and GIDs are numerical values. Depending on what you are trying to achive each user should be assigned a unique UID. However you can assign more than one user the same UID but all usernames with the same UID will appear to the system to be the same user.

To go a little further if you look in your /etc/passwd file you will see your systems user info.

as an example:
iain:x:1004:100::/home/iain:/bin/bash

This equates to:
user name : password : UID : GID :: home directory : login Shell

Hope this helps.

Also see:
man useradd
man groupadd

barabus 05-17-2005 07:42 PM

Hi again Jabfinger, I guess your last but one post did the trick - Thanks for hanging in there with me!

Funny thing is though that I got it working before your last post and yes I got it working with alpha values for uid

Example:

/dev/hda5 /mnt /windows ntfs auto,users,uid=bingo,ro 0 0

- where you would have the alpha login for the user account of 'bingo'.

Every little bit helps and your input on this has been a lot of little bits, which equate to a heck of a lot. Thanks againg for everything on this thread

- Barabus


All times are GMT -5. The time now is 10:04 PM.