13 Replies Latest reply: Mar 17, 2014 3:46 PM by Alvaro.Miranda RSS

    Creating YUM Repository from Linux Distribution Disk : getting Error 14

    Jimbo


      Hi,

       

      I am trying to create a YUM Repository from my Oracle Linux 6-5 districution disk.

       

      I have copied the entire contents of my Linux 6-5 DVD onto my server under /hime/media/Linux6-5

       

      Q1. Is it necessary to copy the entire contents or can I copy only selected directories eg Server ?

       

      I then ensure there is a single *.repo file in /etc/yum.repos.d

      In this case I have named the file oracle.repo

       

      The contents of this file are as such

       

      [ol6_u5_base]

      name=Oracle Linux Update 5 installation media copy

      baseurl=file:///home/media/Linux6-5/Server/

      enabled=1

      gpgcheck=0

       

      Q2. I have seen some notes that suggest enabled should be 0 ? What does enabled do and should it be 0 or 1 ?

       

      When I try -

      yum repolist

       

      I get the following error

       

      file:///home/media/Linux6-5/Server/repodata/8a5154448bb61d3535bd6b228a86cfaf6de1325142097ebcbbbbef53a87e2135-primary.sqlite.bz2: [Errno 14] Could not open/read file:///home/media/Linux6-5/Server/repodata/8a5154448bb61d3535bd6b228a86cfaf6de1325142097ebcbbbbef53a87e2135-primary.sqlite.bz2

       

      When I check the directory /home/media/Linux6-5/Server/repodata I see

       

      -rw-r--r--. 1 root root  934231 Mar 12 14:21 3c92e7d016322254443f13b51f48e80e214a434bc3d372f1028f595978d6c504

      -rw-r--r--. 1 root root 3443218 Mar 12 14:21 48dc1d543ec8948e2e0775e4f43cc4155f9cd55f8188bf32a7d9e4b714e5043f

      -rw-r--r--. 1 root root 1435622 Mar 12 14:21 4b6bbf8157c14dfc298b8cce0a0e5d8878cb52e5ebc225c7dc8a778dee36b220

      -rw-r--r--. 1 root root 3321769 Mar 12 14:21 64f872fde7eaabb84baee6b612457836cdce6f91b1e4664212f5a00832ce1486

      -rw-r--r--. 1 root root 3141379 Mar 12 14:21 8a5154448bb61d3535bd6b228a86cfaf6de1325142097ebcbbbbef53a87e2135

      -rw-r--r--. 1 root root 1335926 Mar 12 14:21 928e89f2310cd8b00998369d9346c8729ba84e2d883180337fbaad349aabbf73

      -rw-r--r--. 1 root root  207533 Mar 12 14:21 a5ab978abd30c319056028e220545fe6e78dd179d1370331231ba8e240ee9d56

      -rw-r--r--. 1 root root 1127970 Mar 12 14:21 d085c284f2a5e5563820cd60b552a5cecef09e2ee7337e030c8a2a2252e4d929

      -rw-r--r--. 1 root root    3825 Mar 12 14:21 repomd.xml

      -rw-r--r--. 1 root root    2581 Mar 12 14:21 TRANS.TBL

       

      It looks as if the full names which occur in repomd.xml have been truncated to the above

      When I check the Linux 6-5 DVD that I burned, it likewise has the names truncated as above

       

      Q2. Has this truncation occurred at the burning stage ?

       

      Q3. Do I need to edit the repomd.xml file to reflect the truncated file names or is it better to rename the files to the longer names as found in the repomd.xml file ?

       

      any advice greatly appreciated

      Jim

        • 1. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
          Jimbo

          I found that if I renamed the files in /home/media/Linux6-5/Server/repodata to reflect the untruncated files listed in /home/media/Linux6-5/Server/repodata/repomd.xml

           

          things improved

           

          root@lab4#>yum repolist

          Loaded plugins: refresh-packagekit, security

          repo id                                                   repo name                                                                                    status

          ol6_u5_base                                               Oracle Linux Update 5 installation media copy                                                3,669

           

          However If I try to load a package

           

          root@lab4#>yum install xorg-x11-apps
          Loaded plugins: refresh-packagekit, security
          ol6_u5_base                                                                                                                           | 3.7 kB     00:00 ...
          Setting up Install Process
          Resolving Dependencies
          --> Running transaction check
          ---> Package xorg-x11-apps.x86_64 0:7.6-6.el6 will be installed
          --> Processing Dependency: libXaw.so.7()(64bit) for package: xorg-x11-apps-7.6-6.el6.x86_64
          --> Running transaction check
          ---> Package libXaw.x86_64 0:1.0.11-2.el6 will be installed
          --> Processing Dependency: libXpm.so.4()(64bit) for package: libXaw-1.0.11-2.el6.x86_64
          --> Running transaction check
          ---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed
          --> Finished Dependency Resolution

          Dependencies Resolved

          =============================================================================================================================================================
          Package                                 Arch                             Version                                Repository                             Size
          =============================================================================================================================================================
          Installing:
          xorg-x11-apps                           x86_64                           7.6-6.el6                              ol6_u5_base                           276 k
          Installing for dependencies:
          libXaw                                  x86_64                           1.0.11-2.el6                           ol6_u5_base                           178 k
          libXpm                                  x86_64                           3.5.10-2.el6                           ol6_u5_base                            50 k

          Transaction Summary
          =============================================================================================================================================================
          Install       3 Package(s)

          Total download size: 503 k
          Installed size: 1.2 M
          Is this ok [y/N]: Y
          Downloading Packages:


          Error Downloading Packages:
            libXpm-3.5.10-2.el6.x86_64: failure: Packages/libXpm-3.5.10-2.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.
            libXaw-1.0.11-2.el6.x86_64: failure: Packages/libXaw-1.0.11-2.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.
            xorg-x11-apps-7.6-6.el6.x86_64: failure: Packages/xorg-x11-apps-7.6-6.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

           

           

          Can't understand this because the packages appear ok in /home/media/Linux6-5/Packages

           

          root@lab4#>pwd

          /home/media/Linux6-5/Packages

          root@lab4#>ls -l libXpm-3.5.10-2.el6.x86_64.rpm

          -rw-r--r--. 1 root root 51304 Mar 12 14:08 libXpm-3.5.10-2.el6.x86_64.rpm

          root@lab4#>ls -l libXaw-1.0.11-2.el6.x86_64.rpm

          -rw-r--r--. 1 root root 181776 Mar 12 14:08 libXaw-1.0.11-2.el6.x86_64.rpm

          root@lab4#>ls -l xorg-x11-apps-7.6-6.el6.x86_64.rpm

          -rw-r--r--. 1 root root 282496 Mar 12 14:21 xorg-x11-apps-7.6-6.el6.x86_64.rpm

           

          any idea of what is going on ?

          Jim

           


          • 2. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
            Robert Chase

            Jim,

             

            It's hard to say without more information BUT it sounds to me like the original disk that was burned has corruption issues.  I would repeat this process with another disk and see if you still have issues. 

             

            To eliminate issues altogether why not mount the ISO file locally and copy that way. 

             

            You can do the following to mount an ISO image . 

             

            mount -t iso9660 -o loop /path/of/your/file.iso /mnt/iso

            • 3. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
              Jimbo

              I have checked the files and they seem fine. Also there appears to be quite a number of hits around the Error 256 Iam now experiencing

               

              in my /etc/yum.respos.d file

               

              [ol6_u5_base]

              name=Oracle Linux Update 5 installation media copy

              baseurl=file:/home/media/Linux6-5/Server/

              enabled=1

              gpgcheck=0

               

              when I change enabled from 1 to 0( which a lot of the forum entries suggest ), I get quite a different error

               

              root@lab4#>yum install xorg-x11-apps

              Loaded plugins: refresh-packagekit, security

              Setting up Install Process

              No package xorg-x11-apps available.

              Error: Nothing to do

               

              strange, any ideas ?

              Jim

              • 4. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                Catch_22

                How did you check the files to make sure they are fine? How can you be sure the files you copied were not corrupted or translated in any way by the method you used to copy them? For instance, if you copy from DVD to Windows and then transfer the files to Linux you will loose symbolic links. And if I remember correctly, there are symbolic links.

                 

                When you disable a repository, yum will simply not attempt to install any of its packages.  If there was a problem copying the package, the error will not occur if you disable it. What do you think is strange about it.

                • 5. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                  Jimbo

                  I burned the files directly as an ISO Image ( of Linux 6.5 ) from the Oracle OTN web site.

                   

                  Sorry are you saying that enabled should be '1' and this would be the norm ?

                  If that's the case Iguess it brings me back to the error

                   

                  Error Downloading Packages:

                    libXpm-3.5.10-2.el6.x86_64: failure: Packages/libXpm-3.5.10-2.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

                    libXaw-1.0.11-2.el6.x86_64: failure: Packages/libXaw-1.0.11-2.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

                    xorg-x11-apps-7.6-6.el6.x86_64: failure: Packages/xorg-x11-apps-7.6-6.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

                   

                   

                  thanks,

                  Jim

                   


                  • 6. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                    Robert Chase

                    Jimbo,

                     

                    I have to agree with Dude! here.  It sounds like the original burned media you used to create the repo has some issues.  Mounting the ISO image directly on the box and copying it not only will be faster but will also eliminate any possible burn related issue.  I know it's probably a bit of work to rebuild this but ultimately it may resolve the issues you are seeing.  You could compare md5 checksums of the directories to the original iso to make sure but likely that would be more work than just rebuilding. 

                    • 7. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                      Jimbo

                      Relenting under the pressure !

                       

                      I mounted the ISO image and firstly copied the repodata directory from it across to where I had oriiginally copied the burned DVD onto my server i.e. I mounted the ISO on /OEL. So

                       

                      rm -rf /home/media/Linux6-5/Server

                      cd /OEL/Server

                      cp –r repodata /home/media/Linux6-5/Server

                       

                      I then did -

                      yum update

                      yum install xorg-x11-apps

                       

                      However I still got the same errors

                       

                      Error Downloading Packages:

                        libXpm-3.5.10-2.el6.x86_64: failure: Packages/libXpm-3.5.10-2.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

                        libXaw-1.0.11-2.el6.x86_64: failure: Packages/libXaw-1.0.11-2.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

                        xorg-x11-apps-7.6-6.el6.x86_64: failure: Packages/xorg-x11-apps-7.6-6.el6.x86_64.rpm from ol6_u5_base: [Errno 256] No more mirrors to try.

                       

                       

                      So instead I decided to reconfigure the YUM Repository to use the ISO image

                       

                      [ol6_u5_base]

                      name=Oracle Linux Update 5 installation media copy

                      baseurl=file:/OEL/Server/

                      enabled=1

                      gpgcheck=0

                       

                      yum update

                      yum install xorg-x11-apps

                       

                      This worked ! So I think you are right in that the original copy of the DVD across onto the Server must not deal correctly with the symbolic links

                       

                      So all I need to do now is make an FSTAB entry so that my YUM repository is remounted on each server reboot. What does an FSTAB entry look like for an ISO image mount ?

                       

                      To mount the ISO image I used

                      mount –t iso9660 –o loop /home/media/ISO/LINUX6-5/V41362-01.iso /OEL

                       

                      so what should my FSTAB entry look like for this ?

                       

                      Jim

                      • 8. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                        Robert Chase

                        Jimbo.  Glad you were able to get this sorted.  Your fstab would look something like this. 

                         

                        /path_to_iso /mnt/mountpoint iso9660 loop,ro,auto 0 0

                        • 9. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                          Jimbo

                          Thanks.

                           

                          What the auto for ?

                           

                          Also if I do not specify ro, will that make the mount area capable of being written to ( in case I wanted to add some further RPM's in this file based YUM Repository or update some in the future ) or do I somehow have to explicitly specify the mount as being write capable.

                           

                          thanks,

                          Jim

                          • 10. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                            Robert Chase

                            Jimbo,

                             

                            From the mount man page.

                             

                            auto   Can be mounted with the -a option.

                             

                            noauto Can only be mounted explicitly (i.e., the -a option will not cause the filesystem to be mounted).

                             

                            It allows you to use mount -a to automatically mount all filesystems in fstab.

                             

                            To answer your other question yes you can specify the ISO to be RW as well if you like.

                            • 11. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                              Avi Miller-Oracle

                              Is there a particular reason why you're trying to use the ISO as a yum repository and not using http://public-yum.oracle.com instead? We provide access to all the latest updates, errata and security fixes online. Using the ISO means you'll be almost always out-of-date.

                               

                              Also, if you have limited Internet connectivity, consider setting up a local ULN mirror using these instructions: http://www.oracle.com/technetwork/articles/servers-storage-admin/yum-repo-setup-1659167.html

                               

                              This does require an Oracle Linux support subscription, though as it mirrors ULN channels. If you don't have an Oracle Linux support subscription, you can use public-yum.oracle.com instead.

                              • 12. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                                Jimbo

                                thanks Avi. This server is on a completely closed network with no internet access or Proxy. Also I don't have a ULN subscription

                                 

                                Jim

                                • 13. Re: Creating YUM Repository from Linux Distribution Disk : getting Error 14
                                  Alvaro.Miranda

                                  hello

                                   

                                  I did wrote an script that does a local copy of Public yum for this very same reason.

                                   

                                  https://github.com/kikitux/public-yum-downloader