Issue : Only one processor or Unsupported PM cap regs version (7).

37 x served & 13 x viewed

My current issue on Oracle Linux 7.3 (kernel 4.1.12-61.1.18): I have only one processor or issue « Unsupported PM cap regs version (7) ». Impossible to boot without issue « Unsupported PM cap regs version (7) » and 8 processors.

To see the number of processor : cat /proc/cpuinfo | grep « model name »

My processor is : Intel(R) Xeon(R) CPU E5-2623 v3 @ 3.00GHz

All my test done :

Tests Status Processor Note Grub parameter
1 OK 1 quiet splash noapic nolapic acpi=off
2 OK 1 quiet acpi=off
3 KO Freeze : Unsupported PM cap regs version (7) quiet
4 KO No boot quiet splash pci=noacpi
5 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=off nr_cpus=8
6 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=ht
7 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=noirq
8 KO Freeze : Unsupported PM cap regs version (7) quiet pnpacpi=off
9 KO Freeze : Unsupported PM cap regs version (7) quiet pcie_aspm=off
10 KO Freeze : Unsupported PM cap regs version (7) quiet pci=noacpi
11 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=ht nolapic  splash
12 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=ht pci=nocrs
13 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=ht acpi_osi=Linux
14 OK 1 quiet idle=poll acpi=off
15 OK 1 quiet idle=poll acpi=off processor.nocst=1
16 OK 1 quiet acpi=off processor.nocst=1
17 KO Freeze : Unsupported PM cap regs version (7) quiet acpi=ht  acpi.nopower_check=1 acpi_osi=Linux
18 OK 1 quiet acpi=off processor.nocst=1 maxcpus=8
19 OK 1 quiet intel_iommu=on acpi=off noapi
20 KO Freeze : Unsupported PM cap regs version (7) quiet noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hard
21 KO Freeze : Unsupported PM cap regs version (7) quiet pci=nomsi
22 KO Freeze : Unsupported PM cap regs version (7) quiet pci=noaer
23 KO Freeze : Unsupported PM cap regs version (7) quiet splash noapic nolapic acpi=ht pci=nocrs
24 KO Freeze : Unsupported PM cap regs version (7) quiet splash noapic nolapic acpi=noirq pci=nocrs
25 KO Freeze : Unsupported PM cap regs version (7) quiet splash nomodeset acpi_osi=Linux

Source code of kernel :

When I see the source code of pci.c :

/**
 * pci_pm_init - Initialize PM functions of given PCI device
 * @dev: PCI device to handle.
 */
void pci_pm_init(struct pci_dev *dev)
{
	int pm;
	u16 pmc;

	pm_runtime_forbid(&dev->dev);
	pm_runtime_set_active(&dev->dev);
	pm_runtime_enable(&dev->dev);
	device_enable_async_suspend(&dev->dev);
	dev->wakeup_prepared = false;

	dev->pm_cap = 0;
	dev->pme_support = 0;

	/* find PCI PM capability in list */
	pm = pci_find_capability(dev, PCI_CAP_ID_PM);
	if (!pm)
		return;
	/* Check device's ability to generate PME# */
	pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc);

	if ((pmc & PCI_PM_CAP_VER_MASK) > 3) {
		pci_err(dev, "unsupported PM cap regs version (%u)\n",
			pmc & PCI_PM_CAP_VER_MASK);
		return;
	}

More information of Grup option :

acpi=           [HW,ACPI,X86,ARM64]
                        Advanced Configuration and Power Interface
                        Format: { force | on | off | strict | noirq | rsdt |
                                  copy_dsdt }
                        force -- enable ACPI if default was off
                        on -- enable ACPI but allow fallback to DT [arm64]
                        off -- disable ACPI if default was on
                        noirq -- do not use ACPI for IRQ routing
                        strict -- Be less tolerant of platforms that are not
                                strictly ACPI specification compliant.
                        rsdt -- prefer RSDT over (default) XSDT
                        copy_dsdt -- copy DSDT to memory
                        For ARM64, ONLY "acpi=off", "acpi=on" or "acpi=force"
                        are available

pnpacpi=        [ACPI]
                        { off }

