Kernel Sees Partitions Where There Aren't Any

Bug #2064699 reported by DiagonalArg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

I presume this should be reported against the kernel, but linux-image-generic doesn't work

:~$ # /dev/sdb is a 2T SSD
:~$ # This device has no partitions, just a luks2 header
:~$ sudo cryptsetup isLuks /dev/sdb && echo "true"
true

:~$ # Nevertheless, the kernel sees partitions:
:~$ lsblk /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 1.1T 0 part
└─sdb2 8:18 0 197.3G 0 part

:~$ # This is not the case with my other 2T disks
:~$ sudo cryptsetup isLuks /dev/sda && echo "true"
true
:~$ lsblk /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
:~$ sudo cryptsetup isLuks /dev/sdc && echo "true"
true
:~$ lsblk /dev/sdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdc 8:32 0 1.8T 0 disk

:~$ # Now if I open /dev/sdb, the encrypted disk is available, but the partitions remain:
:~$ sudo cryptsetup open /dev/sdb luks.root.internal
Enter passphrase for /dev/sdb:
:~$ lsblk /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 1.1T 0 part
├─sdb2 8:18 0 197.3G 0 part
└─luks.root.internal 253:0 0 1.8T 0 crypt

:~$ # I tried wiping the LUKS header on /dev/sdb and recreating it, with no effect.

:~$ # The kernel I'm running is vmlinuz-6.8.0-31-generic
:~$ # I was able to check this right from the 24.04 installer.
:~$ # This is a longstanding problem, perhaps as long as 10 years.
:~$ # I've seen it on many disks, but never reported the issue.

In case it might be useful, running parted on /dev/sdb, I see:

(parted) print
Error: /dev/sdb: unrecognized disk label
Model: ATA Dogfish SSD 2TB (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Tags: noble
description: updated
description: updated
Paul White (paulw2u)
tags: added: noble
affects: ubuntu → linux (Ubuntu)
Revision history for this message
DiagonalArg (diagonalarg) wrote :

I did a luksConvertKey on all 3 drives, sda, sdb, sdc:

:~$ cryptsetup luksConvertKey --key-slot 0 -h sha512 --pbkdf pbkdf2 -y /dev/sda

Now, sda and sdb show no extra partitions, but sdc does:

:~$ lsblk /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdc 8:32 0 1.8T 0 disk
└─sdc2 8:34 0 1014.7G 0 part

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.