07.05.2020 22:08, Roger Oberholtzer пишет:
On Thu, May 7, 2020 at 7:47 PM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
07.05.2020 11:52, Roger Oberholtzer пишет:
I am doing a little experimenting with running openSUSE in a chroot jail. I'm basically after a compiler environment. I have been doing this with a couple versions of openSUSE and it works quite well.
I have just tried setting this up in a slightly different way, and I have encountered a strange thing. I want to be sure I have not overlooked anything.
I have unpacked the contents of the JeOS KVM image for 15.1 (current download) to a directory.
As you did not bother to tell what image you used I assume it is openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 (the only image with "kvm" in its name). This image is not archive so you cannot "unpack" it. You need to explain what you actually did.
Sorry about that. I thought that there is only one current JeOS KVM image for 15.1 available in the main openSUSE download page. But yes, that is the image. I do not boot it. That's the point of my exercise.
It can be unpacked. See https://gist.github.com/shamil/62935d9b456a6f9877b5
I can compile in this tree (adding the needed rpms). And access the network and mounted file systems in the chroot jail.
I have a suspicion that my problem is because the JeOS is configured with btrfs. I have usually done this with ext4-based trees where everything is just there.
There is no problem to use btrfs as long as you use it correctly.
I suspect that it is this that I am not doing (from the JeOS /etc/fstab):
LABEL=ROOT /var btrfs defaults,subvol=@/var 0 0
Yes.
Still, there is a /var directory in the tree. /var/lib/rpm/Packages in unchanged (same date as when the JeOS image was built). Wouldn't the
It is impossible if you did not mount /var.
zypper install have updated it? Note that it is not accessed as a cow. It has been copied out to a tree somewhere.
Traditionally RPM database was kept in /var/lib/rpm. SUSE initiated relocation of database to /usr/lib/sysimage/rpm to facilitate snapshot integration. /var/lib/rpm is kept as compatibility link. If /var is not mounted, there is no /var/lib/rpm link present. When you call rpm directly it does not matter, because it looks at /usr/lib/sysimage/rpm. But zypper in 15.1 still has hardcoded /var/lib/rpm as database location. So when you call zypper in these conditions (/var not mounted) it creates empty RPM database in *directory* /var/lib/rpm, which is completely unrelated to actual RPM database in /usr/lib/sysimage/rpm.
That certainly works as expected if I present qcow2 image as disk and mount third partition which is root of openSUSE including all subvolumes. You need to provide complete steps (starting with image name) what you did if you expect someone to look into it.
I did not mount the subvolumes. I suspect this is what is the cause. I'm not even sure how to do that in this context.
chroot mount -a -t btrfs works for me. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org