Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

30 views
Skip to first unread message

Michael Schaller

unread,
Jun 3, 2022, 4:00:03 AM6/3/22
to
Package: src:linux
Version: 5.17.3-1
Severity: normal
X-Debbugs-Cc: mi...@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...@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)
repro.sh

Michael Schaller

unread,
Jun 3, 2022, 4:00:03 AM6/3/22
to
Note that on kernel 5.17 we also see this error in the kernel log:
[ 24.206158] I/O error, dev loop0, sector 32640 op 0x0:(READ) flags
0x80700 phys_seg 1 prio class 0

Michael Schaller

unread,
Jun 3, 2022, 8:10:02 AM6/3/22
to
I've tested some vanilla stable kernels (without Debian patches) and
can confirm that 5.17.0 and 5.18.1 (latest) are affected. Kernel
5.16.18 isn't affected.

I then did a git bisect as outlined in
https://wiki.debian.org/DebianKernel/GitBisect and that pointed
towards this commit as the first bad commit:
https://github.com/torvalds/linux/commit/1ebe2e5f9d68e94c524aba876f27b945669a7879

Michael Schaller

unread,
Jun 3, 2022, 9:00:03 AM6/3/22
to

Debian Bug Tracking System

unread,
Jun 3, 2022, 9:10:02 AM6/3/22
to
Processing control commands:

> tag -1 upstream
Bug #1012298 [src:linux] linux-image-5.17.0-1-amd64: New partition doesn't appear in /dev anymore with kernel 5.17 (repro script included)
Added tag(s) upstream.

--
1012298: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012298
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

Diederik de Haas

unread,
Jun 3, 2022, 9:10:02 AM6/3/22
to
Control: tag -1 upstream
On Friday, 3 June 2022 13:58:03 CEST Michael Schaller wrote:
> I've tested some vanilla stable kernels (without Debian patches) and
> can confirm that 5.17.0 and 5.18.1 (latest) are affected. Kernel
> 5.16.18 isn't affected.
>
> a git bisect pointed towards this commit as the first bad commit:
> https://github.com/torvalds/linux/commit/1ebe2e5f9d68e94c524aba876f27b945669a7879

https://lore.kernel.org/all/20211122130625...@lst.de/ is linked in
that commit and a recent reply points to sth similar as you see:
https://lore.kernel.org/all/Yo4+zEnrBTnoEMCz@T590/

If you agree, then it seems to me that the best course of action seems
to get involved in that discussion.
signature.asc

Michael Schaller

unread,
Jun 3, 2022, 9:30:03 AM6/3/22
to
I agree. I've tested patch
https://lore.kernel.org/r/20220527055806...@lst.de and it
fixes the issue.
However the patch doesn't cleanly apply to 5.18.1 and so I've
requested a backport to 5.17 and 5.18.

Diederik de Haas

unread,
Jun 3, 2022, 11:40:03 AM6/3/22
to
Control: forwarded -1 https://lore.kernel.org/linux-block/CALt099JajMVCwHgdRdRSF1uhNC=EO+tTq4T4Bg...@mail.gmail.com/T/#u
I've made an attempt at backporting it to 5.18.1 and now 'debian/rules orig'
succeeds. I have not tried building a (Debian) kernel with it or verified that
it also fixes the issue with a 5.18.1 kernel.
block-loop-support-partitions-without-scanning.patch
signature.asc

Debian Bug Tracking System

unread,
Jun 3, 2022, 11:40:03 AM6/3/22
to
Processing control commands:

> forwarded -1 https://lore.kernel.org/linux-block/CALt099JajMVCwHgdRdRSF1uhNC=EO+tTq4T4Bg...@mail.gmail.com/T/#u
Bug #1012298 [src:linux] linux-image-5.17.0-1-amd64: New partition doesn't appear in /dev anymore with kernel 5.17 (repro script included)
Set Bug forwarded-to-address to 'https://lore.kernel.org/linux-block/CALt099JajMVCwHgdRdRSF1uhNC=EO+tTq4T4Bg...@mail.gmail.com/T/#u'.

Bastian Blank

unread,
Jun 3, 2022, 1:30:02 PM6/3/22
to
On Fri, Jun 03, 2022 at 03:47:39AM -0400, Michael Schaller wrote:
> # Associate a loop device with the raw disk image.
> losetup --find "${img}"

This ought to use "--partscan". Otherwise your device is not partioned.

Bastian

--
There's a way out of any cage.
-- Captain Christopher Pike, "The Menagerie" ("The Cage"),
stardate unknown.

Debian Bug Tracking System

unread,
Jun 6, 2022, 4:40:03 PM6/6/22
to
Your message dated Mon, 06 Jun 2022 20:10:09 +0000
with message-id <E1nyJ3B-...@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 ow...@bugs.debian.org
immediately.)
repro.sh
0 new messages