Debian: カーネルをアップグレードするときの新しいエラーメッセージ (4.9 へ) - ioctl エラーの再読み込み

Debian: カーネルをアップグレードするときの新しいエラーメッセージ (4.9 へ) - ioctl エラーの再読み込み

Debian 9.0 Stretchのカーネルを4.9.0-1-amd64にアップグレードしています。

パッケージがインストールされたがプロセスが終了すると、不明なエラーが発生します。

device-mapper: reload ioctl on osprober-linux-sda2 failed: Device or resource busy
Command failed

再起動することも心配され、正しく起動しません。

実行dpkg-reconfigure linux-image-4.9.0-1-amd64しても同じエラーが発生します。

奇妙なことに、これまではパーティションを分割すること/etc/fstabなくプロセスが進行していましたsda2。最後のパッケージのアップグレード後に動作が停止しました(実際、最後のパッケージを232-18にアップグレードした後に初めてエラーを見たことを誓うことができましたudev)。 Jessieの仮想マシンはまだうまくいきます。

またこれですfstab

$cat /etc/fstab
/dev/sda1 / ext3 errors=remount-ro,noatime 0 1
/dev/sda3 none swap sw 0 0

しかし、それを実行すると、これはext3ログパーティションであることblkidを覚えています。/dev/sda2

/dev/sda1: UUID="43dcd715-1914-4da8-8e55-27879705920a" EXT_JOURNAL="b153f326-cb4e-491b-9b38-f9750dcf5165" TYPE="ext3" PARTUUID="8aac691c-01"
/dev/sda2: LABEL="j-my-dev" UUID="b153f326-cb4e-491b-9b38-f9750dcf5165" LOGUUID="b153f326-cb4e-491b-9b38-f9750dcf5165" TYPE="jbd" PARTUUID="8aac691c-02"
/dev/sda3: UUID="a04c0b69-07d5-40e1-8c80-6914118f6df4" TYPE="swap" PARTUUID="8aac691c-03"

今後の調査の後でも、oldを参照している吊り下げられたファイルが見つかりましたsda2

内容は/etc/blkid.tab次のとおりです。

<device DEVNO="0x0802" TIME="1414777337.116803" UUID="B24u3l-mvwB-vyxK-GRNw-vc6o-r2sS-NDgVru" TYPE="LVM2_member">/dev/sda2</device>

削除しましたが、正しいblkid.tab内容が期待どおりなので、違いはありません。/var/run/blkid/blkid.tab

<device DEVNO="0x0801" TIME="1487991512.317454" UUID="43dcd715-1914-4da8-8e55-27879705920a" EXT_JOURNAL="b153f326-cb4e-491b-9b38-f9750dcf5165" TYPE="ext3" PARTUUID="8aac691c-01">/dev/sda1</device>
<device DEVNO="0x0802" TIME="1487991415.63466" LABEL="j-my-dev" UUID="b153f326-cb4e-491b-9b38-f9750dcf5165" LOGUUID="b153f326-cb4e-491b-9b38-f9750dcf5165" TYPE="jbd" PARTUUID="8aac691c-02">/dev/sda2</device>
<device DEVNO="0x0803" TIME="1487991512.507280" UUID="a04c0b69-07d5-40e1-8c80-6914118f6df4" TYPE="swap" PARTUUID="8aac691c-03">/dev/sda3</device>

古いプログラムを実行してもdpkg-reconfigure同じエラーが発生します。

upgrade-grub私はまた呼び出されるエラーを正確に見つけることができましたdpkg-reconfigure。一人で実行:

#update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.9.0-1-amd64
Found initrd image: /boot/initrd.img-4.9.0-1-amd64
device-mapper: reload ioctl on osprober-linux-sda2 failed: Device or resource busy
Command failed
done

追跡してみると、upgrade-grubこのようなことが発生していることが明らかで、スクリプトを読んでみると/etc/grub.d/30_os-prober問題のコマンドはですos-prober

実行してみてください:

#os-prober 
device-mapper: reload ioctl on osprober-linux-sda2 failed: Device or resource busy
Command failed

エラーは、次のos-prober呼び出し時に発生します。

#/usr/bin/linux-boot-prober /dev/sda2
device-mapper: reload ioctl on osprober-linux-sda2 failed: Device or resource busy
Command failed

私もそれを見ながら30_os-proberそれに気づいたGRUB_OS_PROBER_SKIP_LIST

if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
  echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
  continue
fi

クイック Google 検索で次の記事が公開されました。grub2が特定のパーティションを無視できるようにするその結果、次のように入力しました/etc/default/grub