nr_cpus=        [SMP] Maximum number of processors that an SMP kernel
                        could support.  nr_cpus=n : n >= 1 limits the kernel to
                        support 'n' processors. It could be larger than the
                        number of already plugged CPU during bootup, later in
                        runtime you can physically add extra cpu until it reaches
                        n. So during boot up some boot time memory for per-cpu
                        variables need be pre-allocated for later physical cpu
                        hot plugging.

pcie_aspm=      [PCIE] Forcibly enable or disable PCIe Active State Power
                        Management.
                off     Disable ASPM.
                force   Enable ASPM even on devices that claim not to support it.
                        WARNING: Forcing ASPM on may cause system lockups.

pci=option[,option...]  [PCI] various PCI subsystem options:
                earlydump       [X86] dump PCI config space before the kernel
                                changes anything
                off             [X86] don't probe for the PCI bus
                bios            [X86-32] force use of PCI BIOS, don't access
                                the hardware directly. Use this if your machine
                                has a non-standard PCI host bridge.
                nobios          [X86-32] disallow use of PCI BIOS, only direct
                                hardware access methods are allowed. Use this
                                if you experience crashes upon bootup and you
                                suspect they are caused by the BIOS.
                conf1           [X86] Force use of PCI Configuration Access
                                Mechanism 1 (config address in IO port 0xCF8,
                                data in IO port 0xCFC, both 32-bit).
                conf2           [X86] Force use of PCI Configuration Access
                                Mechanism 2 (IO port 0xCF8 is an 8-bit port for
                                the function, IO port 0xCFA, also 8-bit, sets
                                bus number. The config space is then accessed
                                through ports 0xC000-0xCFFF).
                                See http://wiki.osdev.org/PCI for more info
                                on the configuration access mechanisms.
                noaer           [PCIE] If the PCIEAER kernel config parameter is
                                enabled, this kernel boot option can be used to
                                disable the use of PCIE advanced error reporting.
                nodomains       [PCI] Disable support for multiple PCI
                                root domains (aka PCI segments, in ACPI-speak).
                nommconf        [X86] Disable use of MMCONFIG for PCI
                                Configuration
                check_enable_amd_mmconf [X86] check for and enable
                                properly configured MMIO access to PCI
                                config space on AMD family 10h CPU
                nomsi           [MSI] If the PCI_MSI kernel config parameter is
                                enabled, this kernel boot option can be used to
                                disable the use of MSI interrupts system-wide.
                noioapicquirk   [APIC] Disable all boot interrupt quirks.
                                Safety option to keep boot IRQs enabled. This
                                should never be necessary.
                ioapicreroute   [APIC] Enable rerouting of boot IRQs to the
                                primary IO-APIC for bridges that cannot disable
                                boot IRQs. This fixes a source of spurious IRQs
                                when the system masks IRQs.
                noioapicreroute [APIC] Disable workaround that uses the
                                boot IRQ equivalent of an IRQ that connects to
                                a chipset where boot IRQs cannot be disabled.
                                The opposite of ioapicreroute.
                biosirq         [X86-32] Use PCI BIOS calls to get the interrupt
                                routing table. These calls are known to be buggy
                                on several machines and they hang the machine
                                when used, but on other computers it's the only
                                way to get the interrupt routing table. Try
                                this option if the kernel is unable to allocate
                                IRQs or discover secondary PCI buses on your
                                motherboard.
                rom             [X86] Assign address space to expansion ROMs.
                                Use with caution as certain devices share
                                address decoders between ROMs and other
                                resources.
                norom           [X86] Do not assign address space to
                                expansion ROMs that do not already have
                                BIOS assigned address ranges.
                nobar           [X86] Do not assign address space to the
                                BARs that weren't assigned by the BIOS.
                irqmask=0xMMMM  [X86] Set a bit mask of IRQs allowed to be
                                assigned automatically to PCI devices. You can
                                make the kernel exclude IRQs of your ISA cards
                                this way.
                pirqaddr=0xAAAAA        [X86] Specify the physical address
                                of the PIRQ table (normally generated
                                by the BIOS) if it is outside the
                                F0000h-100000h range.
                lastbus=N       [X86] Scan all buses thru bus #N. Can be
                                useful if the kernel is unable to find your
                                secondary buses and you want to tell it
                                explicitly which ones they are.
                assign-busses   [X86] Always assign all PCI bus
                                numbers ourselves, overriding
                                whatever the firmware may have done.
                usepirqmask     [X86] Honor the possible IRQ mask stored
                                in the BIOS $PIR table. This is needed on
                                some systems with broken BIOSes, notably
                                some HP Pavilion N5400 and Omnibook XE3
                                notebooks. This will have no effect if ACPI
                                IRQ routing is enabled.
                noacpi          [X86] Do not use ACPI for IRQ routing
                                or for PCI scanning.
                use_crs         [X86] Use PCI host bridge window information
                                from ACPI.  On BIOSes from 2008 or later, this
                                is enabled by default.  If you need to use this,
                                please report a bug.
                nocrs           [X86] Ignore PCI host bridge windows from ACPI.
                                If you need to use this, please report a bug.
                routeirq        Do IRQ routing for all PCI devices.
                                This is normally done in pci_enable_device(),
                                so this option is a temporary workaround
                                for broken drivers that don't call it.
                skip_isa_align  [X86] do not align io start addr, so can
                                handle more pci cards
                noearly         [X86] Don't do any early type 1 scanning.
                                This might help on some broken boards which
                                machine check when some devices' config space
                                is read. But various workarounds are disabled
                                and some IOMMU drivers will not work.
                bfsort          Sort PCI devices into breadth-first order.
                                This sorting is done to get a device
                                order compatible with older (<= 2.4) kernels.
                nobfsort        Don't sort PCI devices into breadth-first order.
                pcie_bus_tune_off       Disable PCIe MPS (Max Payload Size)
                                tuning and use the BIOS-configured MPS defaults.
                pcie_bus_safe   Set every device's MPS to the largest value
                                supported by all devices below the root complex.
                pcie_bus_perf   Set device MPS to the largest allowable MPS
                                based on its parent bus. Also set MRRS (Max
                                Read Request Size) to the largest supported
                                value (no larger than the MPS that the device
                                or bus can support) for best performance.
                pcie_bus_peer2peer      Set every device's MPS to 128B, which
                                every device is guaranteed to support. This
                                configuration allows peer-to-peer DMA between
                                any pair of devices, possibly at the cost of
                                reduced performance.  This also guarantees
                                that hot-added devices will work.
                cbiosize=nn[KMG]        The fixed amount of bus space which is
                                reserved for the CardBus bridge's IO window.
                                The default value is 256 bytes.
                cbmemsize=nn[KMG]       The fixed amount of bus space which is
                                reserved for the CardBus bridge's memory
                                window. The default value is 64 megabytes.
                resource_alignment=
                                Format:
                                [<order of align>@][<domain>:]<bus>:<slot>.<func>[; ...]
                                [<order of align>@]pci:<vendor>:<device>\
                                                [:<subvendor>:<subdevice>][; ...]
                                Specifies alignment and device to reassign
                                aligned memory resources.
                                If <order of align> is not specified,
                                PAGE_SIZE is used as alignment.
                                PCI-PCI bridge can be specified, if resource
                                windows need to be expanded.
                                To specify the alignment for several
                                instances of a device, the PCI vendor,
                                device, subvendor, and subdevice may be
                                specified, e.g., 4096@pci:8086:9c22:103c:198f
                ecrc=           Enable/disable PCIe ECRC (transaction layer
                                end-to-end CRC checking).
                                bios: Use BIOS/firmware settings. This is the
                                the default.
                                off: Turn ECRC off
                                on: Turn ECRC on.
                hpiosize=nn[KMG]        The fixed amount of bus space which is
                                reserved for hotplug bridge's IO window.
                                Default size is 256 bytes.
                hpmemsize=nn[KMG]       The fixed amount of bus space which is
                                reserved for hotplug bridge's memory window.
                                Default size is 2 megabytes.
                hpbussize=nn    The minimum amount of additional bus numbers
                                reserved for buses below a hotplug bridge.
                                Default is 1.
                realloc=        Enable/disable reallocating PCI bridge resources
                                if allocations done by BIOS are too small to
                                accommodate resources required by all child
                                devices.
                                off: Turn realloc off
                                on: Turn realloc on
                realloc         same as realloc=on
                noari           do not use PCIe ARI.
                pcie_scan_all   Scan all possible PCIe devices.  Otherwise we
                                only look for one device below a PCIe downstream
                                port.

