免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1094 | 回复: 0
打印 上一主题 下一主题

在linux下自动加载windows分区 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-25 18:59 |只看该作者 |倒序浏览

                                                一、需要了解到一个命令
------------------------------
1、fdisk -l   (查看磁盘分区情况)
   
               
               
                [root@localhost javier]# /sbin/fdisk -l
      
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
      
   Device Boot     
Start        
End      Blocks   Id  System
/dev/hda1  
*         
1      
1148     9221278+   7  HPFS/NTFS
/dev/hda2           
1149        4864   
29848770    f  W95 Ext'd (LBA)
/dev/hda5           
1149        3061   
15366141    b  W95 FAT32
/dev/hda6           
3062      
3074      104391   83  Linux
/dev/hda7           
3075        4864   
14378143+  8e  Linux LVM
      
2、mount (磁盘分区的挂载命令)
mount 挂载磁盘分区的用法:
mount -t 文件格式 -o 选项参数 磁盘分区 挂载点目录名
3、df -lh (磁盘使用情况的命令)
[root@localhost javier]# df -lh
Filesystem            容量  已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
                     
12G  4.6G  6.7G  41% /
/dev/hda6            
99M   14M   80M  15% /boot
/dev/shm            
371M     0  371M   0% /dev/shm
/dev/hdc            
2.6M  2.6M     0 100% /media/cdrecorder
/dev/hda5            
15G   14G  1.1G  93% /mnt/windowsD
      
二、NTFS和FAT32格式文件系统的加载
-----------------------------------
1、建立挂载点的目录
   [root@localhost javier]# mkdir /mnt/windowsC      (这个目录用来挂载NTFS的C盘)
   [root@localhost javier]# mkdir /mnt/windowsD      (这个目录用来挂载FAT32的D盘)
2、执行mount命令进行挂载
   NTFS:
    [root@localhost javier]#
        mount -t ntfs -o nls=utf8,umask=000 /dev/hda1 /mnt/windowsC
    (把/dev/hda1 挂载到 /mnt/windowsC中,可以看到/dev/hda1也就是c盘里面到内容)
   FAT32:
    [root@localhost javier]#
        mount -t vfat -o iocharset=utf8,umask=000 /dev/hda5 /mnt/windowsD
    (把/dev/hda5 挂载到 /mnt/windowsD中,可以看到/dev/hda5也就是D盘里面到内容)
3、可以用df -lh看是否挂载成功
三、开机自动加载挂好到分区
------------------------
在/etc/fstab文件中加入;
/dev/hda1 /mnt/windowsC ntfs umask=000,nls=utf8 0 0
/dev/hda5 /mnt/windowsD vfat umask=000,iocharset=utf8 0 0
四、将磁盘分区放在javier用户的桌面
---------------------
[javier@localhost ~]$ ln -s /mnt/windowsC/ ~javier/Desktop/windowsC
[javier@localhost ~]$ ln -s /mnt/windowsD/ ~javier/Desktop/windowsD
注:如果文本文件出现乱码,把他改为utf8格式
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/45104/showart_367638.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP