Troubleshooting to get rid of failed to mount CD error due to CD repo in zypper.
Error :
While trying to install the package in zypper I came across below error :
Failed to mount cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001 on /var/adm/mount/AP_0xFre2nn: Mounting media failed (mount: no medium found on /dev/sr0)
Detailed error snippet below :
# zypper in salt-minion
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 16 NEW packages are going to be installed:
libzmq3 python-Jinja2 python-MarkupSafe python-PyYAML python-backports.ssl_match_hostname python-futures python-msgpack-python python-netaddr python-psutil
python-pycrypto python-pyzmq python-requests python-simplejson python-tornado salt salt-minion
The following 2 recommended packages were automatically selected:
python-futures python-netaddr
The following 15 packages are not supported by their vendor:
libzmq3 python-Jinja2 python-MarkupSafe python-PyYAML python-backports.ssl_match_hostname python-futures python-msgpack-python python-psutil python-pycrypto
python-pyzmq python-requests python-simplejson python-tornado salt salt-minion
16 new packages to install.
Overall download size: 9.0 MiB. Already cached: 0 B. After the operation, additional 48.0 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package python-netaddr-0.7.10-8.5.noarch (1/16), 896.9 KiB ( 4.2 MiB unpacked)
Failed to mount cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001 on /var/adm/mount/AP_0xFre2nn: Mounting media failed (mount: no medium found on /dev/sr0)
Please insert medium [SLES12-SP1-12.1-0] #1 and type 'y' to continue or 'n' to cancel the operation. [yes/no] (no): n
Problem occured during or after installation or removal of packages:
Installation aborted by user
Please see the above error message for a hint.
Cause :
This error is nothing but zypper trying to read repo information from CD/DVD. Since one of the zypper repo is configured to look for mountable media, it’s doing its job. But, currently, that media is not connected to the system, and hence zypper is failing to read details from it.
Solution :
List your zypper repo using the command :
# zypper lr --details
# | Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service
--+----------------------+----------------------+---------+-----------+---------+----------+--------+----------------------------------------------------------------------------------------+--------
1 | SLES12-SP1-12.1-0 | SLES12-SP1-12.1-0 | Yes | (r ) Yes | No | 99 | yast2 | cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001 |
2 | sles12-sp1-bootstrap | sles12-sp1-bootstrap | Yes | ( p) Yes | No | 99 | rpm-md | http://repo.kerneltalks.com/pub/repositories/sle/12/1/bootstrap |
Here you can see first repo’s URI is pointing to a CD. Now you can mount the CD or you can disable that repo for time being and move ahead with the installation.
Use the below command to disable CD repo. Make sure you enter correct repo number in command (here it’s 1)
# zypper mr --disable 1
Repository 'SLES12-SP1-12.1-0' has been successfully disabled.
Once CD/DVD repo is disabled successfully, re-run zypper installation command and you will be able to execute it without any errors!
# zypper in salt-minion
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 15 NEW packages are going to be installed:
libzmq3 python-Jinja2 python-MarkupSafe python-PyYAML python-backports.ssl_match_hostname python-futures python-msgpack-python python-psutil python-pycrypto
python-pyzmq python-requests python-simplejson python-tornado salt salt-minion
The following recommended package was automatically selected:
python-futures
The following 15 packages are not supported by their vendor:
libzmq3 python-Jinja2 python-MarkupSafe python-PyYAML python-backports.ssl_match_hostname python-futures python-msgpack-python python-psutil python-pycrypto
python-pyzmq python-requests python-simplejson python-tornado salt salt-minion
15 new packages to install.
Overall download size: 8.1 MiB. Already cached: 0 B. After the operation, additional 43.8 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package python-backports.ssl_match_hostname-3.4.0.2-17.1.noarch (1/15), 10.4 KiB ( 14.3 KiB unpacked)
Retrieving: python-backports.ssl_match_hostname-3.4.0.2-17.1.noarch.rpm ..................................................................................[done]
Retrieving package python-futures-3.0.2-7.1.noarch (2/15), 23.5 KiB ( 85.6 KiB unpacked)
Retrieving: python-futures-3.0.2-7.1.noarch.rpm ..........................................................................................................[done]
Retrieving package python-requests-2.11.1-6.20.1.noarch (3/15), 396.8 KiB ( 1.9 MiB unpacked)
Retrieving: python-requests-2.11.1-6.20.1.noarch.rpm .....................................................................................................[done]
Retrieving package libzmq3-4.0.4-6.1.x86_64 (4/15), 278.6 KiB (676.6 KiB unpacked)
Retrieving: libzmq3-4.0.4-6.1.x86_64.rpm .................................................................................................................[done]
Retrieving package python-MarkupSafe-0.18-7.1.x86_64 (5/15), 24.6 KiB ( 66.0 KiB unpacked)
Retrieving: python-MarkupSafe-0.18-7.1.x86_64.rpm ........................................................................................................[done]
Retrieving package python-PyYAML-3.12-25.1.x86_64 (6/15), 154.6 KiB (625.5 KiB unpacked)
Retrieving: python-PyYAML-3.12-25.1.x86_64.rpm ...........................................................................................................[done]
Retrieving package python-msgpack-python-0.4.6-2.1.x86_64 (7/15), 67.0 KiB (221.0 KiB unpacked)
Retrieving: python-msgpack-python-0.4.6-2.1.x86_64.rpm ...................................................................................................[done]
Retrieving package python-psutil-1.2.1-9.1.x86_64 (8/15), 100.3 KiB (444.6 KiB unpacked)
Retrieving: python-psutil-1.2.1-9.1.x86_64.rpm ...........................................................................................................[done]
Retrieving package python-pycrypto-2.6.1-4.1.x86_64 (9/15), 371.5 KiB ( 2.0 MiB unpacked)
Retrieving: python-pycrypto-2.6.1-4.1.x86_64.rpm .........................................................................................................[done]
Retrieving package python-simplejson-3.8.2-4.1.x86_64 (10/15), 105.0 KiB (384.5 KiB unpacked)
Retrieving: python-simplejson-3.8.2-4.1.x86_64.rpm .......................................................................................................[done]
Retrieving package python-pyzmq-14.0.0-3.1.x86_64 (11/15), 510.3 KiB ( 1.5 MiB unpacked)
Retrieving: python-pyzmq-14.0.0-3.1.x86_64.rpm ...........................................................................................................[done]
Retrieving package python-Jinja2-2.7.3-17.1.noarch (12/15), 278.5 KiB ( 1.7 MiB unpacked)
Retrieving: python-Jinja2-2.7.3-17.1.noarch.rpm ..........................................................................................................[done]
Retrieving package python-tornado-4.2.1-9.1.x86_64 (13/15), 547.1 KiB ( 2.8 MiB unpacked)
Retrieving: python-tornado-4.2.1-9.1.x86_64.rpm ..........................................................................................................[done]
Retrieving package salt-2016.11.4-45.2.x86_64 (14/15), 5.2 MiB ( 31.4 MiB unpacked)
Retrieving: salt-2016.11.4-45.2.x86_64.rpm ...............................................................................................................[done]
Retrieving package salt-minion-2016.11.4-45.2.x86_64 (15/15), 107.8 KiB ( 36.9 KiB unpacked)
Retrieving: salt-minion-2016.11.4-45.2.x86_64.rpm ........................................................................................................[done]
Checking for file conflicts: .............................................................................................................................[done]
( 1/15) Installing: python-backports.ssl_match_hostname-3.4.0.2-17.1 .....................................................................................[done]
( 2/15) Installing: python-futures-3.0.2-7.1 .............................................................................................................[done]
( 3/15) Installing: python-requests-2.11.1-6.20.1 ........................................................................................................[done]
( 4/15) Installing: libzmq3-4.0.4-6.1 ....................................................................................................................[done]
( 5/15) Installing: python-MarkupSafe-0.18-7.1 ...........................................................................................................[done]
( 6/15) Installing: python-PyYAML-3.12-25.1 ..............................................................................................................[done]
( 7/15) Installing: python-msgpack-python-0.4.6-2.1 ......................................................................................................[done]
( 8/15) Installing: python-psutil-1.2.1-9.1 ..............................................................................................................[done]
( 9/15) Installing: python-pycrypto-2.6.1-4.1 ............................................................................................................[done]
(10/15) Installing: python-simplejson-3.8.2-4.1 ..........................................................................................................[done]
(11/15) Installing: python-pyzmq-14.0.0-3.1 ..............................................................................................................[done]
(12/15) Installing: python-Jinja2-2.7.3-17.1 .............................................................................................................[done]
(13/15) Installing: python-tornado-4.2.1-9.1 .............................................................................................................[done]
(14/15) Installing: salt-2016.11.4-45.2 ..................................................................................................................[done]
(15/15) Installing: salt-minion-2016.11.4-45.2 ...........................................................................................................[done]
You can re-enable CD/DVD repo when you have the related device mounted on the server.
Chandan Bhagat says
thanks, man 🙂 !!, it’s working.
Huang says
Thank you, it works by me!