Log of issue :

Test 19 : Log exemple in /var/log/message :

Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet intel_iommu=on acpi=off noapi LANG=en_GB.UTF-8
...
#011RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=1.
...
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
...
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
...
smpboot: SMP motherboard not detected
smpboot: SMP disabled
...
x86: Booted up 1 node, 1 CPUs
smpboot: Total of 1 processors activated (5993.31 BogoMIPS)
NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.

Grep : grep « Kernel command line: » messages*

...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hard LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-514.el7.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hard LANG=en_GB.UTF-8
...

...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hard LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet acpi=ht pci=nocrs LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet pci=nomsi LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hard LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet splash noapic nolapic acpi=off LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet intel_iommu=on acpi=off noapi LANG=en_GB.UTF-8
...
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet intel_iommu=on acpi=off noapi LANG=en_GB.UTF-8
...

More logs of issue on PCI :

Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.12-61.1.18.el7uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet splash noapic nolapic acpi=off LANG=en_GB.UTF-8
...
kernel: PCI: Probing PCI hardware
kernel: PCI host bridge to bus 0000:00
kernel: pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
kernel: pci_bus 0000:00: root bus resource [mem 0x00000000-0x3fffffffffff]
kernel: pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
kernel: pci 0000:00:01.0: PCI bridge to [bus 01]
kernel: pci 0000:00:03.0: PCI bridge to [bus 04]
kernel: pci 0000:05:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
kernel: pci 0000:00:03.2: PCI bridge to [bus 05-06]
kernel: pci 0000:06:04.0: unsupported PM cap regs version (7)
kernel: pci 0000:05:00.0: PCI bridge to [bus 06]
kernel: pci 0000:00:1c.0: PCI bridge to [bus 07]
kernel: pci 0000:00:1c.1: PCI bridge to [bus 08-0c]
kernel: pci 0000:08:00.0: PCI bridge to [bus 09-0c]
kernel: pci 0000:09:00.0: PCI bridge to [bus 0a-0b]
kernel: vgaarb: setting as boot device: PCI:0000:0b:00.0
kernel: vgaarb: device added: PCI:0000:0b:00.0,decodes=io+mem,owns=io+mem,locks=none
kernel: pci 0000:0a:00.0: PCI bridge to [bus 0b]
kernel: pci 0000:00:1c.2: PCI bridge to [bus 02]
kernel: pci 0000:00:1c.3: PCI bridge to [bus 03]
kernel: pci 0000:00:1f.0: default IRQ router [8086:8d44]

