How Do I Access My Windows Partitions?

If you are running Ubuntu on a computer with a Windows disk, you may want to read and write to the disk. Ubuntu can safely read the Windows NT NTFS partitions and can read and write to Windows 95/98/2000 FAT32 partitions.

First, load a terminal, and use the fdisk command to know what partitions you currently have:

foo@bar:~$ sudo fdisk -l

The output should be similar to this:

Disk /dev/hda: 81.9 GB
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1306 10490413+ 7 HPFS/NTFS
/dev/hda2 1307 1311 40162+ 83 Linux
/dev/hda3 1312 1344 265072+ 82 Linux swap
/dev/hda4 1345 9964 69240150 f W95 Ext'd (LBA)
/dev/hda5 1345 1606 2104483+ b W95 FAT32
/dev/hda6 1607 2852 10008463+ 83 Linux
...

In this output, the /dev/hda1 partition (the first partition on the first disk) is a 10GB Windows NTFS partition (probably called C:) and /dev/hda5 is a 2GB FAT32 partition (probably called D:).

When you access a disk, you need to mount it first. To mount it, you need to indicate a directory where the files from the disk are accessedthis is called a mount point. Create mount points in /media for the Windows partitions. It is good to use /media/C for C: and /media/D for D:, etc. to make things easy to remember.

foo@bar:~$ sudo mkdir /media/C /media/D

To make the disks accessible when you boot the computer, you need to add a few lines to /etc/fstab. This file indicates which disks are available. Add the following two lines:

/dev/hda1     /media/C     ntfs     nls=utf8,umask=0222    0     0
/dev/hda5 /media/D vfat defaults,umask=0000 0 0

The fourth column lets you specify options for mounting the partition, and nls=utf8,umask=0222 means that any user can read the NTFS partition.

To mount the two partitions without restarting, run the following command:

foo@bar:~$ sudo mount -a

The two partitions are now available and will be automatically mounted the next time Ubuntu is restarted.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值