diff -Nru hw-detect-1.117ubuntu7/debian/changelog hw-detect-1.117ubuntu8/debian/changelog --- hw-detect-1.117ubuntu7/debian/changelog 2019-03-22 17:24:15.000000000 -0400 +++ hw-detect-1.117ubuntu8/debian/changelog 2020-02-25 04:20:32.000000000 -0500 @@ -1,3 +1,13 @@ +hw-detect (1.117ubuntu8) focal; urgency=medium + + * Add Intel RAID/RST detection with NVMe devices to the installer + - disk-detect.templates: add option 'disk-detect/activate_remapped_nvme' + for preseeding. + - disk-detect.sh: detect NVMe devices with + 'disk-detect/activate_remapped_nvme=true'. + + -- Hsieh-Tseng Shen Tue, 25 Feb 2020 04:20:32 -0500 + hw-detect (1.117ubuntu7) eoan; urgency=medium * Add iSCSI iBFT support to the installer (LP: #1817321) diff -Nru hw-detect-1.117ubuntu7/debian/disk-detect.templates hw-detect-1.117ubuntu8/debian/disk-detect.templates --- hw-detect-1.117ubuntu7/debian/disk-detect.templates 2019-03-22 17:24:15.000000000 -0400 +++ hw-detect-1.117ubuntu8/debian/disk-detect.templates 2020-02-25 04:18:06.000000000 -0500 @@ -61,3 +61,10 @@ Description: for internal use; can be preseeded Check for the presence of iSCSI devices with the iSCSI Boot Firmware Table (iBFT)? + +Template: disk-detect/activate_remapped_nvme +Type: boolean +Default: false +Description: Activate NVMe devices under Intel RAID mode? + Check for the presence of NVMe devices with + Intel RAID mode enabled? diff -Nru hw-detect-1.117ubuntu7/disk-detect.sh hw-detect-1.117ubuntu8/disk-detect.sh --- hw-detect-1.117ubuntu7/disk-detect.sh 2019-03-22 17:24:15.000000000 -0400 +++ hw-detect-1.117ubuntu8/disk-detect.sh 2020-02-25 04:20:32.000000000 -0500 @@ -151,6 +151,22 @@ return 0 } +remapped_nvme_probe() { + + for ahci_device in /sys/module/ahci/drivers/pci\:ahci/*/remapped_nvme + do + ref_count="$(cat "$ahci_device")" + if [ "$ref_count" -ge 1 ]; then + logger -t detected-detect "Intel RAID/RST mode detected." + db_set disk-detect/activate_remapped_nvme true + break + else + logger -t detected-detect "No Intel RAID/RST mode detected." + fi + done + return 0 +} + # Load SCSI device handlers before SCSI low-level device drivers. # (attached on SCSI scan; handle some I/O errors more gracefully) depmod -a >/dev/null 2>&1