LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Accessing Windows partition (https://www.linuxquestions.org/questions/linux-mint-84/accessing-windows-partition-4175599579/)

paxolin 02-12-2017 07:44 AM

Accessing Windows partition
 
When I browse my Windows partition in Mint, I have come to realise that the first time I do it after starting up, Mint must be doing something like “initialising” it, in order to read it?

I’m asking this because I have a Mint torrent client that I have set to save the d/l files on my Windows partition, enabling me to access it in both OSes.
However, as the torrent client starts up in when I login to Mint, it throws up a read error, until I access the Windows partition manually then restart the torrent client.

Is there some straightforward way to get Mint to access/initialise the Windows partition automatically before the torrent client starts?

stanvan 02-12-2017 07:53 AM

This link might get you started in the right direction.

paxolin 02-12-2017 08:17 AM

Quote:

Originally Posted by stanvan (Post 5669358)
This link might get you started in the right direction.

Thanks very much for the info. My fstab file looks like this:

Code:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=fc8ebdee-1c9b-4c3f-979d-6c83f11d534d /              ext4    errors=remount-ro 0      1
# swap was on /dev/sda7 during installation
UUID=1e6c4cf2-5e03-49b0-9d23-ffe3b8ea8681 none            swap    sw              0      0

I used “sudo blkid” which told me the Data partition I want to access is:
Code:

/dev/sdb5: LABEL="Data" UUID="B03AFBF43AFBB606" TYPE="ntfs" PARTUUID="4b4f8f50-05"
what do I paste exactly into my fstab file & is it immediately below the current last line? I've very new at this game.

hydrurga 02-12-2017 08:44 AM

Assuming that you want to mount it in /media/ntfs (as a suggestion, but it's your choice), create that folder (as root) and add the following entry to your fstab (you can place it at the end with a comment, just to indicate that you added the entry, but the placement isn't important):

UUID=B03AFBF43AFBB606 /media/ntfs ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=1000,uid=1000 0 0

To test the fstab once you've saved it, use sudo mount -a (it's better to know of any problems now rather than on reboot).

paxolin 02-12-2017 08:52 AM

Quote:

Originally Posted by hydrurga (Post 5669369)
Assuming that you want to mount it in /media/ntfs (as a suggestion, but it's your choice), create that folder (as root) and add the following entry to your fstab (you can place it at the end with a comment, just to indicate that you added the entry, but the placement isn't important):

UUID=B03AFBF43AFBB606 /media/ntfs ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=1000,uid=1000 0 0

To test the fstab once you've saved it, use sudo mount -a (it's better to know of any problems now rather than on reboot).

You've got me worried now. Does that mean there's a possibility nothing will work?
I assumed it would add an additional partition to initialise. but maybe it might ignore the normal one?

hydrurga 02-12-2017 08:57 AM

Quote:

Originally Posted by paxolin (Post 5669373)
You've got me worried now. Does it there's a possibility nothing will work?
I assumed it would add an additional partition to initialise. but maybe it might ignore the normal one?

No need to be worried. All you are doing is auto mounting an existing ntfs partition (which you do manually anyway). It won't affect the auto mounting of any other partitions listed in fstab.

It is always good practice to run sudo mount -a after you've changed /etc/fstab to check that any changes work - if there are any errors, you can always revert to how it was before by re-editing the file or restoring a backup of the file that you made before you edited it.

stanvan 02-12-2017 09:00 AM

Be brave, try stuff. (But make good backups!) You will learn more by reading and doing than by copy/paste. The link I gave included this simple statement for /etc/fstab:

Code:

/dev/sda3  /media/windows  ntfs    defaults    0  0
I just pasted that myself into my fstab (you need to change to sdb5, since that's what blkid reported to you). After a reboot, I found that /media/windows was indeed automatically mounted to my Windows partition. You don't have to name it "windows"... it can be anything you want. Sure, paste it at the end of fstab, but it may not matter. You'll probably have to be root or use sudo to open and save changes to fstab.

I don't use Windows 8/10, so I don't know about the hyberfile issue described in the link.

stanvan 02-12-2017 09:03 AM

Quote:

Originally Posted by hydrurga (Post 5669375)
It is always good practice to run sudo mount -a after you've changed /etc/fstab to check that any changes work - if there are any errors, you can always revert to how it was before by re-editing the file or restoring a backup of the file that you made before you edited it.

Better answer! :hattip:

pan64 02-12-2017 09:37 AM

there are a lot of good tips here, here is an additional advice:
booting with an incorrect fstab is not really possible, so be care about that. In that case you would need to boot into recovery mode or use a live cd to fix your fstab.

paxolin 02-12-2017 09:47 PM

Quote:

Originally Posted by hydrurga (Post 5669375)
No need to be worried. All you are doing is auto mounting an existing ntfs partition (which you do manually anyway). It won't affect the auto mounting of any other partitions listed in fstab.

It is always good practice to run sudo mount -a after you've changed /etc/fstab to check that any changes work - if there are any errors, you can always revert to how it was before by re-editing the file or restoring a backup of the file that you made before you edited it.

I'm really reluctant to do anything now. Although users have given helpful advice on how to do this, I see there's the possibility my system might not even start up again if I've made an error?
If I did edit the file, then run the command "sudo mount -a" immediately afterwards, how would I know if there's something wrong? Will it tell me in plain English what's wrong/what to do?

The last post #9 says there's chance it won't boot if an error, and I'd have to use recovery mode, (which is quite worrying to me) or use a CD (my CD doesn't work anyway) to try to fix it.

pan64 02-13-2017 01:36 AM

mount -a is a good idea, if that does not work you need to fix fstab

ondoho 02-13-2017 01:50 AM

Quote:

Originally Posted by paxolin (Post 5669622)
I'm really reluctant to do anything now.

in that case you will need to go back to the situation you described in post #1.

sorry to be blunt, but that's how it is.

alternatively, you could write yourself a script that will first mount the windows partition, then start the torrent client.

TxLonghorn 02-13-2017 07:07 AM

Quote:

Originally Posted by paxolin (Post 5669622)
I'm really reluctant to do anything now. Although users have given helpful advice on how to do this, I see there's the possibility my system might not even start up again if I've made an error?

Relax, paxolin. You are not planning any changes to the existing fstab that mounts your root partition. You are only adding a new mount instruction. If, for some reason, that new mount instruction does not work, your system will still boot. Your boot process might stop and tell you something is wrong, and ask if you want to proceed (skip mounting that partition). Simply answer SKIP, and the boot will continue successfully.
Therefore, the previous statement "booting with an incorrect fstab is not really possible," is nonsense... in this case.

Quote:

Originally Posted by paxolin (Post 5669622)
If I did edit the file, then run the command "sudo mount -a" immediately afterwards, how would I know if there's something wrong? Will it tell me in plain English what's wrong/what to do?

It will provide very helpful information about the error - in plain English.

paxolin 02-15-2017 02:13 AM

1 Attachment(s)
Quote:

Originally Posted by TxLonghorn (Post 5669758)
Relax, paxolin. You are not planning any changes to the existing fstab that mounts your root partition. You are only adding a new mount instruction. If, for some reason, that new mount instruction does not work, your system will still boot. Your boot process might stop and tell you something is wrong, and ask if you want to proceed (skip mounting that partition). Simply answer SKIP, and the boot will continue successfully.
Therefore, the previous statement "booting with an incorrect fstab is not really possible," is nonsense... in this case.

It will provide very helpful information about the error - in plain English.

I finally had a go at editing the fstab file.
First, I thought I would make a copy (using text editor) and save it it the etc folder as fstab-old, but I seem unable to do that? I don't understand why?
See the attached image.

pan64 02-15-2017 02:30 AM

you need to do that as root


All times are GMT -5. The time now is 03:52 PM.