/sys/bus/pci/devices/<B:D:F:>/rescan file missing on Ubuntu Kernel 5.4.14.050414-generic - ubuntu-16.04

On my ubuntu I am missing rescan files under /sys/bus/pci/devices/<B:D:F:>/
Does anyone know how to restore them? Can I simply copy them from /sys/bus/pci/rescan ?
Ubuntu : 16.04.6 LTS
Kernel: 5.4.14.050414-generic
NVMe driver version: 1.0

In Kernel 5.4 and later:
rescan in /sys/.../<domain:bus:dev.fn>/ was renamed dev_rescan (for PCI devices)
rescan in /sys/.../pci_bus/<domain:bus>/ was renamed bus_rescan
This caused application breakage and there is a proposed patch to revert the behaviour

Related

Lustre Client on Linux Kernel 4+

Does anyone know if it is possible to install lustre client software on a linux machine that has kernel 4+? From what I have experimented so far, all the working examples are on kernel 3.10. And if I try to install kmod-luster-client on 4+ machine, it fails with:
rpm -ivh kmod-lustre-client-2.10.5-1.el7.x86_64.rpm
error: Failed dependencies:
kernel < 3.10.0-863 is needed by kmod-lustre-client-2.10.5-1.el7.x86_64
kernel(PDE_DATA) = 0x44f0d59d is needed by kmod-lustre-client-2.10.5-1.el7.x86_64
According to lustre/ChangeLog in the b2_10 branch, it works with kernels at least 4.4.133-94.33 (SLES12SP3) and 4.4.0-131 (Ubuntu 16.04).
If you are using a newer kernel, you also need to use a newer version of Lustre. The lustre/ChangeLog on the tip of master (almost 2.12 release) reports support for kernels 4.15.0-32 (Ubuntu 18.04).
It looks like you are trying to install a binary kernel module RPM built for the RHEL7 kernel on a non-RHEL kernel. That is never going to work. You need to either get the right RPMs/Debs for your kernel from https://lustre.org/download/ or download the source and rebuild it for your kernel.
The 2.10.x kernels are currently the LTS maintained releases (bugfixes backported to that release), while 2.11.0 is a feature release that does not have bugfixes backported.

Cannot update kernel-devel in CentOS 6.5

First of all I want to note that I am booting CentOS from a flash drive (if it matters).
Now I am trying to install Nvidia drivers for my GPU but the problem is that I must update kernel-devel first. I did the following:
yum update
yum install kernel-devel kernel-headers gcc make
yum -y upgrade kernel kernel-devel
After that I checked which kernel I am using:
uname -r
Which gave me this: 2.6.32-431.el6.x86_64
Then I did: rpm -q kernel-devel , with the following result: kernel-devel-2.6.32-504.el6.x86_64
I tried to upgrade again, but it said "No Packages marked for Update
"
When I tried to install the kernel again, it said that I already have installed the latest version:
Package kernel-devel-2.6.32-504.el6.x86_64 already installed and latest version
Package kernel-headers-2.6.32-504.el6.x86_64 already installed and latest version
Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Nothing to do
I am confused and I don't know how to make the lates kernel active, so I can install my Nvidia drivers.
Usually which kernel to use is selected via grub at boot time. If you have both installed its most likely that grub is still starting the older kernel.
You can look at /etc/grub.conf to make sure "default" is set to what you would expect. Default is 0 keyed off the "Title" entry.
Did you reboot? most of the time the latest kernel is set to default in grub.conf and a reboot is all you need.
Also https://serverfault.com/a/623755 might be the answer.

How to add ubuntu 12.10 entry to grub menu list?

I removed my ubuntu 12.10 entry while editing menu.lst file.
can anyone give me a sample file containing the ubuntu 12.10 entry in menu.lst file.
It should be something like this:
title Ubuntu 12.10
kernel
initrd
my ubuntu installation is on sda6.
can anyone help me on this?
Assuming that you're using Grub2 per my comment above and have not installed a non-default bootloader, here is an example menu entry from /boot/grub/grub.cfg:
menuentry 'Ubuntu, with Linux 3.5.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 862e9bd8-8641-478a-96a3-d5ad9a53b104
linux /boot/vmlinuz-3.5.0-23-generic root=UUID=862e9bd8-8641-478a-96a3-d5ad9a53b104 ro find_preseed=/preseed.cfg noprompt quiet
initrd /boot/initrd.img-3.5.0-23-generic
}
As you can see, the root drives are set via uuid, so cutting and pasting a solution will not work for you.
However you can try the Boot-Repair utility, or follow these instructions.
If you have installed an older version of grub this blog post gives some examples you may find useful.

difference between qemu-kvm?