Rock64 / Débian : Ajouter un disque dur externe

97 x served & 27 x viewed

Je viens de prendre un disque dur externe car j’ai pas trop confiance dans les cartes SD ( désolé Michel).

Etape 1 : Le formatage, pour cela il faut fdisk !

rock64@rock64:~$ cat /etc/debian_version 
9.9

rock64@rock64:~$ sudo whereis fdisk
fdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz

rock64@rock64:~$ dpkg -S /sbin/fdisk
util-linux: /sbin/fdisk

rock64@rock64:~$ sudo fdisk -l               
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mtdblock0: 4 MiB, 4128768 bytes, 8064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk1: 59.5 GiB, 63864569856 bytes, 124735488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9CFDF7D8-766C-43DE-9354-57097D428E8F

Device          Start       End   Sectors  Size Type
/dev/mmcblk1p1     64      8063      8000  3.9M Linux filesystem
/dev/mmcblk1p2   8064      8191       128   64K Linux filesystem
/dev/mmcblk1p3   8192     16383      8192    4M Linux filesystem
/dev/mmcblk1p4  16384     24575      8192    4M Linux filesystem
/dev/mmcblk1p5  24576     32767      8192    4M Linux filesystem
/dev/mmcblk1p6  32768    262143    229376  112M Microsoft basic data
/dev/mmcblk1p7 262144 124735454 124473311 59.4G Linux filesystem


Disk /dev/sda: 1.8 TiB, 2000398933504 bytes, 3907029167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x88185100

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1  *       64 3907024128 3907024065  1.8T  7 HPFS/NTFS/exFAT

