Ubuntu 下挂ISO到虚拟光驱的方法 https://i.cnblogs.com/EditPosts.aspx?opt=1

  如果要ubuntu找到rpm软件包,需要把iso挂载到/media/cdrom下面

root@ubuntu:~/test# lsblk

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   80G  0 disk
├─sda1   8:1    0   78G  0 part /
├─sda2   8:2    0    1K  0 part
└─sda5   8:5    0    2G  0 part [SWAP]
sr1     11:1    1  667M  0 rom  
sr2     11:2    1  667M  0 rom

root@ubuntu:~/test# mount /dev/sr1 /media/cdrom

mount: /dev/sr1 is write-protected, mounting read-only

root@ubuntu:~/test#  ls /media/cdrom

boot  dists  doc  EFI  install  isolinux  md5sum.txt  pics  pool  preseed  README.diskdefines  ubuntu

====================================================================================

相关链接:

Under linux mount (mount) CD-ROM image file. Removable hard disk. U disk. Windows and NFS network shareshttp://www.codeweblog.com/under-linux-mount-mount-cd-rom-image-file-removable-hard-disk-u-disk-windows-and-nfs-network-shares/

linux is an excellent open source operating system that can run on small to large to giant types of handheld computer systems, with the linux system, the growing maturity and stability as well as its unique advantages of open source, linux in the world been more widely used. Now many companies are from the UNIX system, computer systems, Linux systems and Windows system components of the hybrid system, different systems often need to exchange data. Here I offer my own practical experience tell us about how to mount the linux system (mount) CD-ROM image file, move the hard disk, U disk, and Windows network shares and UNIX NFS network shares.
Mount command (mount)
First of all, tell us about mount (mount) to use the command, mount command parameter is very large, here mainly to talk about today, we will use the.
Command format:
mount [-t vfstype] [-o options] device dir
Of which:
1.-t vfstype specified file system type, usually do not have to be specified. mount will automatically select the correct type. Common types are:
CD-ROM or CD-ROM image: iso9660
DOS fat16 file system: msdos
Windows 9x fat32 file system: vfat
Windows NT ntfs File System: ntfs
Mount Windows file network share: smbfs
UNIX (LINUX) file sharing network: nfs
2.-o options mainly used to describe the way of equipment or files attached. Commonly used parameters are:
loop: used to mount a file as a hard disk partition on the system ro: read-only mounted equipment using rw: read-write mounted device using iocharset: access to the file system used by the specified character set 3.device to mount (mount) equipment.
4.dir device on the system mount point (mount point).
CD-ROM image file attached disk technology in recent years great progress, new computer systems are equipped with large capacity disk systems, in Windows, many people are used to make the software and data through a virtual CD-ROM CD-ROM image file to use. This has many advantages: first, the drive to reduce wear and tear; two large storage capacity hard drives are now dozens of CD-ROM image file is not a problem, as used with the transfer is very convenient; Third, the hard drive is much higher than the CD-ROM read speed the read speed, CPU usage greatly reduced. In fact, the production and use linux system disc images more convenient than the Windows system, do not borrow any third-party packages.
1 CD-ROM image file from the CD-ROMs. The CD into the drive, execute the following command.
# Cp / dev / cdrom / home / sunky / mydisk.iso or # dd if = / dev / cdrom of = / home / sunky / mydisk.iso
Note: the implementation of any of the above command to the current drive can be made into a CD-ROM in the CD-ROM image file / home / sunky / mydisk.iso
2, the files and directories on CD-ROM image file, execute the following command.
# Mkisofs-r-J-V mydisk-o / home / sunky / mydisk.iso / home / sunky / mydir
Note: This command will / home / sunky / mydir directory of all the directories and files on CD-ROM image file / home / sunky / mydisk.iso, CD label is: mydisk
3, CD-ROM image file mounted (mount)
# Mkdir / mnt / vcdrom
Note: Create a directory used as a mount point (mount point)
# Mount-o loop-t iso9660 / home / sunky / mydisk.iso / mnt / vcdrom
Note: Use the / mnt / vcdrom can access the disk image file mydisk.iso in all the files.

