LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2016, 05:03 AM   #1
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Rep: Reputation: Disabled
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:~

Last edited by arranskye; 04-01-2016 at 05:05 AM. Reason: duplicate phrase
 
Old 04-01-2016, 05:34 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
yes, you need to install ntfs driver. Its name is ntfs-3g.
Next you need to configure /etc/fstab to specify mount points.
 
Old 04-01-2016, 05:47 AM   #3
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Original Poster
Rep: Reputation: Disabled
thanks Pan. installed the driver but output of /etc/stab:

bash: /etc/fstab: Permission denied

can you help please thanks
 
Old 04-01-2016, 06:16 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
/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
 
1 members found this post helpful.
Old 04-01-2016, 06:29 AM   #5
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,969
Blog Entries: 32

Rep: Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464
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
 
1 members found this post helpful.
Old 04-01-2016, 06:37 AM   #6
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-01-2016, 08:22 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 04-01-2016, 09:26 AM   #8
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,969
Blog Entries: 32

Rep: Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464Reputation: 1464
arranskye,

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

Isn't the thread title highlighted (in bold) automatically?
 
1 members found this post helpful.
Old 04-01-2016, 12:45 PM   #9
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by arranskye View Post
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.
 
Old 04-01-2016, 01:32 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
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

Last edited by yancek; 04-01-2016 at 01:46 PM.
 
Old 04-04-2016, 06:32 PM   #11
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Original Poster
Rep: Reputation: Disabled
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

Last edited by arranskye; 04-04-2016 at 06:38 PM. Reason: highlighting
 
Old 04-04-2016, 06:45 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
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
 
Old 04-04-2016, 06:54 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 04-04-2016, 07:00 PM   #14
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Original Poster
Rep: Reputation: Disabled
yancek

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
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2016-04-05 00:52:49.png
Views:	20
Size:	70.6 KB
ID:	21379  
 
Old 04-04-2016, 07:49 PM   #15
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount an internal hdd partition without user authentication? veeall Slackware 6 11-08-2013 10:07 AM
[SOLVED] Fedora installed on USB HDD doesn't start when the internal HDD is connected DavidBrenner Linux - Newbie 18 05-05-2013 09:46 PM
[SOLVED] How do I copy root the file system of an internal hdd to a usb hdd completelinuxnube Slackware 8 08-06-2012 02:22 PM
Slow USB transfer rates (60kb p/s) External HDD --> Internal HDD drfrostbyte Linux - Hardware 4 03-28-2011 01:20 AM
I installed ubuntu 9.04 to my Maxtor external hdd. I have no internal hdd. I can boot dont33 Linux - Newbie 1 08-13-2009 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration