-1

Example: I have a centos or debian X.Y installed on physical disks, with a 2.6 kernel. Now I put a "live distro" ISO (example archlinux) on one DVD and

  • boot the system from the DVD, so now the running os is a 4.x kernel
  • mount the root f.s. of the physical disk and chroot to it

So now the root file system is not the real one of the live os.

Running "yum install ..." seems to work!

Is there any official documentation about yum requirements?

Does yum work using as input only the file-system, so this kind of operations are absolutely safe?

  • another caveat: does yum read the /proc file-system? – Massimo May 16 at 9:42
2

You have used chroot so the only thing that yum is using is the kernel from the "live distro". The things that yum is going to want to do are pretty standard, open files, read files, write files, launch programs, allocate memory, and this will work for any kernel from say the last 10 years assuming that it is for the correct architecture.

You might want to mount things like /dev, /dev/pts, /sys, /tmp and /proc into your change-rooted environment. If you have a separate /boot partition you might want to mount that as well.

The only thing which may go wrong is the scripts which are run when you update your kernel and they try and figure out the boot device to update the configuration. Everything else will just work.

  • I agree with you, but my quest is for official documentation. For example what about running yum if the live distro is 64 bit but the installed distro is 32 bit? does it work or break (because yum is fooled by the live o.s.?) – Massimo May 16 at 9:41
  • another caveat: does yum read the /proc file-system? – Massimo May 16 at 9:42
  • I doubt there will be official documentation. As I said, you need the correct architecture. 64bit kernels are typically configured to support both 32bit and 64bit user space, so booting a 64bit kernel with a 32bit installed os is fine. The converse is not true. Since yum runs pre and post install scripts, even if yum doesn't directly access /proc there is a good chance one of those scripts does. – icarus May 16 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.