rock64@rock64:~$ sudo mkfs.ext3 /dev/sda1
mke2fs 1.43.4 (31-Jan-2017)
/dev/sda1 contains a ntfs file system labelled 'Seagate Portable Drive'
Proceed anyway? (y,N) y
Creating filesystem with 488378008 4k blocks and 122101760 inodes
Filesystem UUID: 42a1cde2-2269-4582-b4a0-2bb6272b0990
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848

Allocating group tables: done       

A noter qu’en cas de crash durant le formatage, je conseille alors :

rock64@rock64:~$ sudo mkfs -t ext4 /dev/sda1
[sudo] password for rock64: 
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 488378008 4k blocks and 122101760 inodes
Filesystem UUID: 3e48d36d-20e7-45b8-abea-97a6b234cfcc
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information:   

Et si la connexion n’est pas stable pendant le formatage :

rock64@rock64:~$ sudo apt-get install screen
...
rock64@rock64:~$ sudo screen -dmS "format"  mkfs -t ext4 /dev/sda1
...

Etape 2 : Préparation du montage sur l’OS :

rock64@rock64:~$ sudo mkdir /disk1

rock64@rock64:~$ sudo mount /dev/sda1 /disk1

rock64@rock64:~$ df -H

Filesystem      Size  Used Avail Use% Mounted on
udev            2.1G     0  2.1G   0% /dev
tmpfs           412M  5.6M  406M   2% /run
/dev/mmcblk1p7   63G   41G   20G  68% /
tmpfs           2.1G     0  2.1G   0% /dev/shm
tmpfs           5.3M  4.1k  5.3M   1% /run/lock
tmpfs           2.1G     0  2.1G   0% /sys/fs/cgroup
/dev/mmcblk1p6  118M  1.1M  117M   1% /boot/efi
tmpfs           412M     0  412M   0% /run/user/1000
/dev/sda1       2.0T   80M  1.9T   1% /disk1

Etape 3 : Modification du fstab :

rock64@rock64:~$ sudo vi /etc/fstab 

Etape 3 bis: On peut aussi utiliser les labels:

rock64@rock64:~$ sudo e2label /dev/sda1 nextcloud
rock64@rock64:~$ sudo vi /etc/fstab 
rock64@rock64:~$ sudo cat /etc/fstab 
LABEL=boot /boot/efi vfat defaults,sync 0 0
LABEL=nextcloud /disk1 ext4 defaults 1 1

ATTENTION, il faut tester le fichier /etc/fstab AVANT le reboot … sinon c’est LA MORT

rock64@rock64:~$ sudo mount -a /etc/fstab 

Voir même un petit text de copie :

rock64@rock64:~$ sudo cp -r /var/www/html/nextcloud/ /disk1/.

Jenkins / LibVirt / Qemu / Fédora : Brouillon d’une tentative de mise en place …

49 x served & 11 x viewed

!!! CECI EST UN BROUILLON !!!

Sur Jenkins j’ai mis le bon plugins : Libvirt Slaves

C’est pour l’instant en projet … mais j’essaye de faire une installation propre afin de facilité la validation automatique :

$ apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin

$ apt install libguestfs-tools

On télécharge pour une cible armhfp :

$ curl -O https://dl.fedoraproject.org/pub/fedora/linux/releases/30/Spins/armhfp/images/Fedora-Minimal-armhfp-30-1.2-sda.raw.xz
 
$ unxz Fedora-Minimal-armhfp-30-1.2-sda.raw.xz
 
$ sudo virt-builder -v -x --get-kernel Fedora-Minimal-armhfp-30-1.2-sda.raw
command line: virt-builder -v -x --get-kernel Fedora-Minimal-armhfp-30-1.2-sda.raw
virt-get-kernel --verbose -x --add 'Fedora-Minimal-armhfp-30-1.2-sda.raw'
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: add_drive "Fedora-Minimal-armhfp-30-1.2-sda.raw" "readonly:true" "protocol:file"
libguestfs: creating COW overlay to protect original drive content
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsEd6WdG/overlay1" "qcow2" -1 "backingfile:/home/farias/Fedora-Minimal-armhfp-30-1.2-sda.raw"
…
 
$ sudo mv Fedora-Minimal-armhfp-30-1.2-sda.raw initramfs-5.0.9-301.fc30.armv7hl.img vmlinuz-5.0.9-301.fc30.armv7hl /var/lib/libvirt/images/.
 