what is different between the following type i get qemu-kvm ? boths are use centos 6.4.
yum install qemu-kvm ,then show the version:
[root#centos6 qemu-kvm]# /usr/local/bin/qemu-system-x86_64 --version
QEMU emulator version 1.2.50 (qemu-kvm-devel), Copyright (c) 2003-2008 Fabrice Bellard
get the source code and build it by gcc.
[root#centos6 qemu-kvm]# /usr/libexec/qemu-kvm --version
QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c) 2003-2008 Fabrice Bellard
Qemu uses 2 kinds of cpu virtualization, TCG (tiny code generator) and KVM. TCG emulates all instruction of guest code with plain c code, it translates guest code to host code in real-time. While KVM lets the host directly runs guest code, KVM requires the guest and the host to have the same instruction set (basically, the same cpu), not every cpu can do this, for intel cpus, it requires VMX feature. Which I assume you have understood these.
Qemu-kvm is obsolete, KVM comes with QEMU now if you download the latest code, you just have to compile it with "--enable-kvm" option. Your QEMU source code is very old, the latest version of QEMU is AFAIK, 1.7.
Your yum source provide 1.2.50 version of qemu. Try "yum install qemu", and try running with -enable-kvm if you don't want to build from source code (I haven't tried though)..
Qemu is Hypervisor.
KVM isn't. It is an accelerator(linux module which does the code translation fast) and used with Qemu, because Qemu when used with TCG is slow.

PIL selftest.py fails for Centos 6 64-bit Error: Jpeg Decoder not Available

I am having difficulty on my server trying to get the selftest.py to run successfully.
I am trying to get PIL 1.1.7 working with Python 2.4.4 (Are the versions compatible?)
When the install is preformed like so:
# python2.4 setup.py install
running install
running build
running build_py
running build_ext
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.4.6 (#1, Dec 21 2012, 14:54:30)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
To check the build, run the selftest.py script.
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/local/bin/pilconvert.py to 755
changing mode of /usr/local/bin/pilprint.py to 755
changing mode of /usr/local/bin/pilfile.py to 755
changing mode of /usr/local/bin/pilfont.py to 755
changing mode of /usr/local/bin/pildriver.py to 755
creating /usr/local/lib/python2.4/site-packages/PIL.pth
Everything seems handy dandy. Jpeg support is available and all is happy. But the selftest.py however is a different story:
# python2.4 /usr/local/src/Imaging-1.1.7/selftest.py
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY rc/Imaging-1.1.7]# yum install libjpeg62-devel zlib1g-devel libfreetype6-devel liblcms1-develp
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
*** TKINTER support not installed
*** JPEG support not installed
*** ZLIB (PNG/ZIP) support not installed
--- FREETYPE2 support ok
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest:
*****************************************************************
Failure in example:
try:
_info(Image.open(os.path.join(ROOT, "Images/lena.jpg")))
except IOError, v:
print v
from line #24 of selftest.testimage
Expected: ('JPEG', 'RGB', (128, 128))
Got: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.
I get the dreaded Jpeg decoder not available.
I've tried a variety of things. I changed the setup to point to usr/lib64 that didn't work. I made some symbolic links in the usr/lib to point to the libjpeg.so file, that also didn't work. I went back and forth with the tech guys at our server hosting place and they aren't understanding the issue and it's like talking to a wall. I am really stuck. The only thing I haven't tried is the PiP but I didn't try that because I don't know how that works exactly. So I want to avoid that.
Is there a compatibility issue or a setting I just don't have quite right?
Thank you for the assistance.
--UPDATE--
Working on this problem again these days
I've tested Centos 5 & 6 32-bit And everything installs like a charm, but 64-bit I'm still having issues.
It seems like the selftest works with the stock python2.6 but not with python2.4. Pil 1.1.7 is compatable with 2.4.4 but I think there is a problem with the libraries in 64-bit. Still searching for a solution.
After extensive testing it's just not possible.
I'm sure it can be done but the steps it would require to get it down would be so intensive that it would make it difficult to gaurentee the stability of the server/system.
The problem really lies in the 64-bit system. The Python-Imagining would work with python 2.4 if python 2.4 was compiled as 32-bit. However even if you get Python-2.4 compiled into 32-bit it has a hard time with the libraries since everything in Centos is build for the 64 arch. And getting those additional libraries is cumbersome since the repos won't include the structures you need to get it working. It's just, annoying. It's not feasible to go hunting around in circles and the time spent trying to support such a limping system is wasted. And possibly puts the system at risk.
No, it's not possible to install PIL for Python 2.4 on a 64-bit machine.
In my case we had no support of all the libraries in PIL (CentOS 6, x64)
*** TKINTER support not available
*** JPEG support not available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available
So we used following:
yum install freetype freetype-devel libpng libpng-devel libjpeg libjpeg-devel
And now we have
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
3 years later, I know, but this can work just fine! The standard build process will not look for libraries in /usr/lib64, but you can't specify a library path when running setup.py build, so you need to rebuild the binaries afterwards in a separate step:
yum install freetype-devel libpng-devel libjpeg-turbo-devel libzip-devel lcms-devel
pip download PIL
unzip pil-1.1.7.zip
cd pil-1.1.7
./setup.py build
./setup.py build_ext -L /usr/lib64/:/usr/local/lib64 --force
./setup.py install --prefix /usr/local/python27 --force --skip-build
This is on Scientific Linux 6.7 64-bit, using Python 2.7 compiled from source.