挂载光盘
mkdir /mnt/dvd ##建立挂载点
mount -t iso9660 /dev/sr0 /mnt/dvd ##挂载光盘,mount <-t 文件系统> <-o 选项> < 设备文件名> < 挂载点>
mount: block device /dev/sr0 is write-protected, mounting read-only ##挂载成功
cd /mnt/dvd ##切换至挂载点
ls ##查看挂载光盘内容
autorun.inf  boot  casper  dists  EFI  install  isolinux  md5sum.txt  pics  pool  preseed  README.diskdefines  ubuntu  wubi.exe
##-t 的文件系统可分为系统 ext3、ext4,光盘为 iso9660

卸载光盘
umount < 设备文件名或挂载点> ##umount /mnt/dva 或 umount /dev/sr0
[root@localhost dvd]# umount /dev/sr0
umount: /mnt/dvd: device is busy. ##卸载时报错设备正忙,这是由于当前工作目录为光盘,所以无法卸载,切换到其他目录即成功卸载
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

挂载 U 盘
fids -l ##先从系统查看已经插入的设备文件名
mount it vfat /dev/sdb1
[root@localhost ~]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00042b31

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          39      307200   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              39        6275    50088960   83  Linux
/dev/sda3            6275        6528     2031616   82  Linux swap / Solaris

Disk /dev/sdb: 31.5 GB, 31474057216 bytes
129 heads, 14 sectors/track, 34038 cylinders
Units = cylinders of 1806 * 512 = 924672 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf818f818

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *         435       34039    30344192    7  HPFS/NTFS

##可以查到目录系统中已经插入的两块磁盘,/dev/sda 和 /dev/sdb,可 sdb 为目前插入的 U 盘,32G,文件类型为 NTFS,但是 Linux 不支持 NTFS,所以挂载了也用不了。

mkdir /mnt/usb ##创建挂载点
[root@localhost ~]# mount -t vfat /dev/sdb1 /mnt/udisk/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
由于不支持 NTFS 文件系统,所以即使挂载了也无法使用。


友情提示:本站所有文章,如无特殊说明或标注,均为何星星原创发布。与此同时,趋于近年来本站的文章内容频繁被他站盗用与机器采集,现已全局禁用网站文字内容操作,了解详情或转载文章请 点此 继续!

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用*标注