Using an NVME SSD as a system drive on computers with an old BIOS and Linux OS

Using an NVME SSD as a system drive on computers with an old BIOS and Linux OS

If configured properly, you can boot from an NVME SSD even on older systems. It is assumed that the operating system (OS) is able to work with NVME SSD. I am considering booting the OS, because with the drivers available in the OS, the NVME SSD is visible in the OS after booting and can be used. Additional software (software) for Linux is not required. For OS of the BSD family and other Unixes, the method is most likely also suitable.

To boot from any drive, the bootloader (BOP), BIOS or EFI (UEFI) must contain drivers for this device. NVME SSD drives are quite new devices compared to BIOS, and there are no such drivers in the firmware firmware of older motherboards. In EFI without NVME SSD support, you can add the appropriate code, and then it becomes possible to fully work with this device - you can install the operating system and boot it. For old systems with so-called. "legacy BIOS" booting the OS is unlikely to do this. However, this can be bypassed.

How to

I used openSUSE Leap 15.1. For other Linux, the steps will be about the same.

1. Let's prepare the computer to install the operating system.
You need a PC or server with a free PCI-E 4x or longer slot, no matter which version, PCI-E 1.0 is enough. Of course, the newer the PCI-E version, the faster the speed will be. Well, actually, NVME SSD with M.2 adapter - PCI-E 4x.
You also need some kind of drive with a capacity of 300 MB or more, which is visible from the BIOS and from which you can load the OS. It can be an HDD with IDE, SATA, SCSI connection. S.A.S. Or USB flash drive or memory card. It won't fit on a floppy disk. A CD-ROM will not work and will need to be rewritten. DVD-RAM - no idea. We will conditionally call this thing a β€œlegacy BIOS drive”.

2. We load Linux for installation (from an optical disk or a bootable flash drive, etc.).

3. When partitioning a disk, distribute the OS among the available drives:
3.1. Let's create a partition for the GRUB bootloader at the beginning of the "legacy drive BIOS" with a size of 8 MB. I note that here the openSUSE feature is used - GRUB on a separate partition. For openSUSE, the default file system (FS) is BTRFS. If you place GRUB on a partition with a BTRFS file system, then the system will not boot. Therefore, a separate section is used. You can place GRUB elsewhere, as long as it boots.
3.2. After the partition with GRUB, we will create a partition with part of the system folder (β€œroot”), namely with β€œ/boot/”, 300 MB in size.
3.3. The rest of the goodness - the rest of the system folder, the swap partition, the "/home/" user partition (if you decide to create one) can be placed on the NVME SSD.

After installation, the system loads GRUB, which loads files from /boot/, after which the NVME SSD becomes available, then the system boots from the NVME SSD.
In practice, I got a significant speedup.

Capacity requirements for a "legacy drive BIOS": 8 MB for a GRUB partition is the default, and anywhere from 200 MB for /boot/. 300 MB I took with a margin. When updating the kernel (and when installing new ones), Linux will replenish the /boot/ partition with new files.

Estimating speed and cost

The cost of NVME SSD 128 GB - from about 2000 rubles.
The cost of an M.2 adapter - PCI-E 4x - from about 500 rubles.
M.2 to PCI-E 16x adapters for four NVME SSD drives are also on sale, priced somewhere from 3000 r. - if anyone needs it.

Limit speeds:
PCI-E 3.0 4x about 3900 MB/s
PCI-E 2.0 4x 2000 MB/s
PCI-E 1.0 4x 1000 MB/s
Drives with PCI-E 3.0 4x in practice reach speeds of about 3500 MB / s.
It can be assumed that the achievable speed will be as follows:
PCI-E 3.0 4x about 3500 MB/s
PCI-E 2.0 4x about 1800 MB/s
PCI-E 1.0 4x about 900 MB/s

Which is faster than SATA 600MB/s. Achievable speed for SATA 600 MB/s is about 550 MB/s.
At the same time, on older motherboards, the SATA speed of the on-board controller may not be 600 MB / s, but 300 MB / s or 150 MB / s. Here onboard controller = SATA controller built into the southbridge of the chipset.

I note that NCQ will work for NVME SSDs, while older on-board controllers may not have this.

I did the calculations for PCI-E 4x, however, some drives have a PCI-E 2x bus. This is enough for PCI-E 3.0, but for older PCI-E standards - 2.0 and 1.0 - it is better not to take such NVME SSDs. Also, a drive with a buffer in the form of a memory chip will be faster than without it.

For those who want to completely abandon the on-board SATA controller, I advise you to use the Asmedia ASM 106x controller (1061, etc.), which provides two SATA 600 ports (internal or external). It works quite well (after a firmware update), in AHCI mode it supports NCQ. Connected via PCI-E 2.0 1x bus.

Its top speed:
PCI-E 2.0 1x 500 MB/s
PCI-E 1.0 1x 250 MB/s
Achievable speed will be:
PCI-E 2.0 1x 460 MB/s
PCI-E 1.0 1x 280 MB/s

This is enough for one SATA SSD or two hard drives.

Disadvantages noticed

1. Not read SMART parameters with NVME SSD, there is only general information about the manufacturer, serial number, etc. Perhaps due to too old motherboard (mp). For my inhuman experiments, I used the oldest mp I could find, with an nForce4 chipset.

2. TRIM should work, but it needs to be checked.

Conclusion

There are other options: buy a SAS controller with a PCI-E 4x or 8x slot (are there 16x or 32x?). However, if they are cheap, they support SAS 600, but SATA 300, and expensive ones will be more expensive and slower than the method proposed above.

For use with M $ Windows, you can install additional software - a bootloader with built-in drivers for NVME SSD.

See here:
www.win-raid.com/t871f50-Guide-How-to-get-full-NVMe-support-for-all-Systems-with-an-AMI-UEFI-BIOS.html
www.win-raid.com/t3286f50-Guide-NVMe-boot-for-systems-with-legacy-BIOS-and-older-UEFI-DUET-REFIND.html
forum.overclockers.ua/viewtopic.php?t=185732
pcportal.org/forum/51-9843-1
mrlithium.blogspot.com/2015/12/how-to-boot-nvme-ssd-from-legacy-bios.html

I invite the reader to evaluate for himself whether he needs such an application of NVME SSD, or it would be better to buy a new motherboard (+ processor + memory) with an existing M.2 PCI-E connector and support for booting from NVME SSD in EFI.

Source: habr.com

Add a comment