Handling NVMe devices in Slackware : Call for testing.
3 Attachment(s)
Hi there,
I have modified the Slackware installer (scripts /usr/sbin/probe and /usr/lib/setup/SeTEFI) and /sbin/eliloconfig so that Slackware be able to:
In that aim I provide a mini-iso here, "mini" meaning that this ISO includes no package, only the installer itself. To test you need:
TIP: if you need to partition your NVMe device, before running setup do this:
NOTE You will need to apply the patch to /usr/sbin/eliloconfig in the installed system yourself, *before* performing the CONFIGURE step. To do that:
PS Some links about NVMe: Overview An explanation, including partitions layout The current specification The kernel module: Code:
root[/home/didier]# modinfo nvme |
Did more reading...
More references:
Let's borrow an explanation to Bruce Nikkel: Quote:
In nvme0n1, nvme is the type of device, 0 is the volume number (if you have three devices they will be named nvme0n1, nvme1n1 and nvme 2n1) and 1 the namespace number. If the first controller had several namespaces we could see n2, n3 etc. instead of n1. But as says also Bruce : Quote:
So I will modify at least SetEFI to handle at most 10 NVMe SSDs, but with only one namespace as that should be enough for now, build another ISO with that and post again here when that will be ready to grab. I will also try to build nvme-cli and use it in a VM. Stay tuned (if you want). PS I think that my modified eliloconfig was wrong too. Will re-check. |
If at first you don't succeed...
2 Attachment(s)
To make a long story short, you will find here:
So, I modified SeTEFI to be able to handle at most 10 controllers, each with at most 4 storage units attached. I have also modified /sbin/probe to avoid duplicate entries in $TMP/SeTfdisk I have also modified eliloconfig to fix the nvme partitions' names length including /dev/ (14 characters). Everything should work now as expected. That is the case in a VM at least, see attached pics. PS Feedback for testing on bare metal is of course still welcome. Be careful with the "nvme" command. Read the man pages: begin with typing just "nvme" as root then "nvme help <argument>". They are also provided as html pages. Just type <your preferred browser> /usr/doc/nvme-cli-1.1/nvme.html to read them. |
No answer... Nevertheless I applied these patches to Slint and will let them in the same place for a while in case Patrick wants to apply them to Slackware current.
|
Hello Didier
I am currently looking at a new system, NVM would be included. It will probably be a while until I get it put together. However your work is appreciated and when the hardware is available to me I will definitely test your work on bare metal. Thanks John |
An Update
Purchased a Plextor 512GB PCIe NVMe memory board
Newegg product description 512GB | PLEXTOR PX-512M8PEY RTL P/N:3C07140090 S/N P0265110157 power on with the Plextor inserted in the PCIe express 3.0 x 16 slot on the motherboard which is an ASRock Z77 Extreme 4 ASROCK UEFI SETUP UTILITY shows Code:
PLEXTOR PX-512MBPeY (expected this of course as the nvme board was unitialized) booted my full slackware64-14.2 using 4.10.1 kernel dmesg [code [ 4.451869] nvme nvme0: pci function 0000:01:00.0 [/code] tryed fdisk -l ...the nvme part... Code:
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors Code:
gdisk -l /dev/nvme0n1 Code:
lspci -v Next I will try your fake installer to see if it sees the NVMe board. From the above I think the standard UEFI installer will see it. We shall see john PS on the box ">Supports Operating System Windows OS / Linux OS @ PC Platform " |
Thanks for the follow up John.
You could also try a Slint64-14.2 ISO that includes a modified installer. Oh, and for your information: now cfdisk (and also fdisk I assume) can handle GUID partition tables (GPT) as do cgdisk/gdisk. PS Looking at your output I could be wrong about fdisk. But no issue with cfdisk and GPT. |
Quote:
didn't use a swap on the NVMe Linux partition was recognized elilo was installed (not sure how properly) firmware's boot memory got all screwed up! firstly installing an NVMe board changed the UEFI memory map it became FS0 FS0 was previously /dev/sda FS1 was previously /dev/sdb everything was shifted up one, took a while for me to figure that out I took the leap and used your installer to install slack from a hard drive partition. It appeared to install correctly including the efi partition, however it would not boot. Nothing would boot took me all afternoon to get things straightened out had to restore things using efibootmgr and Shellx64.efi. The recovered system sees the NVMe board and can read and write fine. I have a few more tricks up my sleeve to try yet but that is all the time I have for now. Please provide any suggestions or additional tests you would like me to try. John |
Some Better News
I did another install and tried to install lilo no good it did not install.
The third time is the charm sort of. On the third install using your fakeDVD and a partition for the Slackware goodies. I did not install lilo or elilo but choose to make a boot stick. Surprise surprise my system will UEFI boot from a boot stick to an NVMe installed Slackware64-14.2. You are definitely on the right path Didier, probably setting your efibootmgr in the installer to use a different name beside slackware would keep it from overwriting the working UEFI nvm ram entries or shifting them around. Thanks John Off to Church for now. |
More Good News
I am able to boot the nvme partition by adding the last stanza to my Slackware elilo.conf located on /dev/sda1.
Code:
chooser=simple just my 2 cents Thanks John PS: I used to think my ssd was fast. The NVMe makes it seem like a floppy LOL! |
I am glad you can use your NVMe device.
To better understand your situation (as I infer from your last post that you have at least five systems on three mass storage devices), please give the output of this command Code:
lsblk -o model,name,size,fstype,mountpoint Hopefully this will help me give you a sound advice and/or ask relevant questions. |
Attached your two requested items.
Always something new to learn Glad to help/test anything. Fixing my mistakes is what makes life fun. John |
Accept My Apologies Please
Quote:
I get very excited when I get a new piece of hardware to play with, now that things have settled down here in the shack I can state EVERYTHING WORKED AS YOU INDICATED Seems I did not read your first post very carefully and missed the eliloconfig patch. This time after the install was complete and before rebooting I applied the eliloconfig.diff and ran eliloconfig. One additional (and very important) adjustment to /usr/sbin/eliloconfig I did an edit to change "-L Slackware" to "-L nvme". This prevented eliloconfig from over writing my Slackware entry in the UEFI NVRAM. I now have both my Slackware entry and a nvme entry the latter boots into the Plextor memory card. The answer to all four of your questions is a resounding YES Again Sorrowfully Yours John PS hope I did not cause you too much trouble |
No Apologies Needed
I am glad it worked and truly thankful that you took the time to test on bare metal and report the outcome.
No sorrow: be happy and have fun! Cheers, |
Quote:
Code:
rich[~]$ sudo efibootmgr -v |
Quote:
I hope that more clearly explains my issue and my solution. It is a simple change I used for successful testing as requested. [EDIT] I admit I am not the best splainer in the hood, and I don't want to cause anyone unnecessary woe. I am sure when I pressed F11 to bring up my boot manager screen There was only one 'Slackware' and it would not boot [/EDIT] [EDIT] Last edit I promise. Just to satisfy my own curiosity I erased the nvme board and restarted from scratch. Booted with the 'fakeInstaller' iso and installed slackware64-14.2 from a HD partition. I could not install lilo (that is a lilo problem). Made a boot stick which works. The patched eliloconfig worked flawlessly. It erased the current Slackware UEFI entry and added a new Slackware UEFI entry which works. As far as my system is concerned Didier's patches are ready for prime time.[/EDIT] John |
Hi Didier,
I had the pleasure to try your patches today on a 5th gen ThinkPad X1 Carbon. First, I installed Slackware 14.2 using the stock usbboot.img, wondering why it suggested not to install LILO and then never offered to install ELILO. Then I found this thead, booted using your ISO, ran configure which now mounted the EFI System Partition and installed ELILO onto it. Like John, I managed to forget patching eliloconfig, so there was a third round through configure to have the boot entry installed in the firmware. Quote:
ELILO seemed to be properly installed with your image even with missing patch. ELILO boot entry was only written to firmeware after applying eliloconfig.diff Cheers! |
Hi Didier,
Maybe a bit of a late reply, and maybe not of much use (anymore), but I tested your eliloconfig.diff successfully on my new Thinkpak T470p. Lilo installs on the ESP and a boot entry is added to the firmware. Unfortunately, I did not get to test the swap partition and Linux partition detection: Hardware support issues, unrelated to this topic, made me decide to (temporarily) switch to Arch Linux. cheers! |
Hi Stmlpjmpr and welcome to this forum.
Thanks for your reply, still helpful as a confirmation even with the patches now applied in Slackware-current, thanks Pat. This leads me to mark this thread as [SOLVED]. Maybe you could tell us a little more about your hardware support issues, so that we can check that they be addressed at least in next Slackware release. |
Hi Didier,
Glad I could help. Off topic: My hardware problem: The SW 4.4 kernel somehow was unable to detect my ethernet adapter (Intel i219-V) properly. This surprised me, as this device is in use for a while now. lspci did output something, but I remember it was very brief. I tried several kernels, also non-Slackware such as systemrescuecd. With the latest systemrescuecd (5.0.0, date 2017-04-23, kernel 4.9.24) it worked, as well as with Arch kernel 4.10.13-1. lspci Was more verbose here. In contrast, an old systemrescuecd I had made earlier in January 2017 was unable to properly detect and load the e1000e-driver. For now, I use Arch for a while to more easily familiarise with the hardware. In case I happen to find out more, I'll get back to you. cheers! |
I ended up just moving my /dev/sda1 'boot' partition (EFI/ESP) to my NVME and rewrote my EFI boot loader entry via 'efibootmgr' ... I found this process to be easier given my configuration, but I wholly support your work here and I'd like to say thank you for tackling this project, and I'm very excited for this to be patched into -current and eventually Stable.
For any interested, moving your EFI partition from one drive to another is very easy. Code:
dd if=/dev/sda1 of=/dev/nvme0n1p1 Code:
/dev/sda1 to /dev/nvme0n1p1 Replace your EFI boot entry with 'efibootmgr' .. I used Code:
efibootmgr -c -d /dev/nvme0n1 -p 1 -L Slackware -l \\EFI\\Slackware\\elilo.efi Code:
efibootmgr -B -b 0000 and that's it. I can now completely wipe/remove my /dev/sda SSD and just use my NVME |
What about your elilo.conf file. I believe you must also edit your default boot in that file?
John |
Quote:
Code:
initrd=initrd.gz Cheers! |
I will add that elilo can only "see" files in the same EFI system partition (ESP) as the EFI image. This is why eliloconfig copies the kernel and case occurring the initrd from /boot to the ESP instead of just linking to them in the config file. The same limitation applies to elilo.conf.
Instead GRUB can have its files in different partitions, at the expense of an increased complexity as that needs modules to handle all file systems used to store the files, while elilo can only handle a FAT filesystem. |
I use elilo.conf to support multiple kernels and multiple root=/dev. That's why I assumed you would need to edit.
ie bzImage-4.11.0 and bzImage-4.4.14 or bzImage-4.9.6 etc. This is my current elilo.conf on my NVME device (I use multiple bootable devices) Code:
chooser=simple John |
You're still correct. I do need to edit my elilo.conf, just not due to the fact that I'm moving it from /dev/sda1 to /dev/nvme0n1p1 ... I do however use the generic vmlinuz since I tend to stay on the supported kernel now that all my hardware is supported. So, I guess my need is a little less, but yes, you are right.
Also, I find compiling a new kernel in LUKS tends to break stuff, but I'm sure I'm doing something wrong. :-) Quote:
|
Thanks for your work on this. I've installed -current twice on the same nvme equipped machine recently. The first time around was a very manual process, but with your patches included in the latest -current it just worked.
It would be great to have the nvme-cli included as a package, and also in the installer initrd. I will ask in the "Requests for Current" thread. |
Hello guys, thank you for your efforts, I got a P51 Lenovo with NVMe device, I'm going to try it on Monday, could the above fix my problem that the Ubuntu install works but the slackware isn't?
See this thread: http://www.linuxquestions.org/questi...me-4175609849/ Cheers, |
I used Didier's boot cd and followed his instructions to install Slackware64-14.2. After a small hicup everything installed fine. I am now on Slackware64-14.2 with 12.2 huge kernel (self-compiled). All works fine since my install
John |
Quote:
IT would be easier to have a release date for the next slackware so it's just built in :-) |
Didier,
I realize I'm late to need, but I wanted to thank you for putting together this method for installing Slackware 14.2 to an NVMe device. I followed the steps you outlined in the first post in this thread and now have a machine running Slackware 14.2 on a Plextor NVMe (the only drive in the machine). Went very smoothly! Thanks! Lumpy |
You don't need to patch eliloconfig anymore
The new ISO fake_slackware64-14.2-4.iso in the directory: http://slint.fr/forSlackware/NVMe includes a modified installer shipping the patch for eliloconfig, applied by the slackinstall script at end of packages' installation. I just had to slightly modify the build script.
So now, you can just follow these instructions:
EDIT 21 August 2017, 22h00 UTC+2: uploading a new ISO (build #4) the previous failed to patch eliloconfig. |
Quote:
Best, Lumpy |
Didier,
Thanks for this; I installed current (kernnel 4.9.44) on a Samsung SM961 M.2, NVMe card and both install and elilo-config worked as a dream; never got the windows test install so quickly replaced on a drive ;-) rob |
Didier,
just to let you know that I used your latest image to install Slackware64 14.2 on a ThinkPad X1 6th generation (with a Samsung 1Tb NVMe drive). It went smoothly as I pointed it to another USB with the full Slackware installation files (incredibly this ultrabook has 2 USB3 slots). The part that was more complicated for me was dealing with UEFI, as this is the first time I have installed anything not using MBR, but I still managed to do this without errors. I also used luks+lvm and encrypted root and swap together (as explained in README_CRYPT.TXT). All is working well. Thank you! |
Impossible to boot on NVME partition
Hi Didier
I have a new laptop with NVME partitions To install the Slackware 14.2 I have followed your instructions -Download and verify fake_slackware64-14.2-4.iso - Put it on an USB stick - Boot my laptop with this USB stick - Give the source with another USB stick - Installation finished without asking me to use Elilo ? I have made an initrd using mkinitrd in the newly installed system and put the initrd.gz in /boot/efi/EFI/Slackware Reboot on this EFI partition Elilo starts reads initrd.gz and vmlinuz-huge : start of the Slack boot list Just after starting eudevd , stop with an error message mount /dev/nvme... on /mnt : No such file or directory Seems that I have forgooten to do something ? Didier Courtaud Quote:
|
Quote:
To investigate further please do this:
Then you can redirect all commands above to files in /stick and just type: Code:
cp /floppy/EFI/Slackware/elilo.conf /stick |
Quote:
I have thought about two possible explanations : 1- It does not work with reiserfs partitions ? 2- As I have made a Code:
chroot /mnt .. In any case thanks for your help ! |
Quote:
Code:
lsblk -l -o model,name,type,size,fstype Quote:
Quote:
Oh and there is no benefit in having in having separate partitions for /var and /usr in a desktop. I don't even have one for /home and encounter no issue: actually all my systems have just one partition: / Some people think that having a separate partition for /home helps in case of upgrade but I strongly disagree: the content of /home can be backed up then restored after upgrade, ant it is inadvisable to keep all hidden files and directories as is after upgrade. You are better off saving and restoring only case by case the ones that should not be modified. In any case, the more you cut your space on a mass storage device in slices, the sooner you will have a partition filled up. You can still set LVM, but why complicate things? tl;dr: install anew with the huge kernel, ext4 and only one / partition (also /home if you insist, but again I don't see the usefulness of that). When this will be done, come back to get some advice about installing the generic kernel and an initrd, while setting elilo.conf to keep two boot entries just in case: one for the huge kernel, one for the generic one with an initrd). |
[
Maybe. I recommend installing with the huge kernel, then start the new system and only then make an initrd. Didier, that is just what I want to do : start the huge kernel but without an initrd, it is impossible ! With elilo.efi wmlinuz-huge and the elilo.conf I showed you in /boot/efi/EFI/Slackware and the UEFI in BIOS pointed to that .efi file , the laptop does not show anything and refuses to boot |
Finally I have succeded to boot my Dell Latitude 5490 on Slack !!!!
I have to switch the laptop to AHCI as described here : http://triplescomputers.com/blog/unc...hci-operation/ and then with only the kernel and elilo.efi in /boot/efi/EFI/Slacware it boots normally ! Thanks to Dell to make me spend a week before succedding : - Decrypt the root partition in order to shrink the Windows Partition - Obliged to use UEFI to boot the Slack - Turn the laptop from RAID IDE to AHCI All this stuff to forbid the installation of Linux on this laptop ! DC Quote:
|
Must admit, your fake_slackware works a treat, UEFI/LVM on NVME worked first time. thanks for the image
|
Will fake_slackware64-14.2-4.iso also work with non-NVMe computers? The reason I'm asking is that I'm starting a new job next week and don't know what laptop will I have (should have asked) and of course I want to put Slackware on it. And I think that the answer for this question is yes - it will work because I've just tried it in VirtualBox that doesn't expose any /dev/nvme devices and it's ok but just want to make sure.
|
Quote:
|
Or install Slint64-14.2.1.2, that ships a 4.19 kernel and speaks Polish during installation ;)
|
Quote:
Quote:
|
Quote:
This will also mean that video acceleration may not work out of the box and it might rely on basic vesa style drivers. This could prevent compositing in your WM/DE and prevent GPU assisted video decoding. You can add support for most hardware by upgrading the kernel to a more modern version (4.19.x is currently the newest LTS and 5.3.x is the latest stable, and 5.4, which is expected to be the next LTS is currently in RC status), however, video support will likely be handicapped by the mesa and Xorg versions in 14.2. |
Success! I have installed Slackware on my work ThinkPad E480 laptop today but it wasn't as straightforward as I thought it would be.
First, I had to disable secure boot because Slackware installation USB stick wasn't shown in boot menu at all. Second, big thanks to Didier Spaier for creating fake_slackware64-14.2-4.iso because I wouldn't to able to install Slackware without that at all as 256GB SSD PCIe NVMe is the only disk that this laptop has. Installation was quite smooth, it just took me some time to realize that I have to do Code:
cgdisk /dev/nvme0 Code:
cgdisk /dev/sda *EDIT*: what's weird Wi-Fi worked out of the box. |
That's good to hear! And wifi hasn't changed a ton over the last few years unless you have something supporting 802.11ax, which very few devices support at this point. So it isn't too surprising that wifi works fine.
In the future, you can download Eric's slackware64-current ISOs to prevent you from needing to install the stable version and then take the extra time to upgrade to -current via slackpkg. |
@bassmadrigal Thank you for the hints, do you mean Slackware -Current support NVMe now?
|
All times are GMT -5. The time now is 03:17 AM. |