个人工具
登录
查看“UbuntuHelp:MountNtfsOnBoot”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:MountNtfsOnBoot”的源代码
来自Ubuntu中文
←
UbuntuHelp:MountNtfsOnBoot
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
#REDIRECT [[UbuntuHelp:MountingWindowsPartitions]] THIS PAGE IS OBSOLETE https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconWarning3.png '''12.28.2005: This page needs review and clean up, be careful while implementing steps!''' == Introduction == This page describes how to automatically mount an MS Windows partition in Linux on boot. It is written for NTFS only because <ol><li>Linux does not support writing to an NTFS partition yet </li><li>Most newcomers use NTFS as the basis of their dual booting Windows'ed computers.</li></ol> <!> Please note that you will need to use the terminal and commands to do the steps. Using the command line (CLI) is a nice way to learn linux, at least if you have time and will. I will try to be as descriptive as possible... For more information on the command line see: * [[UbuntuHelp:BasicCommands|BasicCommands]] * [[UbuntuHelp:AdvancedCommandlineHowto|AdvancedCommandlineHowto]] <!> You can also find a script for this at : [[UbuntuHelp:AutomaticallyMountPartitions|AutomaticallyMountPartitions]] == Mounting an NTFS partition == === Where is the partition? === Use the output of this command to learn where your NTFS partition is <pre><nowiki> sudo fdisk -l </nowiki></pre> /!\ Please be careful as fdisk is a dangerous tool https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png In the following example, /dev/hda2 is an NTFS partition: <pre><nowiki> /dev/hda2 2612 6527 31455270 7 HPFS/NTFS </nowiki></pre> === Prepare the Mount Directory and fstab entry === Once you locate your NTFS partition: <pre><nowiki> sudo mkdir /mnt/ntfs1 </nowiki></pre> this will create a new directory called ntfs1 (1 is number one) under /mnt (the standard directory for mounting filesystems). then: <pre><nowiki> sudo cp /etc/fstab /etc/fstab_backup1 </nowiki></pre> this will back up your fstab (a configuration file Linux uses to mount filesystems on boot) as fstab_backup1 (1 is number one). then: <pre><nowiki> gksudo gedit /etc/fstab </nowiki></pre> this will open the fstab file. Goto the end of the file, copy paste this as one line: <pre><nowiki> /dev/hda2 /mnt/ntfs1 ntfs ro,nls=utf8,umask=0222 0 0 </nowiki></pre> and change '''/dev/hda2''' with your own ntfs partition. Save and close the file. ==== About fstab backup ==== If you need to recover your backup file, use: <pre><nowiki> sudo rm /etc/fstab sudo cp /etc/fstab_backup1 /etc/fstab </nowiki></pre> === Mounting === Finish the process with: <pre><nowiki> sudo mount -a </nowiki></pre> which will mount every unmounted entry in the fstab. You can check which partitions are mounted after this with: <pre><nowiki> mount </nowiki></pre> which will give you a list of mounted filesystem. After following these steps, if <code><nowiki> mount -a </nowiki></code> mounted your ntfs partition, it will automatically be mounted on every boot. == Writing to NTFS == https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconWarning3.png Your ntfs partition is under /mnt/ntfs1 but it can only be read-only (i.e. you will not be able to change '''anything''' in it) because linux does '''not''' support writing to this filesystem (except experimentally, which means ''dangerous''). But Linux can write to FAT32, so you can use a flash drive or similar (a FAT32 formatted partition) as an intermediary between Linux and MS Windows. == Go for help == https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconHelp.png If something goes wrong, go for help at http://ubuntuforums.org. Please post exactly what you did (copy-paste) and the errors along with the output of: <pre><nowiki> sudo fdisk -l cat /etc/fstab mount | sort </nowiki></pre> {{From|https://help.ubuntu.com/community/MountNtfsOnBoot}} {{Languages|UbuntuHelp:MountNtfsOnBoot}} [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:MountNtfsOnBoot
。