Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Accessing hard disk

Apr 1, 2007 3:51AM PDT

I'm new to Linux. I've using Fedore Core 6. I cannot access my other NTFS partitions ( used by Windows XP) from Linux. How can I do that? Please help.

Discussion is locked

- Collapse -
the old fashioned way
Apr 1, 2007 9:53AM PDT

The MS-Windows NTFS is a trade secret file system. There are a couple of projects to reverse engineer it. The one in the stock Linux kernel lets you read files, and overwrite files with new ones exactly the same size. There's a new one claiming full read-write capability. If FC6 has that, they'd tell you in the release notes. If not, play it safe and mount the partition read-only.

Since I don't know which desktop environment you use, if any, we'll do it the old fashioned way.

Get a shell. Do that by opening your "terminal" of choice. I like xterm. You might like Konsole or GNOME Terminal or eterm. Or control-alt-F2 and use a console. (Probably alt-F7 gets you back to your X Window System.)

Take a look at your file /etc/fstab. (File system table.) Maybe FC6' installer made a line in there like

/dev/hda1 /mswindoze ntfs defaults,ro,user,noauto 0 0

/dev/hda1 is the first partition on the first Parallel ATA drive. If it's there and correct, type "mount /mswindoze" (into your shell) and look in the directory /mswindoze. If the word "user" is missing from the options list in that line in /etc/fstab, you will have to be root to do the mount. Or maybe FC6 set you up with sudo. Try "sudo mount /mswindoze" and if sudo doesn't do it, use su (substitute user) to do it as root. Such as "su mount /mswindoze"

If there is no such line in /etc/fstab, you have to find your NTFS partition and spell out how you want it mounted. Is it on the first drive? What is the output of "fdisk -l /dev/hda"? The second drive on the first ATA channel is /dev/hdb. Or if you use Serial ATA drives, which Linux uses via its SCSI subsystem, they might be /dev/sda and /dev/sdb. Guess what, you have to be root to run fdisk. We don't want unprivileged users snooping each other's files through the raw disk device.

So let's say it's the fourth partition on your second Parallel ATA drive and FC6 didn't do anything helpful. First make a directory where you want the partition to show up. Let's call it /c-colon. We'll make the directory, mount the partition, and look inside. You will have to be root or maybe use sudo to get away with this:

mkdir /c-colon
mount -r -t ntfs /dev/hdb3 /c-colon
ls /c-colon

About now you're wondering what the modern way was. In KDE, you right-click on the desktop and pick the "create new device hard disk" item from the popup menu. This should (if FC6 set up KDE properly) create a little picture of a hard drive on your desktop. You still have to know which partition you want, though. Click on it once and a Konqueror desktop browser will open on it. GNOME has something like that too.

- Collapse -
Still searching for a solution
Apr 3, 2007 3:08AM PDT

Thanks for your reply. But still I cannot access my SATA hard disk.

Here is the /etc/fstab file contents:

LABEL=/ / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-sda10 swap swap defaults 0 0

Output for fdisk -l /dev/sda:

Disk /dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2629 21117411 7 HPFS/NTFS
/dev/sda2 2630 20023 139717305 f W95 Ext'd (LBA)
/dev/sda5 2630 5893 26218048+ 7 HPFS/NTFS
/dev/sda6 5894 9157 26218048+ 7 HPFS/NTFS
/dev/sda7 9158 10942 14337981 83 Linux
/dev/sda8 10943 12779 14755671 82 Linux swap / Solaris
/dev/sda9 12780 16401 29093683+ 7 HPFS/NTFS
/dev/sda10 16402 20023 29093683+ 7 HPFS/NTFS

Message for mounting with "mount -r -t ntfs /dev/sda1 /mnt/C" or "mount -r -t ntfs /dev/sda5 /mnt/C":

mount: unknown filesystem type 'ntfs'

But the man page for mount states that it recognizes ntfs file system.

I also tried with KDE, like you said. But I don't understand which device I need to mount. Under device tab, there is a combo box that shows the options listed in /etc/fstab file. Please show me a way to access my hard disk!

Thanks in advance.