$ sudo virt-install -v --name Fedora-Minimal-armhfp-30-1.2-sda.raw --ram 4096 --arch armv7l --import --os-variant fedora22 \
                     --disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-30-1.2-sda.raw \
                     --boot kernel=/var/lib/libvirt/images/vmlinuz-5.0.9-301.fc30.armv7hl,initrd=/var/lib/libvirt/images/initramfs-5.0.9-301.fc30.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait"

File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in 
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Pour fixer ce problème :

$ sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSL

$ sudo rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info

$ sudo pip install pyopenssl

On reprends l’installation :

$ sudo virt-install -v --name Fedora-Minimal-armhfp-30-1.2-sda.raw --ram 4096 --arch armv7l --import --os-variant fedora22 \
                     --disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-30-1.2-sda.raw \
                     --boot kernel=/var/lib/libvirt/images/vmlinuz-5.0.9-301.fc30.armv7hl,initrd=/var/lib/libvirt/images/initramfs-5.0.9-301.fc30.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait"

Pour l’instant j’ai un problème sur le lancement :

....
[  OK  ] Started udev Wait for Complete Device Initialization.
[  452.577419] audit: type=1130 audit(1568017972.419:65): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-udev-settle comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
         Starting Activation of DM RAID sets...
[  OK  ] Started Activation of DM RAID sets.
[  455.227583] audit: type=1130 audit(1568017975.069:66): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dmraid-activation comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  455.239316] audit: type=1131 audit(1568017975.081:67): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dmraid-activation comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /boot...
[  456.625813] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Mounted /boot.
         Mounting /boot/efi...
[  OK  ] Mounted /boot/efi.
[  OK  ] Reached target Local File Systems.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Restore /run/initramfs on shutdown...
         Starting Create Volatile Files and Directories...
         Starting Rebuild Dynamic Linker Cache...
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  461.320751] audit: type=1130 audit(1568017981.162:68): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-read-write comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  461.328420] audit: type=1131 audit(1568017981.170:69): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-read-write comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  OK  ] Started Restore /run/initramfs on shutdown.[  461.762211] audit: type=1130 audit(1568017981.604:70): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dracut-shutdown comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
 
[  OK  ] Started Rebuild Dynamic Linker Cache.
[  468.259621] audit: type=1130 audit(1568017988.101:71): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=ldconfig comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  OK  ] Started Create Volatile Files and Directories.
[  470.643545] audit: type=1130 audit(1568017990.485:72): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
         Starting Security Auditing Service...
         Starting Rebuild Journal Catalog...
[  473.210959] audit: type=1305 audit(1568017993.053:73): audit_enabled=1 old=1 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 res=1
[  OK  ] Started Rebuild Journal Catalog.
         Starting Update is Completed...
[  OK  ] Started Update is Completed.
[  OK  ] Started Security Auditing Service.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Started daily update of the root trust anchor for DNSSEC.
[  OK  ] Listening on SSSD Kerberos…ache Manager responder socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting NTP client/server...
         Starting firewalld - dynamic firewall daemon...
         Starting OpenSSH ecdsa Server Key Generation...
         Starting OpenSSH rsa Server Key Generation...
         Starting Initial Setup configuration program...
         Starting System Security Services Daemon...
[  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
         Starting OpenSSH ed25519 Server Key Generation...
[  OK  ] Started dnf makecache --timer.
[  OK  ] Reached target Timers.
[ 2049.261075] fbcon: Taking over console
================================================================================
================================================================================
1) [x] Language settings                 2) [x] Time settings
       (English (United States))                (America/New_York timezone)
3) [x] Network configuration             4) [!] Root password
       (Wired (eth0) connected)                 (Password is not set.)
5) [!] User creation
       (No user will be created)

C’est super long pour avoir « fbcon » .

A suivre.

JENKINS : Mémo pour l’update (version 2.193)

En passant

94 x served & 9 x viewed

Je me fais un petit mémo pour l’update de Jenkins :