GRUB_OS_PROBER_SKIP_LIST="b153f326-cb4e-491b-9b38-f9750dcf5165@/dev/sda2"

ただし、エラーは引き続き発生し、30_os-proberスクリプトをデバッグモードに切り替えると、処理を担当するコードブロックがGRUB_OS_PROBER_SKIP_LIST実行されないことがわかります。たとえば、if上記の行にも達しません。

私のGRUBのバージョンはです2.02~beta3-5。どうすればいいですか?

更新:@GaD3Rからの要求に応じて、libmapper-devは1.02.1です。

答え1

明らかに使用されていないため、GRUB_OS_PROBER_SKIP_LIST(バグ?)オペレーティングシステムのすべてのパーティションを検索しないようにGRUB / os-proberを設定する必要がありました。

/etc/default/grubしたがって、次の行に追加されます。

GRUB_DISABLE_OS_PROBER=true

これでコマンドが正常にdpkg-reconfigure linux-image-4.9.0-1-amd64動作しますupdate-grub

問題のサーバーも4.9.0-1-amd64カーネルを使用して正常に再起動されました。

すべてのデバッグと解決の後に関連する問題を発見しました。 ここ、またos-prober代替として完全な除去を支持した。このソリューションは、スクリプトを呼び出す前にバイナリが存在することを確認するために機能します。

os-proberマルチOSだけが必要なようですが、私の場合はそうではありません。

@Ferenc Wágnerでコメントに続き歴史的問題os-proberを使用してLinux専用VMの文脈からos-proberを削除しても害がないという意見を共有しながら、実際にVMから削除しました。

答え2

device-mapper: reload ioctl on osprober-linux-sda1 failed: Device or resource busyミラーのため、このエラーが発生しますzfs

/etc/grub.d/30_os-proberos-proberマッチング装置による出力:

OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"

機器チェック場所loop

for OS in ${OSPROBED} ; do

&デバイスを返すのではなくエラーが発生するos-proberため、チェックインには何の影響もありません。ioctl$OS$GRUB_OS_PROBER_SKIP_LIST/etc/grub.d/30_os-prober

/etc/default/grub回避策は、次の形式でデバイスを追加することですUUID@device_path

GRUB_OS_PROBER_SKIP_LIST="1234567899273705219@/dev/sda1 1234567899273705219@/dev/sdb1"

&編集する/usr/bin/os-prober

--- /usr/bin/os-prober  2018-10-15 17:46:19.420933449 +0100
+++ /usr/bin/os-prober.bak  2018-10-15 16:44:49.927531809 +0100
@@ -167,12 +167,6 @@ for partition in $(partitions); do
        continue
    fi

-   # Skip user defined devices in /etc/default/grub
-   if echo $GRUB_OS_PROBER_SKIP_LIST | grep -qw $partition; then
-       debug "$partition: probing disabled by user"
-       continue
-   fi
-
    # do btrfs processing here; both mounted and unmounted will
    # be handled by 50mounted-tests so we can do a subvol only once.
    type=$(blkid -o value -s TYPE $mapped || true)
  • Windowsでテスト済み/アーキテクチャLinuxデュアルブートシステム。

今後:

[stuart@manjaro ~]$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-hardened
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux-hardened.img
Found initrd fallback image: /boot/initramfs-linux-hardened-fallback.img
Found linux image: /boot/vmlinuz-4.14-rt-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-4.14-rt-x86_64.img
Found initrd fallback image: /boot/initramfs-4.14-rt-x86_64-fallback.img
device-mapper: reload ioctl on osprober-linux-sda1  failed: Device or resource busy
Command failed.
device-mapper: reload ioctl on osprober-linux-sdb1  failed: Device or resource busy
Command failed.
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
###### - Grub-btrfs: Auto-detect Start - ######
# found 0 snapshot(s)
# No snapshot found 
# make sure you have at least one snapshot 
# or please file a bug report at "https://github.com/Antynea/grub-btrfs"
###### - Grub-btrfs: Auto-detect End   - ######
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

後ろに:

[stuart@manjaro ~]$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-hardened
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux-hardened.img
Found initrd fallback image: /boot/initramfs-linux-hardened-fallback.img
Found linux image: /boot/vmlinuz-4.14-rt-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-4.14-rt-x86_64.img
Found initrd fallback image: /boot/initramfs-4.14-rt-x86_64-fallback.img
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
###### - Grub-btrfs: Auto-detect Start - ######
# found 0 snapshot(s)
# No snapshot found 
# make sure you have at least one snapshot 
# or please file a bug report at "https://github.com/Antynea/grub-btrfs"
###### - Grub-btrfs: Auto-detect End   - ######
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

関連情報