zoukankan      html  css  js  c++  java
  • Linux温馨提示1--安装U板块和Windwos划分


    一、安装U盘

    现在我用Ubuntu12.04在插入U光盘将被直接安装到/media/下,
    10:33linc@Linc-Ubuntu:linc$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sdc        947M  638M  310M  68% /media/72D2-11E2
    /dev/sdb        5.0G  1.5G  3.5G  31% /media/8221-13E3
    但老古董如我的Fedora14却不会这样,所以我仅仅有手动将其挂到/mnt/usb/下。
    以我的三星手机为例,步骤例如以下:

    1.连上数据线,查看系统是否识别:

    10:31linc@Linc-Ubuntu:linc$ lsusb
    Bus 001 Device 004: ID 04e8:681c Samsung Electronics Co., Ltd Galaxy Portal/Spica/S

    2.fdisk查看磁盘名称

    10:32linc@Linc-Ubuntu:linc$ sudo fdisk -l
    ...
    Disk /dev/sdb: 5354 MB, 5354029056 bytes
    165 heads, 62 sectors/track, 1022 cylinders, total 10457088 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    
    Disk /dev/sdc: 993 MB, 993001472 bytes
    31 heads, 62 sectors/track, 1009 cylinders, total 1939456 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    从结果看出,手机有两个磁盘。一个手机自带的存储。一个是外加的SDCard。


    3.mount

    创建文件夹来放置挂载的文件
    sudo mkdir /mnt/usb
    挂载:
    sudo mount /dev/sdc /mnt/usb/
    完成!

    二、挂载Windows分区

    原理同上,仅仅只是我们要找到Windows分区的磁盘名,例如以下:
    11:24linc@Linc-Ubuntu:~$ sudo fdisk -l
    
    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0xf1eff1ef
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63   204812684   102406311    7  HPFS/NTFS/exFAT
    Partition 1 does not start on physical sector boundary.
    /dev/sda2       204812746  1953523711   874355483    f  W95 Ext'd (LBA)
    Partition 2 does not start on physical sector boundary.
    /dev/sda5       204812748   724724279   259955766    7  HPFS/NTFS/exFAT
    Partition 5 does not start on physical sector boundary.
    /dev/sda6       724725760  1933993983   604634112   83  Linux
    /dev/sda7      1933996032  1953523711     9763840   82  Linux swap / Solaris
    
    HPFS/NTFS/exFAT的两个device就是Windows的分区,将当中一个mount进来也同U盘一样。
    sudo mount /dev/sda5 /mnt/win
    sudo umount /mnt/win/
    开机自己主动挂载

    我们仅仅须要在改动/etc/fstab文件就可以。加入例如以下内容:

    #for the windows
    /dev/sda5     /mnt/win auto defaults 0 1 


    三、格式化U盘

    格式化成Windows可以识别的格式。用fat吧。命令例如以下:

    $ sudo fdisk -l
    ...
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          32    31948799    15974384    c  W95 FAT32 (LBA)
    

    $ sudo umount /dev/sdb1
    
    $ sudo mkfs -V -t vfat /dev/sdb1
    mkfs (util-linux 2.20.1)
    mkfs.vfat /dev/sdb1 
    mkfs.fat 3.0.26 (2014-03-07)
    


  • 相关阅读:
    js json和对象互相转换
    github配置和git学习
    sea.js,spm学习
    less学习-语法(二)
    less学习-浏览器端编译(一)
    grunt-mac上安装运行构建工具的总结(一)
    Advice from an Old Programmer
    scikit-FEM-例2-用Morley元在方形区域上解板弯曲问题
    scikit-FEM-例1-求解Possion边值问题
    在shell脚本中调用sqlplus 分类: H2_ORACLE 2013-06-23 13:01 1437人阅读 评论(0) 收藏
  • 原文地址:https://www.cnblogs.com/blfshiye/p/5044811.html
Copyright © 2011-2022 走看看