I'm wondering what the best way of building a UML image is; I tried the following based on documents I found on the web for FC2
mkdir -p $T/etc $T/dev $T/proc $T/sys $T/var/tmp $T/var/cache/yum \ $T/var/lock/rpm $T/var/cache/yum/update/headers \ $T/var/cache/yum/update/packages
touch $T/etc/fstab mknod $T/dev/null c 1 3 chmod 666 $T/dev/null mount --bind /proc $T/proc mount --bind /sys $T/sys
rpm --root $T -Uvh --nodeps --force $UML/RPM/centos-release-4-4.2.i386.rpm \ $UML/RPM/yum-2.4.3-1.c4.noarch.rpm
yum -y -C --installroot=$T groupinstall "Base"
($T is a temp directory; $UML is where I'm storing my software)
Unfortunately yum fails to run, complaining about repomd.xml files being missing.
+ rpm --root /var/tmp/bld.13824 -Uvh --nodeps --force /usr/local/uml/RPM/centos-release-4-4.2.i386.rpm /usr/local/uml/RPM/yum-2.4.3-1.c4.noarch.rpm warning: /usr/local/uml/RPM/centos-release-4-4.2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821 Preparing... ########################################### [100%] 1:yum ########################################### [ 50%] error: %post(yum-2.4.3-1.c4.noarch) scriptlet failed, exit status 255 2:centos-release ########################################### [100%] + yum -y -C --installroot=/var/tmp/bld.13824 groupinstall Base Setting up Group Process Setting up repositories Cannot open/read repomd.xml file for repository: update Cannot find repomd.xml file for update Error: Cannot find repomd.xml file for update
(The yum rpm install problem is because chkconfig doesn't exist; not a problem.)
Any ideas?
Stephen Harris wrote:
I'm wondering what the best way of building a UML image is; I tried the following based on documents I found on the web for FC2
mkdir -p $T/etc $T/dev $T/proc $T/sys $T/var/tmp $T/var/cache/yum \ $T/var/lock/rpm $T/var/cache/yum/update/headers \ $T/var/cache/yum/update/packages
touch $T/etc/fstab mknod $T/dev/null c 1 3 chmod 666 $T/dev/null mount --bind /proc $T/proc mount --bind /sys $T/sys
rpm --root $T -Uvh --nodeps --force $UML/RPM/centos-release-4-4.2.i386.rpm \ $UML/RPM/yum-2.4.3-1.c4.noarch.rpm
yum -y -C --installroot=$T groupinstall "Base"
($T is a temp directory; $UML is where I'm storing my software)
Unfortunately yum fails to run, complaining about repomd.xml files being missing.
- rpm --root /var/tmp/bld.13824 -Uvh --nodeps --force /usr/local/uml/RPM/centos-release-4-4.2.i386.rpm /usr/local/uml/RPM/yum-2.4.3-1.c4.noarch.rpm
warning: /usr/local/uml/RPM/centos-release-4-4.2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821 Preparing... ########################################### [100%] 1:yum ########################################### [ 50%] error: %post(yum-2.4.3-1.c4.noarch) scriptlet failed, exit status 255 2:centos-release ########################################### [100%]
- yum -y -C --installroot=/var/tmp/bld.13824 groupinstall Base
Setting up Group Process Setting up repositories Cannot open/read repomd.xml file for repository: update Cannot find repomd.xml file for update Error: Cannot find repomd.xml file for update
(The yum rpm install problem is because chkconfig doesn't exist; not a problem.)
Any ideas?
I think I've seen this when I have a repository listed in /etc/yum.repos.d that I don't have access to. For example, I tried mirroring a CentOS mirror and left [centosplus] in my local.repo file, but didn't mirror the centosplus tree. Of course it didn't find repomd.xml for centosplus, so it just quit. So check the [update] repo pathing in your /etc/yum.repos.d/ file that you're actually using first.
I should mention that when I first saw the FC4 Xen howto that used yum to create a core filesystem, it worked for me when creating a UML rootfs. I'd consider that some of the newer Xen scripts in FC6 might also prove useful for creating UML root filesystems, too.
http://uml.jfdi.org/uml/Wiki.jsp?page=BuildingRootFileSystems http://uml.jfdi.org/uml/Wiki.jsp?page=UMLRootFilesystems
Jed
On Sat, Mar 17, 2007 at 09:40:20PM -0700, Jed Reynolds wrote:
Stephen Harris wrote:
rpm --root $T -Uvh --nodeps --force $UML/RPM/centos-release-4-4.2.i386.rpm \ $UML/RPM/yum-2.4.3-1.c4.noarch.rpm
yum -y -C --installroot=$T groupinstall "Base"
- yum -y -C --installroot=/var/tmp/bld.13824 groupinstall Base
Setting up Group Process Setting up repositories Cannot open/read repomd.xml file for repository: update Cannot find repomd.xml file for update Error: Cannot find repomd.xml file for update
I think I've seen this when I have a repository listed in /etc/yum.repos.d that I don't have access to. For example, I tried
The contents of /etc/yum.conf and /etc/yum.repos.d in the installroot image area I'm building are identical to the main server files.
But it gave me an idea, so I strace'd the yum process. I can see it making a request to get a mirror server, I can see it getting the response but then not even attempt to talk to the server it was told to.
If I change the repos.d files to use baseurl rather than mirrorlist then I can't even see yum attempting to connect to the server.
If I try to pre-seed the cache files from the main server it then moans about no cache for base/yumgroups.xml (becasue the main server doesn't have that).
http://uml.jfdi.org/uml/Wiki.jsp?page=BuildingRootFileSystems http://uml.jfdi.org/uml/Wiki.jsp?page=UMLRootFilesystems
Thanks, I'll look into that.
On Sun, 18 Mar 2007, Stephen Harris wrote:
ummm -- /etc/resolv.conf in the chroot is yet not populated at this point -- copy the one outside of the install root in the parent over
- yum -y -C --installroot=/var/tmp/bld.13824 groupinstall Base
Setting up Group Process Setting up repositories Cannot open/read repomd.xml file for repository: update Cannot find repomd.xml file for update Error: Cannot find repomd.xml file for update
On Tue, Mar 27, 2007 at 12:33:23AM -0400, R P Herrold wrote:
On Sun, 18 Mar 2007, Stephen Harris wrote:
- yum -y -C --installroot=/var/tmp/bld.13824 groupinstall Base
Setting up Group Process Setting up repositories Cannot open/read repomd.xml file for repository: update Cannot find repomd.xml file for update Error: Cannot find repomd.xml file for update
ummm -- /etc/resolv.conf in the chroot is yet not populated at this point -- copy the one outside of the install root in the parent over
Hmm... the yum process isn't running in a chroot - I can see it getting the initial mirror list (so it's talking to the network) but it doesn't then attempt to contact the mirrors. However, I just copied nsswitch.conf and resolv.conf into the area just in case... no difference.
Thanks for the thought, though! Keep 'em coming :-)