[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1012298: marked as done (linux-image-5.17.0-1-amd64: New partition doesn't appear in /dev anymore with kernel 5.17 (repro script included))



Your message dated Mon, 06 Jun 2022 20:10:09 +0000
with message-id <E1nyJ3B-000Fd7-F6@fasolo.debian.org>
and subject line Bug#1012298: fixed in linux 5.18.2-1
has caused the Debian Bug report #1012298,
regarding linux-image-5.17.0-1-amd64: New partition doesn't appear in /dev anymore with kernel 5.17 (repro script included)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1012298: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012298
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: src:linux
Version: 5.17.3-1
Severity: normal
X-Debbugs-Cc: misch@google.com

Dear Maintainer,

We're using an image build setup to create raw disk images that contain an EFI System Partition (ESP) with a small live Linux system.
The image build process started to fail after upgrading to kernel 5.17 as the newly created ESP (created with parted) doesn't appear automatically in /dev anymore.
We've added a partscan run to our image build setup but that didn't fix the issue. So far only downgrading to kernel 5.16 fixes the issue.

So we would kindly ask for help with troubleshooting this issue.
Please see the attached repro.sh for a minimal Bash script the reproduces the issue.

Best,

Michael Schaller 


Reproduction instructions:
--------------------------
1) Install Debian testing (I did a fresh install in a VM)
2) apt install parted dosfstools
3) Edit /etc/apt/sources.list and add this new source to be able to install the last 5.16 kernel:
   deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20220407T025351Z/ testing main
4) apt install linux-image-5.16.0-6-amd64  (and headers if you need them on your system)
5) Reboot into the 5.16 and 5.17 kernel respectively and run repro.sh.


Results:
--------

Kernel 5.17:
------------

$ uname -r
5.17.0-1-amd64


$ sudo ./repro.sh
...
+ parted -s /dev/loop0 mklabel gpt
+ parted -s /dev/loop0 mkpart primary fat32 1MiB 100%
+ parted -s /dev/loop0 set 1 boot on
+ partprobe /dev/loop0
+ mkfs.vfat /dev/loop0p1
mkfs.fat 4.2 (2021-01-31)
mkfs.vfat: unable to open /dev/loop0p1: No such file or directory
...


Kernel 5.16:
------------

$ uname -r
5.16.0-6-amd64


$ sudo ./repro.sh
...
+ parted -s /dev/loop0 mklabel gpt
+ parted -s /dev/loop0 mkpart primary fat32 1MiB 100%
+ parted -s /dev/loop0 set 1 boot on
+ partprobe /dev/loop0
+ mkfs.vfat /dev/loop0p1
mkfs.fat 4.2 (2021-01-31)
...



-- Package-specific info:
** Version:
Linux version 5.17.0-1-amd64 (debian-kernel@lists.debian.org) (gcc-11 (Debian 11.2.0-20) 11.2.0, GNU ld (GNU Binutils for Debian) 2.38) #1 SMP PREEMPT Debian 5.17.3-1 (2022-04-18)

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
#!/bin/bash

set -ex

if [[ "${EUID}" != 0 ]]; then
  >&2 echo "root rights required"
  exit 2
fi

img='/tmp/raw.img'  # Raw disk image file.
dev=''  # Loop device associated with the raw disk image file.
cfg='/tmp/setup-storage-disk-config'  # setup-storage disk config file.
res='/tmp/setup-storage-results'  # setup-storage results directory.

function cleanup {
  set +e
  rm -rf "${res}"
  rm -f "${cfg}"
  if [ -n "${dev}" ]; then
    # Free loop device.
    losetup --detach "${dev}"
  fi
  rm -f "${img}"
}
trap cleanup EXIT

# Create sparse file for a raw disk image.
dd if=/dev/zero status=none of="${img}" bs=1 count=0 seek=16MiB

# Associate a loop device with the raw disk image.
losetup --find "${img}"

# Get the associated loop device.
dev=$(losetup --associated "${img}" | cut -d ':' -f 1)
if [ -z "${dev}" ]; then
  >&2 echo 'failed to find associated loop device'
  exit 1
fi

# Create GPT partition table with an ESP.
parted -s "${dev}" mklabel gpt
parted -s "${dev}" mkpart primary "fat32" 1MiB 100%
parted -s "${dev}" set 1 boot on
partprobe "${dev}"  # For good measure but not needed on kernel 5.16
mkfs.vfat  "${dev}p1"  # This command fails with kernel 5.17

--- End Message ---
--- Begin Message ---
Source: linux
Source-Version: 5.18.2-1
Done: Salvatore Bonaccorso <carnil@debian.org>