Mount removable hard disk on linux systems, USB interface, removable hard disk is treated as a SCSI device. Into the mobile hard disk before you use the fdisk-l or more / proc / partitions View the system hard drive and hard disk partition situation.
[Root at pldyrouter /] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Here you can clearly see that the system has a SCSI hard disk / dev / sda and its four disk partition / dev/sda1 - / dev/sda4, / dev/sda5 is the partition / dev/sda4 logical partitions. Connected mobile hard disk, then fdisk-l or more / proc / partitions View the system hard drive and hard disk partitioning [root at pldyrouter /] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Disk / dev / sdc: 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/sdc1 1 510 4096543 + 7 HPFS / NTFS
/ Dev/sdc2 511 4864 3497 3505 f Win95 Ext'd (LBA)
/ Dev/sdc5 511 4864 3497 3473 + b Win95 FAT32
We should be able to find more than a SCSI hard disk / dev / sdc and its two disk partition / dev/sdc1?, / Dev/sdc2, where / dev/sdc5 is / dev/sdc2 partition logical partitions. We can use the following command mount / dev/sdc1 and / dev/sdc5.
# Mkdir-p / mnt/usbhd1
# Mkdir-p / mnt/usbhd2
Note: Create a directory used as a mount point (mount point)
# Mount-t ntfs / dev/sdc1 / mnt/usbhd1
# Mount-t vfat / dev/sdc5 / mnt/usbhd2
Note: ntfs formatted disk partition should use-t ntfs parameters, fat32 formatted disk partition should use-t vfat parameters. If the file name is displayed as garbled characters or no show, you can use the following command format.
# Mount-t ntfs-o iocharset = cp936 / dev/sdc1 / mnt/usbhd1
# Mount-t vfat-o iocharset = cp936 / dev/sdc5 / mnt/usbhd2
linux system partition using fdisk and mkfs command to create a command file system partition can be made into a mobile hard disk linux system unique to ext2, ext3 format. Thus, even more convenient to use linux. Use the following command can be directly attached.
# Mount / dev/sdc1 / mnt/usbhd1

U disk and mount removable hard disk USB interface on the linux systems, like U disk is treated as a SCSI device. Using the same methods and mobile hard disk. Insert U disk before you use the fdisk-l or more / proc / partitions View the system hard drive and hard disk partition situation.
[Root at pldyrouter root] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Into the U-hours, and then fdisk-l or more / proc / partitions View the system hard drive and hard disk partition situation.
[Root at pldyrouter root] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Disk / dev / sdd: 131 MB, 131072000 bytes
9 heads, 32 sectors / track, 888 cylinders
Units = cylinders of 288 * 512 = 147456 bytes
Device Boot Start End Blocks Id System
/ Dev/sdd1 * 1 889 127983 + b Win95 FAT32
Partition 1 has different physical / logical endings:
phys = (1000, 8, 32) logical = (888, 7, 31)
System more than a SCSI hard disk / dev / sdd, and a disk partition / dev/sdd1, / dev/sdd1 is what we want to mount the U disk.
# Mkdir-p / mnt / usb
Note: Create a directory used as a mount point (mount point)
# Mount-t vfat / dev/sdd1 / mnt / usb
Note: It can be / mnt / usb to visit U disk, and if the file name is displayed as garbled characters or no show, you can use the following command.
# Mount-t vfat-o iocharset = cp936 / dev/sdd1 / mnt / usb
Mount a network share Windows file sharing is the core of Windows SMB / CIFS, to be mounted under the linux (mount) windows disk sharing, you must install and use the samba package. Now most popular linux distributions already contain the samba package, if not installed install linux system, please first install samba samba. Of course, can also go to
www.samba.org ...... download the new version is 3.0.10 version.
When the windows system after sharing set, you can mount the linux client (mount), the specific operation is as follows:
# Mkdir-p / mnt / samba
Note: Create a directory used as a mount point (mount point)
# Mount-t smbfs-o username = administrator, password = pldy123 / / 10.140.133.23 / c $ / mnt / samba
Note: administrator and pldy123 is ip address 10.140.133.23 windows computer, a user name and password, c $ is a disk of this computer to share
So can the linux system through the / mnt / samba to access windows files on the system disk. Above operations in redhat as server 3, redflag server 4.1, suse server 9, and windows NT 4.0, windows 2000, windows xp, windows 2003 environment test.
NFS mount UNIX system similar to windows file sharing network to share, UNIX (Linux) system also has its own network sharing, that is NFS (Network File System), here we have the SUN Solaris2.8 and REDHAT as server 3 as an example a simple explain how to mount nfs in linux network share.
The client in linux mount (mount) NFS shared disk, you must configure NFS server.
1, Solaris NFS server system configuration is as follows:
(1) modify / etc / dfs / dfstab, increase the shared directory share-F nfs-o rw / export / home / sunky
(2) start the nfs service # / etc / init.d / nfs.server start
(3) NFS services started, you can use the following command to add new shared # share / export/home/sunky1
# Share / export/home/sunky2
Note: / export / home / sunky and / export/home/sunky1 is ready to share the directory 2, linux NFS server system configuration is as follows:
(1) modify / etc / exports, increase the shared directory / export / home / sunky 10.140.133.23 (rw)
/ Export/home/sunky1 * (rw)
/ Export/home/sunky2 linux-client (rw)
Note: / export / home / directory sunky, sunky1, sunky2 is ready to share the directory, 10.140.133.23, *, linux-client is allowed to mount this share linux client IP address or host name. If you want to use the host name linux-client to the server host in / etc / hosts file to increase linux-client host ip definition. The following format:
10.140.133.23 linux-client
(2) start and stop NFS service / etc / rc.d / init.d / portmap start (the default in the REDHAT started in PORTMAP)
/ Etc / rc.d / init.d / nfs start start the NFS service / etc / rc.d / init.d / nfs stop stop the NFS service NOTE: If modify / etc / export file to add new shares, should stop the NFS service, and then start NFS service can the sharing of the additional work. Use the command exportfs-rv can achieve the same effect.
3, linux client mount (mount) other linux system or UNIX system, NFS share # mkdir-p / mnt / nfs
Note: Create a directory used as a mount point (mount point)
# Mount-t nfs-o rw 10.140.133.9: / export / home / sunky / mnt / nfs
Note: Here we assume 10.140.133.9 is the NFS server host IP address, of course, here you can use the host name, but in the local / etc / hosts file to increase the definition of the server ip. / Export / home / sunky shared directory for the server.
So can the linux client through / mnt / nfs to access other linux system or UNIX system out of NFS Share file. Above operations in redhat as server 3, redflag server4.1, suse server 9, and Solaris 7, Solaris 8, Solaris 9 for x86 & sparc environment test.

Linux:如何挂载CD-ROM光盘驱动器 https://i.cnblogs.com/EditPosts.aspx?opt=1

如何在linux操作系统的命令行下挂载光盘驱动器呢?你需要使用mount命令来挂载CD或者DVD光盘驱动器,首先,你需要先插入CD或者DVD到光盘驱动器里,然手输入下面的mount命令来挂载光盘。

获取CD/DVD的设备名
  使用下面的命令来获取DVD/CD-ROM/Writer设备的名字:
  #lsblk
  或者
  #dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer

  命令输出:
  ata2.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
  sr0: scsi3-mmc drive: 1x/1x writer dvd-ram cd/rw xa/form2 cdda tray

在linux系统里挂载DVD/CDROM
#mount -t iso9660 -o ro /dev/设备名 /挂载目录名

创建挂载点,输入mkdir命令:
#mkdir -p /mnt/cdrom
挂载/dev/cdrom 或者/dev/sr0:
#mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
或者
#mount -t iso9660 -o ro /dev/sr0 /mnt/cdrom

使用下面的两个命令来验证光驱是否挂载在/mnt/cdrom上,输入下面的命令:
#mount
#df

如何卸载已经挂载的光驱?
输入下面的命令:
#umount /cdrom
或者
#umount /dev/cdrom
或者
#umount /mnt/cdrom

