LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount internal HDD (https://www.linuxquestions.org/questions/linux-newbie-8/mount-internal-hdd-4175576379/)

arranskye 04-01-2016 05:03 AM

mount internal HDD
 
I would like to access the windows HDD in Ubuntu. This is my setup:

PC A SATA HDD running windows 10 bootloader SDA1
SATA HDD running windows 10 OS SDB2


PC B SSD DRIVE running Ubuntu 14.04LTS SDA2 EXT4
SSD DRIVE SDA5 SWAP
SSD DRIVE SDA6 HOME

Obviously windows installed the bootloader during the process. It showed up in Ubuntu so I just left it there on the Sata drive and let Ubuntu install grub on the SSD drive. a seamless way to dual boot. BUT now I cant access windows from ubuntu. Is it possible to mount the windows sata drive as either ro or rw for occasional use please.

Output of sudo fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 7 HPFS/NTFS/exFAT
/dev/sda2 1026048 176807935 87890944 83 Linux
/dev/sda3 176809982 231495679 27342849 5 Extended
/dev/sda5 176809984 196339711 9764864 82 Linux swap / Solaris
/dev/sda6 196341760 231495679 17576960 83 Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x3767dd0a

Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 1026047 512000 7 HPFS/NTFS/exFAT
/dev/sdb2 1026048 501471231 250222592 7 HPFS/NTFS/exFAT
margaret@margaret-System-Product-Name:~

pan64 04-01-2016 05:34 AM

yes, you need to install ntfs driver. Its name is ntfs-3g.
Next you need to configure /etc/fstab to specify mount points.

arranskye 04-01-2016 05:47 AM

thanks Pan. installed the driver but output of /etc/stab:

bash: /etc/fstab: Permission denied

can you help please thanks

pan64 04-01-2016 06:16 AM

/etc/fstab is a file, you need to edit it, enter the filesystems you want to mount.
see man fstab and http://askubuntu.com/questions/11373...n-in-etc-fstab

beachboy2 04-01-2016 06:29 AM

arranskye,

What is the output of:

Code:

sudo blkid
This may help you:

http://www.linuxquestions.org/questi...d-drive-36892/

Look at the section from:

find the UUID of the HDD

to

Code:

sudo chown -R jimmy:jimmy /media/drive2

arranskye 04-01-2016 06:37 AM

Thanks pan & BB

just trying to learn Linux so i really appreciate your help. I will do my best to follow your instructions. Also could you tell me how to find tags to add and also how to highlight the thread title.

thanks

michaelk 04-01-2016 08:22 AM

As a reminder make sure you disable windows fast start up. When windows 10 is shutdown this will put the NTFS file systems in a clean state so that it can be accessed by Ubuntu.

beachboy2 04-01-2016 09:26 AM

arranskye,

Personally I do not bother with tags except on a blog.

Isn't the thread title highlighted (in bold) automatically?

WFV 04-01-2016 12:45 PM

Quote:

Originally Posted by arranskye (Post 5524513)
thanks Pan. installed the driver but output of /etc/stab:

bash: /etc/fstab: Permission denied

can you help please thanks

you have to log on as super user to edit fstab:
Code:

$ sudo su
enter, and enter password, then use a text editor such as vim, nano, gedit, mousepad, leafpad...
Code:

# nano /etc/fstab
enter, and add the line for automounting the NTFS drive, reboot and it should show up in Ubuntu.

yancek 04-01-2016 01:32 PM

Quote:

As a reminder make sure you disable windows fast start up.
You need to disable anything to do with hibernation which includes fast startup. I'm not aware of any Linux system that will allow mounting a hibernated ntfs partition. You ask a general question about whether mounting a partition with an ntfs filesystem is possible in Linux/Ubuntu. Simple answer, yes. You don't indicate whether you have tried anything and if you have, what the results were. Did you look under the /media/margaret directory to see if the windows partition(s) are there? That is the common location in Ubuntu.

You can mount the partition manually if you want to access it either with a simple mount command or using a script to mount it. This seems like what you want as you mention "occasional use". Putting an entry in the /etc/fstab file will mean it is always mounted.

The link below has a number of examples of fstab entries for ntfs partitions. The second link below has an example of a simple mount command to manually mount an ntfs partition with a basic explanation.

http://ubuntuforums.org/showthread.php?t=1604251

arranskye 04-04-2016 06:32 PM

Hi all, First very big thanks to all of you for your commen links, and information. Sorry for the long delay in responding. I had to go away for a couple of days but apart from that I have spent many many hours on this. My choice. Read all the links many times and links led to more links and man pages to be studied until I had a reasonable understanding. And wow! This was an excellent learning process, so again many many thanks. I have not got it quite right. See error on ext 4 also "Disks file" shows NSFT not mounted.


]cat /etc/fstab
# /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/sda2 during installation
UUID=c0d626a9-d88d-4023-bf44-4bd62f1e4232 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=89d8ca57-ce09-40e5-a95e-a80cf4088897 /home ext2 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=2a1f8105-5cd2-480e-a5c6-5ff9d39efd97 none swap sw 0 0
UUID=media/105EDF9E5EDF7B44/media/Windowsnfts3gdefaults,auto,uid=1000,unmask=0200

ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Apr 4 22:43 105EDF9E5EDF7B44 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Apr 4 22:43 2826E9C826E9975A -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr 4 22:43 2a1f8105-5cd2-480e-a5c6-5ff9d39efd97 -> ../../sda5
lrwxrwxrwx 1 root root 10 Apr 4 22:43 62DA972ADA96F98D -> ../../sdb1
lrwxrwxrwx 1 root root 10 Apr 4 22:43 89d8ca57-ce09-40e5-a95e-a80cf4088897 -> ../../sda6
lrwxrwxrwx 1 root root 10 Apr 4 22:43 c0d626a9-d88d-4023-bf44-4bd62f1e4232 -> ../../sda2