We believe that the bug you reported is fixed in the latest version of
linux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1012298@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <carnil@debian.org> (supplier of updated linux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 06 Jun 2022 20:45:23 +0200
Source: linux
Architecture: source
Version: 5.18.2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Changed-By: Salvatore Bonaccorso <carnil@debian.org>
Closes: 927252 1008933 1011168 1012298
Changes:
 linux (5.18.2-1) unstable; urgency=medium
 .
   * New upstream stable update:
     https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.18.1
     https://www.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.18.2
     - netfilter: nf_tables: disallow non-stateful expression in sets earlier
       (CVE-2022-1966)
     - pipe: Fix missing lock in pipe_resize_ring() (ZDI-CAN-17291)
     - netfilter: nf_tables: sanitize nft_set_desc_concat_parse() (CVE-2022-1972)
     - [x86] fpu: KVM: Set the base guest FPU uABI size to sizeof(struct
       kvm_xsave) (Closes: #1011168)
     - KVM: x86: avoid calling x86 emulator without a decoded instruction
       (CVE-2022-1852)
 .
   [ Diederik de Haas ]
   * [arm64,armel.marvell] Remove duplicate MTD_SPI_NOR config option
   * [arm64] Remove duplicate CAN_MCP251X config option
   * drivers/net/can/spi: Enable CAN_HI311X as module (Closes: #927252)
 .
   [ Henning Schild ]
   * [x86] drivers/platform/x86: Enable SIEMENS_SIMATIC_IPC as module
   * [x86] drivers/leds: Enable LEDS_SIEMENS_SIMATIC_IPC as module
   * [x86] drivers/wdt: Enable SIEMENS_SIMATIC_IPC_WDT as module
 .
   [ Lubomir Rintel ]
   * [x86] Enable X86_ANDROID_TABLETS as a module
 .
   [ Michal Simek ]
   * [arm64] Enable Xilinx PHY driver and SI5341 clock driver
 .
   [ Zhang Ning ]
   * [arm64] Enable COMMON_CLK_PWM which is needed for some Amlogic SBCs
   * [arm64] Enable Khadas MCU and fan
   * [arm64] cpufreq: Enable SCPI cpufreq driver
   * [arm64] cpuidle: Enable CONFIG_ARM_PSCI_CPUIDLE
 .
   [ Ben Hutchings ]
   * drivers/firmware: Build ISCSI_IBFT as module on all architectures with
     ACPI. Thanks to Eric Mackay. (Closes: #1008933).
   * intel-iommu: Correct matching of the "intgpu_off" option value.
     Thanks to Markus Kolb.
   * random: Enable RANDOM_TRUST_BOOTLOADER. This can be reverted using the
     kernel parameter: random.trust_bootloader=off
 .
   [ Bastian Blank ]
   * [amd64] Enable X86_SGX.
 .
   [ Salvatore Bonaccorso ]
   * block, loop: support partitions without scanning (Closes: #1012298)
   * Set ABI to 1
Checksums-Sha1:
 bbc978531c7e2163a2289e3e0bc99e99839401a1 251540 linux_5.18.2-1.dsc
 a90a7730fbeee7e645054ece183fe17531c97120 131643692 linux_5.18.2.orig.tar.xz
 e0619b35776f131e195dac987f6b40cdd3444646 1309660 linux_5.18.2-1.debian.tar.xz
 65338b5ed8b7d44ad3a7ab4f0fb6e4cb319f9f67 6456 linux_5.18.2-1_source.buildinfo
Checksums-Sha256:
 fbff0455062e7392458992cbff2373f61b7c0073fb5ef4749c4b5ded3ae19cb8 251540 linux_5.18.2-1.dsc
 1f38e1d57100000738cefce48a6e0793f40ea3483673400b66a6608548813637 131643692 linux_5.18.2.orig.tar.xz
 42fadd9251319aa9be5970d2b1379406411672fba4f6d91fa493593a8a12fa2f 1309660 linux_5.18.2-1.debian.tar.xz
 b2653b3570fdda4bdff0138158a0e47449aba949a4089a31bc6342a280a13611 6456 linux_5.18.2-1_source.buildinfo
Files:
 74154bc9d12f3b4eb0c84e95f6a9fb6f 251540 kernel optional linux_5.18.2-1.dsc
 382bb41286c2d066099a85868ade9414 131643692 kernel optional linux_5.18.2.orig.tar.xz
 421f4510eb8c14390b1dfdf29134c435 1309660 kernel optional linux_5.18.2-1.debian.tar.xz
 2de951e2c66717a70faa5ee66660db8d 6456 kernel optional linux_5.18.2-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAmKeS+xfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89EaC0P/RG4h3wXhJLuHkx+lREXUpG7T4xcivco
rfxGqun9FJxVOEAnbkzdUH4aDvUNJ83/sH+1k1kUYpjyzp+6hiiPkRUd1WJYmlXf
sVvkWJIs25yxNtzCeLm419vPwS2gMCnLgg/WjsLr2Yl59ef/KIedxDDzdcdYBigG
D6yR7ecIRAq1Fuiuv1YcpEUb+TC1TwF1mjiOTOkyqCyR+4Bi9/Lg1GoTIzDfhqUe
K4As4o7XU85c/bACc/UoVrtOWLE+hQ7X9tZWOfr8CKLEOyy+pDO2GJPmUcLLpl0C
5qcz44+gQigWXMuZ1cG2cN8L8By5hJWKGBb9ny471ElPz4/x/GynHyRz6hVoaeet
1Pgyexi4Rcoc1CzLP+iDCMwowBP6PBSWFc/yj8/76wcgx1h6XlKJwNMMTOG0SCCO
WbijgEaTgSD3f/JpB7PK9i6lfnCk8PgQXsgP2Njq8ngnLBylqFZMfyX2Mu/BChzA
Nozi5zoVDqAmMvtyb5tywkdzXRYtrU8flMKCtxhi5KKmRJZYMGV4HB8nv6TY6f6f
lGLPIS4H7MQaoUiQOVfMGALEF1JKm7IHaNdVadGQNV5NBXr2ksUFv+jPqQVQE1WN
VtEtV1F63MlbLyh0ZTkF2LUHUCXS5pxhcuPYST4u4f2/mJvzzSo/syMf6xB7byxA
DMFKZchdKO03
=P5yF
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: