Omar
Infrastructure system engineer . Egypt

How to mount NTFS disk on Linux

Introduction

Before we start to dive into our topic, we need to clarify some terms and to explain some of the differences between the different file systems that OS families use in our day-to-day technology life.

OS families

What is file system (FS)?

In the simplest way, file system is how to store the data on the disk. Without file system, we will not be able to access the data even though it’s there some where on the raw disk.

File systems are indeed part of the OS thus they are dependent on the OS type the we are running.

OS layers

As we see in the previous figure that the operating system is the brain to manage our hardware and without it including our file system, we wont be able to run, manage or maintain our application.

Linux FS types

As we clarified that different types of OS have different types of FS, and here’s most common FS types in Linux

ext2, ext3 and ext4

These are the progressive version of Extended Filesystem (ext), which primarily was developed for MINIX. The second extended version (ext2) was an improved version. Ext3 added performance improvement. Ext4 was a performance improvement besides additional providing additional features.

jfs

IBM developed The Journaled File System (JFS) for AIX UNIX which was an alternative to system ext. JFS is an alternative to ext4 currently and is used where stability is required with the use of very few resources. When CPU power is limited JFS comes handy.

ReiserFS

It was as an alternative to ext3 with improved performance and advanced features. There was a time when SuSe Linux‘s default file format was ReiserFS but later Reiser went out of business and SuSe had no option other than to return back to ext3. ReiserFS supports file System Extension dynamically which was relatively an advanced feature but the file system lacked certain area of performance.

XFS

XFS was a high speed JFS which aimed at parallel I/O processing. NASA still usages this file system on their 300+ terabyte storage server.

so our problem here is that NTFS is not a FS that Linux understands and that’s because NTFS is a Windows-based file system.

Prerequisites

  • A system running Linux
  • A user account with sudo or root privileges
  • Access to a terminal window / command line (Activities > Search > Terminal)

first we need to make sure that we racked our disk drive properly on the physical slot then we check that the OS feels it by running the next command

here we can see disk under the sdb section but still has no mount point.

Identify NTFS Partition

Before mounting an NTFS partition, identify it by using the parted command:

we can see that sdb at the bottom is NTFS file system

Normal approach

Normally we would jump on and try the following command to mount our disk



 but we will get the following error

And that’s because our Linux OS cannot understand (read) this type of file systems

Solution

First we need to create directory to mount the disk

#mkdir /mnt/ntfs

Since the normal mount command did not successfully work, we need to add an additional option to prepare the OS for the foreign FS

As we can see, now the command has been successfully executed without any errors after we added the option -t which dedicated to identify the file system type.

To make sure and check our configuration use the df -h command to show the details

And now the disk partition is mounted to our newly created directory.

Conclusion

There are different type file systems and each OS cannot understand others FS by default.

NTFS is a windows-based file system so the normal approach to mount media on Linux would not work correctly instead we use the appropriate options (mount -t ntfs /dev/sdbx /mnt/folder_name) to successfully mount NTFS disk on your running Linux OS without reformatting your disk or losing your data.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

x