Vmware中Ubuntu挂ISO到虚拟光驱的更多相关文章

  1. VMware中Ubuntu忘记密码的解决办法

    在VMware中安装了Ubuntu 11.04,经过了一个长假,再次登录的时候居然进不去了,一开始不知道怎样在虚拟机中进入到Grub启动界面,网上搜索了一番,按照以下步骤重新为用户设定了新密码. 重启 ...

  2. vmware 中ubuntu客户机 安装vmware tool vmhgfs 共享文件夹失败处理

    vmware版本:10.0.0 build-1295980 ubuntu版本:3.13.0-62-generic 先安装的vmware workstation自带光盘中vmare tools包,安装完 ...

  3. putty 访问 vmware中ubuntu 方法

     putty访问虚拟机   从宿主机中用putty连接虚拟机中的Ubuntu. putty默认使用ssh方式连接,这需要在Ubuntu Server中安装ssh服务.使用命令sudo apt-get ...

  4. VMware中创建Ubuntu16.0.4虚拟桥连方式无法上网

    一.问题描述 在本地VMvare中已经安装了两台虚拟机,网络方式都是桥连,上网都可以自动获取IP地址 和HOST主机是一个号段的 ,同为192.168.1.X KingServer1(原始安装)  桥 ...

  5. VMware中Ubuntu开机时停在启动界面,不进入X-window的解决办法

    启动Ubuntu虚拟机时,停在这个画面不动: 试了若干次,都是这样.尝试了新建一个虚拟机然后把.vmdk文件拷过去启动,无法解决. 尝试重启,在这个界面按esc进入grub: 选择恢复模式 recov ...

  6. Vmware中Ubuntu的各种问题

    Question1: Ubuntu正在运行的时候手残强行关闭了Vmware软件,重启软件发现如下图所示的状态: ''' 完全黑屏怎么解决,提示信息是recovering journal就是说正在恢复日 ...

  7. vmware中ubuntu更新内核后无法进入桌面,鼠标“漂移”滑动

    问题背景: 我机子上是在vmware下安装了ubuntu12.04,今天正在ubuntu下工作,结果提示内核有更新,手贱的就点了个OK,开始更新,更新完重启.结果,问题来了,刚开始系统启动,进入系统登 ...

  8. VMware中Ubuntu 14.04出现Unknown Display问题解决

    如需转载请标明出处:http://blog.csdn.net/itas109 QQ技术交流群:129518033 今天安装完Ubuntu 14.04后,在虚拟机中显示不全,本来调节一下屏幕分辨率就可以 ...

  9. win10浏览器访问vmware中ubuntu开启的某个服务端口出现的问题

    问题描述 1. win10系统中浏览器能正常访问  ubuntu中nginx服务器的80端口, 但是不能访问8082 问题原因 ubuntu 防火墙默认没有启用 8082端口, 需要开启这个端口号 解 ...

随机推荐

  1. hdu 4545 魔法串 2013金山西山居创意游戏程序挑战赛——初赛(1)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4545 这题太坑了,小明的串可以任意删掉某个字符 这句话不知道大家是怎么理解的,我觉得应该是能够删除其中 ...

  2. QT完美转换特殊字符的大小写

    Util::ShowMessage(QString::fromUtf8("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØŒŠþÙÚÛÜÝŸ€")); Util::ShowMess ...

  3. HDU 5768 Lucky7(CRT+容斥原理)

    [题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=5768 [题目大意] 求出一个区间内7的倍数中,对于每个ai取模不等于bi的数的个数. [题解] 首 ...

  4. Linux中环境变量到底写在哪个文件中?解析login shell 和 no-login shell

    login shell:取得bash 时需要完整的登入流程,就称为login shell.举例来说,同tty1~tty6登入时, 需要输入用户名和密码,此时取得的bash就称为login shell ...

  5. Forstner算子

  6. STL中主要的算法(一)

    一.replace() 替换算法将指定元素值替换为新值,使用原型例如以下,将迭代器[first,last)中值为old_value的元素所有替换为new_value值. 函数原型: template  ...

  7. CSS learnning...

    "Whenever this property changes, apply that change slowly." The property transition: width ...

  8. zoj 2376 Ants

    #include<stdio.h> #include<stdlib.h> ]; int main(void) { int t,n,m,i,len,max,min,mx,mi; ...

  9. Unity Editor下对资源进行操作时调用AssetModificationProcessor

    public class Test : UnityEditor.AssetModificationProcessor { private static void OnWillCreateAsset(s ...

  10. 小猪猪C++笔记基础篇(五)表达式、语句

    小猪猪C++笔记基础篇(五) 关键词:表达式.语句 本章的内容比较简单,基本上没有什么理解上的困难,都是知识上的问题.先开始想要不要写呢,本来是不准备写的,但是既然读了书就要做笔记,还是写一写,毕竟还 ...