Debian5.03(lenny)下自动挂载ntfs分区

1.通过debian包管理安装ntfs-3g程序,在命令行执行apt-get install ntfs-3g

2.在终端执行fdisk -l

debian:~# fdisk -l

Disk /dev/hda: 40.0 GB, 40007761920 bytes
240 heads, 63 sectors/track, 5168 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x8f800000

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2032    15361888+   7  HPFS/NTFS
/dev/hda2            2033        5168    23708129    f  W95 Ext'd (LBA)
/dev/hda5            2033        3387    10243768+   7  HPFS/NTFS
/dev/hda6            3388        4420     7807558+  83  Linux
/dev/hda7            4421        4938     3911796   83  Linux
/dev/hda8            4938        5168     1743021   82  Linux swap / Solaris

3.在/mnt下创建挂载目录

mkdir /mnt/C

mkdir /mnt/D

4.编辑挂载脚本文件/etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /mnt/C          ntfs-3g defaults    0    0
/dev/hda5       /mnt/D          ntfs-3g defaults    0    0

/dev/hda6       /               ext3    errors=remount-ro 0       1
/dev/hda7       /doc            ext3    defaults        0       2
/dev/hda8       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

5.重启系统

你可能感兴趣的:(Debian5.03(lenny)下自动挂载ntfs分区)