sudo mount -a

[sudo] password for margaret:
[mntent]: line 14 in /etc/fstab is bad


Information obtained from the following;



ls -al /dev/disk/by-uuid/

drwxr-xr-x 2 root root 160 Apr 3 17:09 .
drwxr-xr-x 5 root root 100 Apr 3 18:09 ..
lrwxrwxrwx 1 root root 10 Apr 3 17:59 105EDF9E5EDF7B44 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Apr 3 17:09 2826E9C826E9975A -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr 3 17:09 2a1f8105-5cd2-480e-a5c6-5ff9d39efd97 -> ../../sda5
lrwxrwxrwx 1 root root 10 Apr 3 17:09 62DA972ADA96F98D -> ../../sdb1
lrwxrwxrwx 1 root root 10 Apr 3 17:09 89d8ca57-ce09-40e5-a95e-a80cf4088897 -> ../../sda6
lrwxrwxrwx 1 root root 10 Apr 3 17:09 c0d626a9-d88d-4023-bf44-4bd62f1e4232 -> ../../sda2
margaret@margaret-System-Product-Name:~$ total




sudo blkid -c /dev/null

/dev/sda1: LABEL="System Reserved" UUID="2826E9C826E9975A" TYPE="ntfs"
/dev/sda2: UUID="c0d626a9-d88d-4023-bf44-4bd62f1e4232" TYPE="ext4"
/dev/sda5: UUID="2a1f8105-5cd2-480e-a5c6-5ff9d39efd97" TYPE="swap"
/dev/sda6: UUID="89d8ca57-ce09-40e5-a95e-a80cf4088897" TYPE="ext2"
/dev/sdb1: LABEL="System Reserved" UUID="62DA972ADA96F98D" TYPE="ntfs"
/dev/sdb2: UUID="105EDF9E5EDF7B44" TYPE="ntfs"



echo $UID 1000
umask =000

Final two columns should be 0 and 0

gksu gedit /etc/fstab Configured the following line in gedit


UUID=media/105EDF9E5EDF7B44 /media/Windows nfts-3g defaults,auto,uid=1000,unmask=002 0 0

yancek 04-04-2016 06:45 PM

Quote:

UUID=media/105EDF9E5EDF7B44/media/Windowsnfts3gdefaults,auto,uid=1000,unmask=0200
Compare the entry above to the other working entries. Leave the media entry off at the beginning and also, it is "ntfs" not "nfts". The rest of the parameters are your choice. You also need spaces at specific point, running it all together won't work. Do you have a 'Windows' directory currently existing under the /media directory? The entry below should work but I don't usually use windows so don't have any entries to compare it to.

Quote:

UUID=105EDF9E5EDF7B44 /media/Windows ntfs-3g defaults,auto,uid=1000,unmask=0200

michaelk 04-04-2016 06:54 PM

Almost got it, try

Code:

UUID=105EDF9E5EDF7B44 /media/Windows ntfs-3g defaults,uid=1000,unmask=002 0 0
Make sure the /media/Windows directory exists.

arranskye 04-04-2016 07:00 PM

yancek
 
1 Attachment(s)
Hi yancek

Forgot to say I disabled fast boot & secure Boot in the Bios before installing Windows 10 Immediately after the installation I disabled fast boot and hibernation. There was another option "Sleep" I checked do nothing for this option.

I hope you can point me in the right direction to correct where i have gone wrong I think the fstab configuration is correct but perhaps sudo mount-a is incorrect although it did add sdb2.

oooops SOMETHING BADLY WRONG. JUST FOUND THIS ON THE TERMINAL WHEN I WENT TO CLOSE IT. PLEASE SEE ATTACHMENT

arranskye 04-04-2016 07:49 PM

many thanks for your super fast replies. So sorry about this and disappointed in myself. I copied and pasted notes as i went along and one said there should be no spaces in gedit just commas and forward slashes but I probably misunderstood anyway that why I entered it as I did.

Should I delete the original incorrect line before inputting the correct one detailed by michaelk.



michaelk Can I type in your line exactly as is with the relevant spaces etc. please.

yancek sorry for the stupid typing error I checked and rechecked. Typed everything into libre doc. before entering gedit but obviously missed it. Stupid!!! Only excuse: I have passed senior citizen status and just gone into antique. I have been using Ubuntu as my daily OS for 2.5 years. Studied loads of tutorials etc. but found it difficult to retain the info unless I was actually doing a process such as this.

Ref: media directory. terminal: mkdir/media/windows nothing appeared to happen and I could not find out where or how to view the directory to establish that it had been created. I re-entered the code and the command line said media/windows already exists. If you could explain where to find it I could then establish if it relates to windows, Ubuntu or empty.

Thanks


All times are GMT -5. The time now is 05:04 AM.