Install Ubuntu on Dell Inspiron 14 7490
How can I install Kubuntu on a Dell Inspiron 14 7490 laptop?
A friend of mine received this laptop for Christmas and wants to use it with Linux. More specifically, we want to install Kubuntu 19.10, but at this point we are getting desperate and would settle for any distribution. The main issue is that laptop has a single SSD, but Linux can't detect it so we are not able to select it in the installer.
What we have done so far
EDIT: Our last try dates from the 2020-02-02
EDIT (2020-04-09): The issue is still there with the BIOS v1.4.1.
- Download and install all the latest drivers from Dell's website. In particular, we update the BIOS driver: the initial version was
1.1.1
, we installed the version1.3.0
. (The version1.1.1
wasn't even able to boot into Kubuntu's live USB) - Download
kubuntu-19.10-desktop-amd64.iso
from the official website. We checked that the checksums are OK. - Create a bootable USB drive using Rufus. We set the partition scheme to
MBR
, target system toBIOS or UEFI
and file system toFAT32
. - Reboot to firmware (UEFI)
- Set the POST time to 5 seconds
- Set "UEFI Boot Path Security" to
Never
- Disable secure boot (or we get an
Initramfs unpacking failed
error). - Apply the changes
- Enter the boot menu (with F12 during the boot sequence)
- Select the USB drive.
- The USB drive boots into grub. Select "Start Kubuntu (Safe Graphics)", the default option ("Start Kubuntu") leads to a black screen.
-
Select "Try Ubuntu", it starts a live USB desktop session. We can connect to the WiFi, use Firefox, open the terminal. At this point we can run some commands to get a better view of the system. Here are some results:
ls -alR /dev
Output
lshw
Output
lsblk
Output
cat /var/log/syslog
Output
Run the "Install Kubuntu" program. It crashes when at the step where we should select the hard drive.
Where we are stuck
The main issue is that the SSD of the laptop is not detected. It prevents the installer from formatting the hard drive and installing Linux. There are multiple reports of people encountering this issue (see links below). I'll summarize my understanding of the situation in this question, and hope to post an actionable solution if we find one.
Acronyms
First of all, some acronyms:
- SATA is the technology for connecting hard drives. It can operate in multiple modes, such as AHCI or Intel RST.
- AHCI is a SATA mode standardized by Intel. It serves as the interface between the hardware and operating systems: all operating systems are able to use it to communicate with the hard drives.
- RAID is a technology to use multiple physical hard drive as a single logical ("virtual") hard drive. By duplicating data on multiple physical drives, it is more resistant to hard drive failures.
- Intel Rapid Storage Technology (Intel RST) is a Windows application "that provides improved performance and reliability for systems equipped with SATA disks". It has a feature called "RAID" that is a software solution working with a single drive. Outside Intel, it is often called "fake RAID" because it requires special software support instead of using multiple physical drives and being transparent to the OS. This is not supported by Linux.
Dell Inspiron 14 7490 BIOS
The BIOS menu has a "System Configuration" section allowing to configure how the hard drive is exposed to the OS: "SATA Operations". Here is what this section looks like on this laptop (Bios version 1.2.1) :
There are two modes:
- "Disabled": The SSD is fully disabled and you can't access it at all.
- "RAID": This does not enable real RAID (obviously, there's only one SSD in this laptop) but enables Intel RST (aka fake RAID). Also called "AHCI+RAID" because it uses "remapped AHCI".
Previous Dell laptops had a different BIOS. On my Dell XPS 15 9560 I have the following menu:
It has an extra "AHCI" option that is not available on the Dell Inspiron 14 7490 (BIOS v1.2.1).
Linux does not support Intel RST currently and requires the SATA mode to be AHCI. Otherwise it cannot communicate with the SSD. Since direct "AHCI" is not available on the Inspiron laptop, it prevents the installation of Linux.
Potential solutions
BIOS update to provide the AHCI option again
I've been using Dell laptops with Linux for a long time because because they had the reputation that it would "just work". This reputation played when I helped my friend chose a laptop: I expected the installation to go smoothly. This whole situation where they release a laptop with a new BIOS preventing from even installing Linux severely damaged their image. There are multiple threads on the Dell forums complaining about this issue (here is the most commented on).
A possible solution would be for Dell to simply release a BIOS update that unlocks the "AHCI" SATA mode. It would allow to select this mode and install Linux without further issues. This would be the ideal solution, but I don't know how reactive Dell is about these issues. I don't even know if they'll ever release this kind of patch. Opening support requests about this issue may raise the priority of a BIOS update.
Add Intel RST support to the Linux Kernel
An other solution would be to enable Linux to work in Intel RST mode. The most recent discussion I could find on Linux Kernel Mailing List dates from June 2019. The proposed patch in this discussion was declined.
From what I could understand, supporting Intel RST in the Linux Kernel is hard for two reasons: a complex protocol and lacking documentation. When enabling "Intel RST", the BIOS does in fact exposes the SSD through a "remapped AHCI" that looks like AHCI but does not behave like AHCI. The Kernel can detect that the SSD is in remapped mode, but can't use it. It can't use it because this technology is under-documented currently preventing from them from properly implementing it. In the syslog posted above, we can see the step where it warns that the drive is remapped:
Feb 2 18:21:34 kubuntu kernel: [ 1.082521] ahci 0000:00:17.0: version 3.0
Feb 2 18:21:34 kubuntu kernel: [ 1.083006] ahci 0000:00:17.0: Found 1 remapped NVMe devices.
Feb 2 18:21:34 kubuntu kernel: [ 1.083007] ahci 0000:00:17.0: Switch your BIOS from RAID to AHCI mode to use them.
Feb 2 18:21:34 kubuntu kernel: [ 1.083096] ahci 0000:00:17.0: AHCI 0001.0301 32 slots 16 ports 3 Gbps 0x0 impl RAID mode
Feb 2 18:21:34 kubuntu kernel: [ 1.083098] ahci 0000:00:17.0: flags: 64bit ncq sntf pm clo only pio slum part deso sadm sds apst
I don't know when or even if the Kernel will add support for AHCI remapped SSD. If more laptops are released where "Intel RST" is the only option, they may have no choice.
I haven't tried the kernel patch. As mentioned above, I am helping a friend who wants to use Ubuntu: since it's not my laptop I prefer to avoid trying out custom patches.
Use dmraid
One of the comments to this question mentioned that Intel RST is supported through dmraid
.
This thread asks to boot into live USB and run the following command before starting the installer: "dmraid --erase_metadata --raid_devices /dev/XdY
where X and Y denote the SSDs you're using".
The problem with this solution is that Linux can't see the SSD at all. lsblk
only displays loop0
and /dev/sda
(corresponding to the pendrive). When looking into /dev
, there is no /dev/sdb
or /dev/nvmeX
drive.
Conclusion
Ultimately my question is "How can I install Kubuntu (or Ubuntu) on this laptop?".
My conclusion is that it is currently impossible to install Linux on this laptop. We have to wait for an update from either Dell or Linux. If someone finds out a solution, please answer this question. I am also disappointed in Dell's laptops and will be more reticent to recommend them in the future.
References
- Dell support threads
- Inspiron 7490 BIOS: How to turn off intel 'RAID on', and swith disk mode to AHCI?
- SSD NVME non reconnu lors de l'installation (DELL 7490) Ubuntu 19.4 DUAL BOOT
- Not able to set SATA operation to AHCI in BIOS (Inspiron 7490)
- Not able to install Ubuntu/Linux on Inspiron 7490
- Other threads
- AskUbuntu - No hard drive detected during ubuntu 19.04 installation
- AskUbuntu - I don't see ssd in Ubuntu install on Dell Latitude 7400 with RST
- UbuntuFR - Installation Dell Inspiron 7490
- UbuntuFR - SSD NVME non reconnu lors de l'installation (DELL 7490) Ubuntu 19.4
- ArchLinux - Failure to use NVMe SSD with Intel RST in Dell Inspiron 7490
- LKML Discussion
- Kernel Patch to detect AHCI remapped devices (but not use them)
I have just installed Lubuntu 20.04 on this laptop. It's possible, but not easy.
Intel RST support in the Linux Kernel
As you said in your question, there were some patches proposed to enable Linux to work in Intel RST mode. The patches were refused in the official Linux branch, but Daniel Drake, who proposed the patches, is working on Endless OS, a Linux based OS, and they maintain an updated version of this patch in their version of the Linux kernel available on GitHub. This kernel is based on Ubuntu's kernel, and they rebase a set of patches on top of it every time they update it, including the patch to support Intel remapped NVMe devices.
Knowing that, you now have two choices :
Install Endless OS
at this point we are getting desperate and would settle for any distribution
If you don't mind, you can just install Endless OS, and it should work out of the box. Go to https://endlessos.com/download/, download the Basic Multilanguage image, and follow the instructions to create an USB stick from Linux. Or follow the instructions to create an USB stick from Windows.
Use Endless OS's kernel on Ubuntu
This one is a lot harder, and you need a lot of technical knowledge.
The idea is to pull and build the kernel from the Endlessm repository on GitHub, and use these packages as a custom kernel on Ubuntu.
For that, you have to pull the Git repository :
git pull https://github.com/endlessm/linux/
Install the necessary build dependencies :
sudo apt install build-essential fakeroot
sudo apt build-dep linux
Build the packages :
cd linux/
fakeroot debian/rules clean
fakeroot debian/rules binary
After a long time, you will then have a lot of .deb files created in the parent directory.
From there, you can use them to create a custom Ubuntu install CD (I haven't done that, but it should be possible).
Or, you can use Endless OS live version to :
- launch a shell (Alt-F2 and type xterm to get a terminal),
- partition your NVME drive using cfdisk and mkfs.ext4,
- decompress a minimal instance of Ubuntu on your new partition (I have used the squashfs from Lubuntu),
- mount bind /dev /run /var/run in it,
- mount /proc /sys in it,
- chroot into it and do the minimum configuration to get a working system (/etc/hosts, /etc/hostname, /etc/resolv.conf, /etc/fstab, install and configure grub, configure tzdata and keyboard-configuration, add a new user)
- install your new kernel packages in the chroot.
You may have to turn Secure Boot off in the kernel to be able to boot on your kernel.
I won't detail the full process, as I don't exactly remember all the steps, but I managed to get a working system with a custom kernel. There were some problems with nouveau when suspending/rebooting, but since I have installed the nvidia driver, everything is working correctly.
Nvme drive is recognized as /dev/nvme0n1. From dmesg :
[ 0.630319] intel-nvme-remap 0000:00:17.0: Found 1 remapped NVMe devices
[ 0.630357] intel-nvme-remap 0000:00:17.0: PCI host bridge to bus 10000:00
lsblk output :
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 953,9G 0 disk
├─nvme0n1p1 259:1 0 680M 0 part /boot/efi
├─nvme0n1p2 259:2 0 128M 0 part
├─nvme0n1p3 259:3 0 105,7G 0 part
├─nvme0n1p4 259:4 0 990M 0 part
├─nvme0n1p5 259:5 0 15G 0 part
├─nvme0n1p6 259:6 0 1,3G 0 part
├─nvme0n1p7 259:7 0 30G 0 part /
└─nvme0n1p8 259:8 0 800,1G 0 part /home
If you use a custom kernel, you may also want to pin the version you are using to avoid it being replaced with the default version when upgrading.
In /etc/apt/preferences.d/linux-image-generic (I haven't tested it yet) :
Package: linux-image-generic
Pin: release a=now
Pin-Priority: 501
Warning
The method described here should only be used if you know what you are doing. The kernel patch in Endless OS's kernel was rejected from the official kernel, I can't guarantee it's quality. I can't guarantee that it will be maintained in the long run and ported to new versions of the kernel.
If you install Ubuntu with a custom kernel, you will have to manage all the kernel updates yourself. I hope that this fix will only be temporary until Dell release a bios version with AHCI mode support, but it may not happen.
The kernel also include other patches that you may want to review. You may also have to build and install other packages from Endlessm repository, like linux-firmware, as some of theses patches are to add support for new hardware not currently supported by the official Linux kernel.