Showing posts with label ntfs. Show all posts
Showing posts with label ntfs. Show all posts

Thursday, 24 July 2008

Viewing your Drives

sudo fdisk -l
(For posterity.) I forget this command.

And. Well. Forgetting this command is a little more understandable (I use it to mount my NTFS drive):
sudo mount /dev/hdb1 /media/kat120data/ -t ntfs -o nls=utf8,umask=0222
(all one line)

For those of you who don't know, drives connected with an IDE cable are listed as hda, hdb, (etc.) Their partitions have a number... for example, hda1, hda2, hda3... Drives that are connected via USB (external) or SATA (internal) connectors are labeled with 's', for example: sda1. There are a lot more filesystems than this, and they require different commands for mounting properly.

Be warned that NTFS drives (formatted under Windows NT or Windows 2000) don't necessarily have reliable write access under Linux. They're working on it. You can install some packages to mess around with it. Hard drives formatted with FAT32 (Windows XP, Windows 98, Windows 95...) have reliable read/write access when mounted in Linux.

Because of ext3 (Linux filesystem) benefits, I was really wound up to format my new USB external hard drive in ext3. Upon opening the box and reading the documentation, it is already formatted in FAT32. I've decided to leave it this way because I want my friends to be able to easily read the data off my drive (in case I cart it over to their place). Windows and ext3 don't intrinsically get along.

Most of us have only heard about FAT32 and NTFS, but the amount of computer filesystems is huge.

Tuesday, 15 January 2008

Mounting ntfs Drives in Kubuntu

Find the device and its partition in a terminal window:
sudo fdisk -l
Bootable devices will be marked. The actual drive used to boot will have partitions split up into swap space. IDE devices often (but not always) start with 'h', SATA devices and USB flash drives start with 's'. fdisk will indicate which file format the drive is formatted in. Hard drive letters indicate a specific device (i.e. a hard drive), numbers represent different partitions used in that device. Subsequent letters indicate addtional devices, and will likely be added incrementally (for example, if you have a SATA hard drive mounted first and then attach a USB flash drive, the hard drive should be sda, and the flash drive should end up being sdb.)

Numbers indicate a partition of that particular mounted device. Linux will reserve room for swap space and a boot sector in addition to the filesystem where you will store your files.

Mount the device to a destination folder. Replace 'hda1' below with the drive you wish to mount, and change the '/home/...' directory to where you want to mount the files to (the directory in this case will act like a link or bookmark). The folder in the home user's directory will be "ubuntu" (not your computer name) if it's running off a live cd.
sudo mount /dev/hda1 /home/ubuntu/Desktop/folder -t ntfs
-o nls=utf8,umask=0222
This is for mounting ntfs drives only!

(I've found other commands to "mount an ntfs drive", but they don't seem to work.)