jenkins:~$ sudo wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
--2019-09-04 08:08:33--  http://mirrors.jenkins-ci.org/war/latest/jenkins.war
Resolving mirrors.jenkins-ci.org (mirrors.jenkins-ci.org)... 52.202.51.185
Connecting to mirrors.jenkins-ci.org (mirrors.jenkins-ci.org)|52.202.51.185|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp-chi.osuosl.org/pub/jenkins/war/2.193/jenkins.war [following]
--2019-09-04 08:08:34--  http://ftp-chi.osuosl.org/pub/jenkins/war/2.193/jenkins.war
Resolving ftp-chi.osuosl.org (ftp-chi.osuosl.org)... 64.50.236.52, 2600:3402:200:227::2
Connecting to ftp-chi.osuosl.org (ftp-chi.osuosl.org)|64.50.236.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 78246752 (75M) [application/x-java-archive]
Saving to: ‘jenkins.war’
 
jenkins.war                               100%[=====================================================================================>]  74.62M  1.80MB/s    in 45s
 
2019-09-04 08:09:19 (1.66 MB/s) - ‘jenkins.war’ saved [78246752/78246752]
 
jenkins:~$ sudo systemctl stop jenkins
jenkins:~$ cp /usr/share/jenkins/jenkins.war jenkins.war.old
jenkins:~$ sudo mv jenkins.war /usr/share/jenkins/jenkins.war
jenkins:~$ sudo systemctl start jenkins

J’adore Jenkins 🙂

MUNIN : Comment ajouter un multiping ?

100 x served & 19 x viewed

Le multiping permet d’avoir sur un même graphique le ping de plusieurs noms de domaine. Cela permet de comprendre quelques problèmes.

Voici donc les étapes :

Etape n°1 : : Ajouter dans /etc/munin/plugin-conf.d/munin-node (à la fin):

[multiping]       
env.host www.orange.fr www.cyber-neurones.org
env.ping_args -c 3

Etape n°2 : : Le lien symbolique

$ sudo ln -s /usr/share/munin/plugins/multiping /etc/munin/plugins/multiping
$ sudo munin-node-configure

Normalement on doit voir :

...
multiping                  | yes  |
...

Etape n°3 : : Relancer le service

$ sudo systemctl restart munin-node.service

Etape n°4 : Le test via le telnet :

$ telnet localhost 4949
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
list
cpu df df_inode entropy forks freeboxv5_atm freeboxv5_attenuation freeboxv5_crc freeboxv5_fec freeboxv5_hec freeboxv5_rates freeboxv5_snr freeboxv5_status freeboxv5_uptime fw_packets http_loadtime httpresponsetime if_err_eth0 if_err_wlan0 if_eth0 if_wlan0 interrupts load memory multiping munin_stats netstat nfs4_client nfs_client ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off ntp_offset open_files open_inodes proc_pri processes swap temper_x threads uptime users vmstat
fetch multiping
site1_packetloss.value 0
site1.value 0.017078
site2_packetloss.value 0
site2.value 0.016857

L’autre solution de test :

$ sudo su - munin --shell=/bin/bash
$ /usr/share/munin/munin-update --debug --nofork --host localhost.localdomain --service multiping

Ou encore :

$ sudo munin-run multiping
site1_packetloss.value 0
site1.value 0.016789
site2_packetloss.value 0
site2.value 0.016709

Bien vérifier les DNS dans /etc/resolv.conf ( ou dans /etc/resolvconf.conf ), voir même faire un ping avant.

A noter que le multiping est dans la catégorie « network ».

Dernier point, si vous êtes sur une Raspberry il faut penser à installer dnsutils pour avoir les outils dig et nslookup:

$ apt-get install dnsutils
$ dig www.cyber-neurones.org

; <<>> DiG 9.10.3-P4-Raspbian <<>> www.cyber-neurones.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58459
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1460
;; QUESTION SECTION:
;www.cyber-neurones.org.		IN	A

;; ANSWER SECTION:
www.cyber-neurones.org.	2881	IN	A	188.130.25.102
www.cyber-neurones.org.	2881	IN	A	188.130.25.202

;; Query time: 17 msec
;; SERVER: 81.253.149.10#53(81.253.149.10)
;; WHEN: Thu May 23 21:28:00 UTC 2019
;; MSG SIZE  rcvd: 83

$ nslookup www.cyber-neurones.org
Server:		81.253.149.10
Address:	81.253.149.10#53

Non-authoritative answer:
Name:	www.cyber-neurones.org
Address: 188.130.25.202
Name:	www.cyber-neurones.org
Address: 188.130.25.102