Fixing quirky SSD (globally duplicate ID), compiling kernel

shadowpho

New Member
Jun 1, 2023
2
0
1
I bought 2x 2TB TeamForce SSD (PCIE4, $80, super fast).

However they seem to have the same ID (same bug here: https://bugzilla.kernel.org/show_bug.cgi?id=216049). This means that only one of the SSDs show up. The "solution" is to modify kernel source to add the following lines to /drivers/nvme/host/pci.c and recompile the kernel.
1685591949316.png

So I got the latest (master proxmox) kernel, modified the file above with quirks and built it successfully. If I can prove it out I'll sent it to include it upstream.

However the issue is that I fail to install new kernel:

Code:
root@pve:/mnt/pve/nvme1TB_q/KERNEL/pve-kernel# dpkg -i pve-kernel-6.2.16-1-pve_6.2.16-1_amd64.deb
(Reading database ... 137023 files and directories currently installed.)
Preparing to unpack pve-kernel-6.2.16-1-pve_6.2.16-1_amd64.deb ...
Unpacking pve-kernel-6.2.16-1-pve (6.2.16-1) over (6.2.16-1) ...
Setting up pve-kernel-6.2.16-1-pve (6.2.16-1) ...
depmod: WARNING: could not open modules.order at /lib/modules/6.2.16-1-pve: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.2.16-1-pve: No such file or directory
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 6.2.16-1-pve /boot/vmlinuz-6.2.16-1-pve
run-parts: executing /etc/kernel/postinst.d/dkms 6.2.16-1-pve /boot/vmlinuz-6.2.16-1-pve
dkms: WARNING: Linux headers are missing, which may explain the above failures.
      please install the linux-headers-6.2.16-1-pve package to fix this.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 6.2.16-1-pve /boot/vmlinuz-6.2.16-1-pve
update-initramfs: Generating /boot/initrd.img-6.2.16-1-pve
cat: /var/tmp/mkinitramfs_fJh096/lib/modules/6.2.16-1-pve/modules.builtin: No such file or directory
find: ‘/var/tmp/mkinitramfs_fJh096/lib/modules/6.2.16-1-pve/kernel’: No such file or directory
W: Can't find modules.builtin.modinfo (for locating built-in drivers' firmware, supported in Linux >=5.2)
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_fJh096/lib/modules/6.2.16-1-pve: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_fJh096/lib/modules/6.2.16-1-pve: No such file or directory
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
run-parts: executing /etc/kernel/postinst.d/proxmox-auto-removal 6.2.16-1-pve /boot/vmlinuz-6.2.16-1-pve
run-parts: executing /etc/kernel/postinst.d/zz-proxmox-boot 6.2.16-1-pve /boot/vmlinuz-6.2.16-1-pve
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 6.2.16-1-pve /boot/vmlinuz-6.2.16-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.11-2-pve
Found initrd image: /boot/initrd.img-6.2.11-2-pve
Found linux image: /boot/vmlinuz-5.15.107-2-pve
Found initrd image: /boot/initrd.img-5.15.107-2-pve
Found linux image: /boot/vmlinuz-5.15.102-1-pve
Found initrd image: /boot/initrd.img-5.15.102-1-pve
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

I feel like I am so close, but for some reason grub isn't picking up the change. Any ideas on how to fix this?
 
Last edited:
After wiping everything and doing clean build (with modification) everything works now. The quirks are fixed, and I can see 2 SSDs. Now only to figure out how to generate patches and submit them as these are being pushed heavily due to their speed\price :)