Mounting other hard disks

Discussion regarding the installation and configuration of Linux distributions.
Post Reply
farhanansari
Cadet
Posts: 4
Joined: Tue Mar 04, 2008 7:59 pm

Mounting other hard disks

Post by farhanansari »

If I have two hardisks and in one hdd I have linux and i want to mount the other hardisk with partitions both ntfs and fat32. how can i do such
Muhammad Saad
Battalion Havaldaar Major
Posts: 273
Joined: Sat Jan 27, 2007 11:07 pm
Location: Dera Ismail Khan, Pakistan
Contact:

Post by Muhammad Saad »

Assalam-o-Alaikum Farhan Ansari,
You can do it by mount command. For example:

Code: Select all

mount /dev/hda1 /mnt/c
If you want the partitions to be automatically mounted on each boot, you will have to edit the file /etc/fstab. But before that you will have to keep some things in mind. For example:
If C drive is on first hard disk, it will probably be /dev/hda1. D drive will be /dev/hda5, E will be /dev/hda6, F will be /dev/hda7 and so on.
NTFS support in some old Linux distributions will be limited to read-only. If possible, you should use FAT file system.

Here is an example of what to add to /etc/fstab:

Code: Select all

/dev/hda1		/mnt/c-drive			auto	iocharset=utf8,umask=000	0 0
/dev/hda5		/mnt/d-drive			auto	iocharset=utf8,umask=000	0 0
The first column represents the hard disk device as I have already mentioned. The second column is the mount point, i.e; the directory where you will mount the partition. Third column is for file-system. You can set it to auto to detect the file-system automatically. Fourth column is for other advanced options. To know details about these options, type man mount at the terminal. About the other two columns, I only know that they should be 0 0 for windows disk.

For more details about the process, type man mount or man fstab at the terminal to read a detailed manual.
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Mounting Windows Partition in linux

Post by x2oxen »

If you have 2.6.20 or above kernel then you going to do it now time by

For NTFS

mount -t ntfs /path/to/your/device /mount/point

e.g.

Code: Select all

mount -t ntfs /dev/hda1 /mnt/ntfs
and for Fat32

Code: Select all

mount -t vfat /dev/hda1 /mnt/vfat
If you have below kernel than 2.6.20 then install ntfs-3g and use it for mounting ntfs partition. And now if you want to mount partition permanently then add the entry for your partition in your /etc/fstab file.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
outhanger
Battalion Quarter Master Havaldaar
Posts: 214
Joined: Sun Apr 18, 2004 5:58 pm
Location: CEME, Pindi

Post by outhanger »

x2oxen wrote:If you have below kernel than 2.6.20 then install ntfs-3g
I don't think that is correct. All 2.6.x kernels I have used contained ntfs drivers.
"Where blasphemy is a crime, religious freedom does not exist." - Stallman to Musharraf
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

below 2.6.20 kernels won't let you write on it or else you have to add ntfs-3g support in those 2.6.20 and above have that builtin
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
outhanger
Battalion Quarter Master Havaldaar
Posts: 214
Joined: Sun Apr 18, 2004 5:58 pm
Location: CEME, Pindi

Post by outhanger »

x2oxen wrote:below 2.6.20 kernels won't let you write on it or else you have to add ntfs-3g support in those 2.6.20 and above have that builtin
Where are you getting that information from? Kernels <2.6.20 definitely had ntfs write support although it was labelled 'EXPERIMENTAL' or such.
And this is what the latest stable kernel (2.6.25) says in "Documentation/filesystems/ntfs.txt":
The biggest limitation at present is that files/directories cannot be created or deleted.
So, there is still only limited ntfs write support in the kernel but it is safe to use it now.
"Where blasphemy is a crime, religious freedom does not exist." - Stallman to Musharraf
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

i didn't said 2.6.20 don't have i said below 2.6.20 read it again.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
outhanger
Battalion Quarter Master Havaldaar
Posts: 214
Joined: Sun Apr 18, 2004 5:58 pm
Location: CEME, Pindi

Post by outhanger »

LOL, this discussion is going nowhere.. Read what I wrote:
"Kernels <2.6.20" means kernels with lower version than 2.6.20 :)
"Where blasphemy is a crime, religious freedom does not exist." - Stallman to Musharraf
Post Reply