热门关键字:  ubuntu  分区  函数  linux系统进程  Fedora

改造rhel5的DVD,使其可以进行yum库的更新

来源: 作者: 时间:2007-12-03 Tag: 点击:
起因:
拷贝了一张rhel5的DVD(rhel.5.0.server.centoschina.com.dvd.iso),安装这些都没有问题。但是挂载后,作为光盘的yum库时候,当安装的时候就会报错。这张盘的MD5值和相关安装错误信息如下:

[root@server kook]# md5sum rhel.5.0.server.dvd.iso
9a462d3c60cb219d7017b30ddd1c52cd  rhel.5.0.server.dvd.iso
[root@server yum.repos.d]# yum install vsftpd
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for vsftpd to pack into transaction set.
media://1170972069.396645%232/vsftpd-2.0.5-10.el5.i386.rpm: [Errno 4] IOError: <urlopen error unknown url type: media>
Trying other mirror.
Error: failed to retrieve vsftpd-2.0.5-10.el5.i386.rpm from rhel5-Server
error was [Errno 4] IOError: <urlopen error unknown url type: media>
 
改造过程:
挂载,重新应用createrepo创新创建库,然后制作DVD。
注意:挂载后,拷贝文件的时候,不要忽略隐藏文件.discinfo

[root@server rhel5]# createrepo -g ~kook/foo/Server/repodata/comps-rhel5-server-core.xml ./Server/
[root@server rhel5]# createrepo -g ~kook/foo/VT/repodata/comps-rhel5-vt.xml ./VT
[root@server rhel5]# createrepo -g ~kook/foo/Cluster/repodata/comps-rhel5-cluster.xml ./Cluster
[root@server rhel5]# createrepo -g ~kook/foo/ClusterStorage/repodata/comps-rhel5-cluster-st.xml ./ClusterStorage/
[root@server rhel5]# mkisofs -r -T -J -V "Custom RHEL5 Build" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /home/kook/rhel5.iso /home/kook/rhel5
[root@server rhel5]# /usr/lib/anaconda-runtime/implantisomd5 /home/kook/rhel5.iso
Inserting md5sum into iso image...
md5 = 1c6f42ee4b4ae552a8dd155e60b9fafb
Inserting fragment md5sums into iso image...
fragmd5 = 6d179ebee29483cd86c64e8d3cbfbe47ad881a8e51e9bb576dc1c1ae5e7c
frags = 20
Setting supported flag to 0
[root@server rhel5]# cat .discinfo
1170972069.396645
Red Hat Enterprise Linux Server 5
i386
1,2,3,4,5
Server/base
Server/RPMS
Server/pixmaps
[root@server kook]# md5sum rhel5.iso
6a6001abcfaabba45f1bc564c340f107  rhel5.iso
[root@server kook]# file rhel5.iso
rhel5.iso: ISO 9660 CD-ROM filesystem data 'Custom RHEL5 Build             ' (bootable)
 
然后直接挂载,本地的yum库的写法,可以参考这篇文章
http://blog.chinaunix.net/u1/36549/showart.php?id=433132

最新评论共有 4 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册