LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Handling NVMe devices in Slackware : Call for testing. (https://www.linuxquestions.org/questions/slackware-14/handling-nvme-devices-in-slackware-call-for-testing-4175597516/)

Didier Spaier 01-15-2017 01:01 PM

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:
  • Install Slackware on an NVMe device's partition
  • Install a bootloader in an ESP on a NVMe device
  • Install a boot entry for Slackware in the firmware's boot menu in case where the boot image is in an ESP on a NVMe device.
I have made limited testing in a VirtualBox VM but do not own a NVMe device thus this is a call for testers on bare metal.

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:
  • A computer equipped with a NVMe device, with Slackware installed on it or not, set to boot in UEFI mode.
  • The ISO written with dd on an USB stick
WARNING: when asked, do *not* accept to format any partition, unless you wan to make a real installation and have at hand a Slackware installation media that you will use as source of packages.

TIP: if you need to partition your NVMe device, before running setup do this:
  • type lsblk to know how it is named (probably nvme0n1)
  • to format it, type "cfdisk /dev/nvme0n1" for instance. Of course set a GPT partition, not a DOS one.
  • Your partitions will be named nvme0n1p<partition number>
  • As usual you will need an EFI partition (100M) and a Linux partition. You can also set a swap partition if you want.
TESTING PROCEDURE
  • If you really install Slackware, you will need a media (DVD or USB stick or on a network) with the Slackware packages, that you will select when asked at the SOURCE step. Other than that, proceed to the installation as usual.
  • Else (Slackware already installed), do not format any existing partition and skip the INSTALL step but perform the CONFIGURE step so that you can check if you are proposed to install elilo on the ESP and a boot entry, and check that succeeds.
QUESTIONS:
  • Is your swap partition (if any) on NVMe recognized by the installer?
  • Is your Linux partition on NVMe recognized by the installer?
  • Is elilo properly installed in the ESP on the NVMe?
  • Is the elilo boot entry successfully written in the firmware's boot menu?
I attach to this post the patches used to build the ISO and the patch to eliloconfig.

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:
  • Alt+F2 to start another virtual terminal
  • cd /mnt/usr/sbin
  • either download the patch with wget or get it from another USB stick where you will have stored it, mounted as /floppy. Assuming that you have copied it in /mnt/usr/sbin, do:
    Code:

    patch -p0 < eliloconfig.diff.txt
Thanks for reading and in advance for your test reports.

PS Some links about NVMe:
Overview
An explanation, including partitions layout
The current specification

The kernel module:
Code:

root[/home/didier]# modinfo nvme
filename:      /lib/modules/4.4.38/kernel/drivers/nvme/host/nvme.ko
version:        1.0
license:        GPL
author:        Matthew Wilcox (email hidden by Didier)
srcversion:    DBC9558E0C13F0D5DCDD26D
alias:          pci:v0000106Bd00002001sv*sd*bc*sc*i*
alias:          pci:v*d*sv*sd*bc01sc08i02*
depends:       
intree:        Y
vermagic:      4.4.38 SMP mod_unload
parm:          admin_timeout:timeout in seconds for admin commands (byte)
parm:          io_timeout:timeout in seconds for I/O (byte)
parm:          shutdown_timeout:timeout in seconds for controller shutdown (byte)
parm:          nvme_major:int
parm:          nvme_char_major:int
parm:          use_threaded_interrupts:int
parm:          use_cmb_sqes:use controller's memory buffer for I/O SQes (bool)

PPS I realize now that the possible devices' list in SeTEFI is probably wrong. But this shouldn't matter if you have only one, in other words for preliminary testing.

Didier Spaier 01-16-2017 03:10 PM

Did more reading...
 
More references:

Let's borrow an explanation to Bruce Nikkel:
Quote:

NVME devices are not SATA or SCSI, and therefore not represented as /dev/sd* devices under the Linux device directory. They have an alternate file naming convention beginning with /dev/nvme*. The naming convention allows for representation of multiple devices, which may contain multiple namespaces, which in turn may contain multiple partitions. For example, a host with a single NVME drive containing one namespace with three partitions appears as follows:

Code:

# ls /dev/nvme*
/dev/nvme0  /dev/nvme0n1  /dev/nvme0n1p1  /dev/nvme0n1p2  /dev/nvme0n1p3

Here "nvme0" refers to the character device of the nvme drive, "n1" refers to the raw block device of the namespace, and "p*" refer to the three partition devices (normal partitions, created with fdisk)
So, what?

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:

Consumer NVME devices on the market today typically only support a single namespace.
Namespaces are mentioned in the current specification under 6.1 Namespaces, page 143.

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.

Didier Spaier 01-17-2017 05:39 AM

If at first you don't succeed...
 
2 Attachment(s)
To make a long story short, you will find here:
  • A new ISO image (only the modified installer)
  • The fixed patches in patches/
  • A nvme-cli package, and its source in nvme-cli/
I now understand that a controller can have as many namespaces as storage units attached to it.

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.

Didier Spaier 01-20-2017 02:53 PM

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.

AlleyTrotter 02-24-2017 10:28 AM

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

AlleyTrotter 03-03-2017 02:15 PM

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
at this point I attempet to boot from the NVMe and got a screen of 99's
(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
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

tryed
Code:

gdisk -l /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.0

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/nvme0n1: 1000215216 sectors, 476.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DB3139E4-84A8-4721-BC52-52B1817E4087
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1000215182
Partitions will be aligned on 2048-sector boundaries
Total free space is 1000215149 sectors (476.9 GiB)

Number  Start (sector)    End (sector)  Size      Code  Name

tryed
Code:

lspci -v
...
01:00.0 Non-Volatile memory controller: Lite-On Technology Corporation Device 22f1 (rev 01) (prog-if 02 [NVM Express])
        Subsystem: Marvell Technology Group Ltd. Device 1093
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f7b20000 (64-bit, non-prefetchable) [size=16K]
        Expansion ROM at f7b00000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [b0] MSI-X: Enable+ Count=19 Masked-
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Device Serial Number 00-00-00-00-00-00-00-00
        Capabilities: [158] Power Budgeting <?>
        Capabilities: [168] Alternative Routing-ID Interpretation (ARI)
        Capabilities: [178] #19
        Capabilities: [2b8] Latency Tolerance Reporting
        Capabilities: [2c0] L1 PM Substates
        Kernel driver in use: nvme
        Kernel modules: nvme

Sorry for the tease, but that is all I have time for right know.
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
"

Didier Spaier 03-03-2017 02:26 PM

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.

AlleyTrotter 03-04-2017 05:54 PM

Quote:

Originally Posted by Didier Spaier (Post 5655362)
Hi there,
  • Is your swap partition (if any) on NVMe recognized by the installer?
  • Is your Linux partition on NVMe recognized by the installer?
  • Is elilo properly installed in the ESP on the NVMe?
  • Is the elilo boot entry successfully written in the firmware's boot menu?

Hi Didier
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

AlleyTrotter 03-05-2017 07:26 AM

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.

AlleyTrotter 03-05-2017 01:01 PM

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
delay=50
timeout=50
default=4101
#
image=bzImage-4.10.1
        label=4101
        read-only
        append="root=/dev/sda2 vga=normal ro"
#
image=bzImage-4.4.52
        label=4452
        read-only
        append="root=/dev/sda2 vga=normal ro"
#
image=bzImage-4.9.13
  label=last
  read-only
  root=/dev/sda2
#
image=vmlinuz-3.13.3-lfs-7.5
  label=lfs
  read-only
  append="root=/dev/sdb8 vga=normal ro"
#
# was image=bzImage-rescue
image=bzImage-4.6.3
  label=rescue
  read-only
  append="root=/dev/sdb2 vga=normal ro"
#
image=bzImage-4.4.15
  label=build
  read-only
  append="root=/dev/sdb4 vga=normal ro"
#
image=bzImage-4.10.0
  label=build10
  read-only
  append="root=/dev/sdb4 vga=normal ro"
#
image=vmlinuz
        label=nvm
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"

So as I see it efibootmgr should write a new UEFI entry for the nvme without over writing the Slackware entry or shifting the other entries. I think it just needs to have a different label perhaps "-L NVMe" for testing purposes or even ask user for the label.
just my 2 cents
Thanks
John

PS: I used to think my ssd was fast. The NVMe makes it seem like a floppy LOL!

Didier Spaier 03-05-2017 03:06 PM

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
fdisk -l|grep ^/dev #this one typed as root

And tell what is the usage of all the listed partitions

Hopefully this will help me give you a sound advice and/or ask relevant questions.

AlleyTrotter 03-05-2017 06:32 PM

Attached your two requested items.
Always something new to learn
Glad to help/test anything.
Fixing my mistakes is what makes life fun.
John

AlleyTrotter 03-06-2017 02:51 PM

Accept My Apologies Please
 
Quote:

Originally Posted by Didier Spaier (Post 5655362)
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:
  • Is your swap partition (if any) on NVMe recognized by the installer?
  • Is your Linux partition on NVMe recognized by the installer?
  • Is elilo properly installed in the ESP on the NVMe?
  • Is the elilo boot entry successfully written in the firmware's boot menu?
I attach to this post the patches used to build the ISO and the patch to eliloconfig.

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:
  • Alt+F2 to start another virtual terminal
  • cd /mnt/usr/sbin
  • either download the patch with wget or get it from another USB stick where you will have stored it, mounted as /floppy. Assuming that you have copied it in /mnt/usr/sbin, do:
    Code:

    patch -p0 < eliloconfig.diff.txt
Thanks for reading and in advance for your test reports.

YOU MAY KINDLY DISREGARD ALL MY PREVIOUS COMMUNICATIONS ON THIS SUBJECT

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

Didier Spaier 03-06-2017 03:03 PM

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,

laprjns 03-06-2017 06:56 PM

Quote:

Originally Posted by AlleyTrotter (Post 5679916)
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.

Changing the label(-L) is not doing what you think it is. efibootmgr, called by elilconfig, doesn't overwrite UEFI NVRAM entries, but rather creates a new one. You can have multiple entries with the same labels each pointing to a different ESP bootloader or even the same one. All you would get is a list of menu entries with the same label when you invoke the UEFI firmware boot screen. Here an example of having NVRAM boot entries with the same lablel
Code:

rich[~]$ sudo efibootmgr -v
Password:
BootCurrent: 000C
Timeout: 1 seconds
BootOrder: 000C,0005,0006,0004,0008,0007,0000,0001,0000,0002,0003
Boot0000* Unknown Device        Vendor(99e275e7-75a0-4b37-a2e6-c5385e6c00cb,)AMBO
Boot0004* Salix        HD(1,800,96000,dccc0346-6342-49cc-a509-c22a6ff7ae0d)File(\EFI\Slint\elilo.efi)
Boot0005* Salix        HD(1,800,96000,dccc0346-6342-49cc-a509-c22a6ff7ae0d)File(\EFI\Salix-Xfce-14.2\elilo.efi)
Boot0006* Windows Boot Manager        HD(1,800,96000,dccc0346-6342-49cc-a509-c22a6ff7ae0d)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS
Boot0007* UEFI: IP4 Realtek Ethernet Controller        ACPI(a0341d0,0)PCI(1c,2)PCI(0,0)MAC(08606e1a7626,0)IPv4(0.0.0.0:0<->0.0.0.0:0,0, 0AMBO
Boot0008* UEFI SHell        HD(1,800,96000,dccc0346-6342-49cc-a509-c22a6ff7ae0d)File(\EFI\tools\Shellx64.efi)
Boot000A  CD/DVD Drive        BIOS(3,0,00)AMGOAMNO........,.P.2.:. .M.A.T.S.H.I.T.A.D.V.D.-.R.A.M. .U.J.8.B.2. . . . . .....(.....P2: MATSHITADVD-RAM
Boot000C* rEFInd        HD(1,800,96000,dccc0346-6342-49cc-a509-c22a6ff7ae0d)File(\EFI\refind\refind_x64.efi)

Booth Boot0004 and Boot005 have the same label, Salix, with one pointing to a boot loader for Slint and the other to Salix. So the real problem is when eliloconfig creates the Slackware directory on the ESP (EFI/Slackware) and copies the kernel, initrd and bootloader to it. If there is already a Slackware directory on the ESP, then it will be overwritten, but I do believe the installer warns about this.

AlleyTrotter 03-07-2017 08:45 AM

Quote:

Originally Posted by laprjns (Post 5679975)
Changing the label(-L) is not doing what you think it is. efibootmgr, Booth Boot0004 and Boot005 have the same label, Salix, with one pointing to a boot loader for Slint and the other to Salix. So the real problem is when eliloconfig creates the Slackware directory on the ESP (EFI/Slackware) and copies the kernel, initrd and bootloader to it. If there is already a Slackware directory on the ESP, then it will be overwritten, but I do believe the installer warns about this.

Yes you are correct the installer does warn, However in my case on the first attempt I ignored the warning and allowed the Slackware entry to be over written it did not create a second Slackware entry but completely hosed the Slackware UEFI entry which could no longer boot. I was only able to recover by using the boot manager to use an entry on a second drive.
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

becken 04-05-2017 05:08 AM

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:

Originally Posted by Didier Spaier (Post 5655362)
  • Is your swap partition (if any) on NVMe recognized by the installer?
  • Is your Linux partition on NVMe recognized by the installer?
  • Is elilo properly installed in the ESP on the NVMe?
  • Is the elilo boot entry successfully written in the firmware's boot menu?

Both swap and Linux partitions were recognized on NVMe even with stock image.
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!

Stmpjmpr 05-07-2017 04:54 AM

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!

Didier Spaier 05-07-2017 05:17 AM

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.

Stmpjmpr 05-07-2017 06:35 AM

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!

Freaksta 05-09-2017 11:21 AM

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
edit your fstab for your /boot/efi entry to point to your nvme (nvme0n1p1 in my case) ... I literally just changed the line from
Code:

/dev/sda1 to /dev/nvme0n1p1
and left the rest.
Replace your EFI boot entry with 'efibootmgr' .. I used
Code:

efibootmgr -c -d /dev/nvme0n1 -p 1 -L Slackware -l \\EFI\\Slackware\\elilo.efi
I removed my old EFI boot entry via
Code:

efibootmgr -B -b 0000
where '0000' is the value of your entry ID (0000,0001, or 0002, etc)

and that's it. I can now completely wipe/remove my /dev/sda SSD and just use my NVME

AlleyTrotter 05-09-2017 02:52 PM

What about your elilo.conf file. I believe you must also edit your default boot in that file?
John

Freaksta 05-09-2017 03:07 PM

Quote:

Originally Posted by AlleyTrotter (Post 5708320)
What about your elilo.conf file. I believe you must also edit your default boot in that file?
John

At least in my case, I've always kept my initrd.gz file in /boot/efi/EFI/Slackware/initrd.gz, instead of just /boot. For elilo.conf, I use
Code:

initrd=initrd.gz
since they're both in the same directory (/boot/efi/EFI/Slackware/ initrd.gz and elilo.conf) and I needed to make zero modifications.

Cheers!

Didier Spaier 05-09-2017 03:26 PM

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.

AlleyTrotter 05-09-2017 03:33 PM

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
delay=50
timeout=1
#
image=bzImage-4.11.0
        label=4110
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"
#
image=bzImage-4.10.15
        label=last
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"
#
image=bzImage-4.4.14
        label=SDA
        read-only
        append="root=/dev/sda2 vga=normal ro"
#
image=vmlinuz-3.13.3-lfs-7.5
  label=lfs
  read-only
  append="root=/dev/sdb8 vga=normal ro"
#
# was image=bzImage-rescue
image=bzImage-4.6.3
  label=rescue
  read-only
  append="root=/dev/sdb2 vga=normal ro"
#
image=bzImage-4.4.14
  label=build
  read-only
  append="root=/dev/sdb4 vga=normal ro"
#

I guess I'm very old school
John

Freaksta 05-09-2017 04:31 PM

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:

Originally Posted by AlleyTrotter (Post 5708336)
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
delay=50
timeout=1
#
image=bzImage-4.11.0
        label=4110
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"
#
image=bzImage-4.10.15
        label=last
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"
#
image=bzImage-4.4.14
        label=SDA
        read-only
        append="root=/dev/sda2 vga=normal ro"
#
image=vmlinuz-3.13.3-lfs-7.5
  label=lfs
  read-only
  append="root=/dev/sdb8 vga=normal ro"
#
# was image=bzImage-rescue
image=bzImage-4.6.3
  label=rescue
  read-only
  append="root=/dev/sdb2 vga=normal ro"
#
image=bzImage-4.4.14
  label=build
  read-only
  append="root=/dev/sdb4 vga=normal ro"
#

I guess I'm very old school
John


MarcT 05-11-2017 06:35 PM

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.

sternone 07-15-2017 10:06 AM

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,

AlleyTrotter 07-15-2017 10:40 AM

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

sternone 07-15-2017 04:38 PM

Quote:

Originally Posted by AlleyTrotter (Post 5735234)
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

Thanks, fingers crossed...

IT would be easier to have a release date for the next slackware so it's just built in :-)

Uncle Lumpy 08-13-2017 04:04 PM

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

Didier Spaier 08-19-2017 06:04 PM

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:
  • download the file fake_slackware64-14.2-4.iso
  • check its integrity with fake_slackware64-14.2-4.iso.md5
  • write it on an USB stick
  • have at hand a genuine Slackware installation media
  • insert the USB stick then reboot and begin the installation as usual
  • at the SOURCE step, choose the Slackware installation media
  • proceed to the rest of installation, including the CONFIGURE step, as you would do with a genuine Slackware
Sorry it didn't come to my small mind to do that sooner.

EDIT 21 August 2017, 22h00 UTC+2: uploading a new ISO (build #4) the previous failed to patch eliloconfig.

Uncle Lumpy 08-19-2017 06:50 PM

Quote:

Originally Posted by Didier Spaier (Post 5750043)
The new ISO fake_slackware64-14.2-3.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.

Easier is better--thanks!

Best,
Lumpy

brobr 08-23-2017 06:54 AM

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

metageek 04-13-2018 06:29 AM

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!

Desiderius 10-05-2018 05:52 AM

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:

Originally Posted by Didier Spaier (Post 5750043)
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:
  • download the file fake_slackware64-14.2-4.iso
  • check its integrity with fake_slackware64-14.2-4.iso.md5
  • write it on an USB stick
  • have at hand a genuine Slackware installation media
  • insert the USB stick then reboot and begin the installation as usual
  • at the SOURCE step, choose the Slackware installation media
  • proceed to the rest of installation, including the CONFIGURE step, as you would do with a genuine Slackware
Sorry it didn't come to my small mind to do that sooner.

EDIT 21 August 2017, 22h00 UTC+2: uploading a new ISO (build #4) the previous failed to patch eliloconfig.


Didier Spaier 10-05-2018 12:08 PM

Quote:

Originally Posted by Desiderius (Post 5911323)

Just after starting eudevd , stop with an error message

mount /dev/nvme... on /mnt : No such file or directory

This looks really weird as during startup there should be no reason to mount anything on /mnt automatically.

To investigate further please do this:
  • Run the fake installer again up to logging in as "root" but do not run setup.
  • To check which is the partition for / of the installed system type:
    Code:

    lsblk -l -o model,name,type,size,fstype
  • Mount this partition as /mnt
  • Mount the EFI partition as /floppy
  • Provide the output of:
    Code:

    cat /mnt/etc/fstab
  • Provide the output of:
    Code:

    ls -l /floppy/EFI/Slackware
  • Provide the output of code
    Code:

    cat /floppy/EFI/Slackware/elilo.conf
To save some typing you could plug-in an USB stick with a FAT formatted partition, check how it is named typing again the lsblk command above, make a mount point for it like this "mkdir /stick", mount the FAT partition of the stick as /stick.

Then you can redirect all commands above to files in /stick and just type:
Code:

cp /floppy/EFI/Slackware/elilo.conf /stick
to copy the file elilo.conf on the stick.

Desiderius 10-08-2018 01:55 AM

Quote:

Originally Posted by Didier Spaier (Post 5911497)
This looks really weird as during startup there should be no reason to mount anything on /mnt automatically.

To investigate further please do this:
  • Run the fake installer again up to logging in as "root" but do not run setup.
  • To check which is the partition for / of the installed system type:
    Code:

    lsblk -l -o model,name,type,size,fstype
    Code:

    MODEL              NAME      TYPE    FSTYPE
    Flash Disk          sda        disk
                        sda1      part    vfat
                        nvme0n1    disk
                        nvme0n1p1  part    vfat
                        nvme0n1p2  part    vfat
                        nvme0n1p3  part    ntfs
                        nvme0n1p4  part    ntfs
                        nvme0n1p5  part    ntfs
                        nvme0n1p6  par    swap
                        nvme0n1p7  part    reiserfs
                        nvme0n1p8  part    reiserfs
                        nvme0n1p9  part    reiserfs
                        nvme0n1p10 part    reiserfs

    /dev/nvme0n1p1 is my EFI partition and /dev/nvme0n1p7 is my root partition
  • Mount this partition as /mnt
  • Mount the EFI partition as /floppy
  • Provide the output of:
    Code:

    cat /mnt/etc/fstab
    Code:


    /dev/nvme0n1p6    swap        swap      defaults    0  0
    /dev/nvme0n1p7    /            reiserfs  defaults    1  1
    /dev/nvme0n1p10    /home        reiserfs  defaults    1  2
    /dev/nvme0n1p8    /var        reiserfs  defaults    1  2
    /dev/nvme0n1p9    /usr        reiserfs  defaults    1  2
    /dev/nvme0n1p1    /boot/efi    vfat      defaults    1  0
    /dev/fd0          /mnt/floppy  auto      noauto,owner  0  0
    devpts            /dev/pts    devpts    gid=5,mode=620 0  0
    proc              /proc        proc      defaults    0  0
    tmpfs              /dev/shm    tmpfs      defaults    0  0

  • Provide the output of:
    Code:

    ls -l /floppy/EFI/Slackware
    Code:


    -rwxr-xr-x 1 root root      117 Oct 4 10:51 elilo.conf
    -rwxr-xr-x 1 root root    239720 Oct 4 10:48 elilo.efi
    -rwxr-xr-x 1 root root  5835295 Oct 5 12:32 initrd.gz
    -rwxr-xr-x 1 root root  7630144 Oct 4 10:49 vmlinuz-huge

  • Provide the output of code
    Code:

    cat /floppy/EFI/Slackware/elilo.conf
    Code:

    prompt
    delay=100
    timeout=100
    #
    image=vmlinuz-huge
    label=Slack14.2
    root=/dev/nvme0n1p7
    initrd=initrd.gz
    read-only

To save some typing you could plug-in an USB stick with a FAT formatted partition, check how it is named typing again the lsblk command above, make a mount point for it like this "mkdir /stick", mount the FAT partition of the stick as /stick.

Then you can redirect all commands above to files in /stick and just type:
Code:

cp /floppy/EFI/Slackware/elilo.conf /stick
to copy the file elilo.conf on the stick.

Everything seems clear ?

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 the shell after the Slackware installation to make my inird file , maybe the initrd file remembers the /mnt location ?

In any case thanks for your help !

Didier Spaier 10-08-2018 07:41 AM

Quote:

Originally Posted by Desiderius (Post 5912275)
Everything seems clear ?

Yes but, in this requested command:
Code:

lsblk -l -o model,name,type,size,fstype
you omitted the size.
Quote:

1- It does not work with reiserfs partitions ?
I don't know, however I recommend using a "mainstream" file system, well supported. I had never had an issue with ext4 and the gain in performance using another one will probably be unnoticeable, especially on a NVMe device.

Quote:

2- As I have made a
Code:

chroot /mnt ..
in the shell after the Slackware installation to make my inird file , maybe the initrd file remembers the /mnt location ?
Maybe. I recommend installing with the huge kernel, then start the new system and only then make an initrd.

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).

Desiderius 10-09-2018 01:11 AM

[

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

Desiderius 10-09-2018 03:50 AM

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:

Originally Posted by Desiderius (Post 5912659)
[

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


pr0xibus 10-14-2018 11:50 AM

Must admit, your fake_slackware works a treat, UEFI/LVM on NVME worked first time. thanks for the image

average_user 10-20-2019 01:07 PM

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.

bassmadrigal 10-20-2019 01:15 PM

Quote:

Originally Posted by average_user (Post 6048971)
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.

It should work fine, but unless your company is getting you a 3 year old laptop, you'd probably want to run -current since semi-recent hardware support in 14.2 will probably be lacking. The fix for NVMe drives has been in -current for many years and you won't need the fake_slackware64-14.2-4.iso.

Didier Spaier 10-20-2019 01:59 PM

Or install Slint64-14.2.1.2, that ships a 4.19 kernel and speaks Polish during installation ;)

average_user 10-20-2019 03:25 PM

Quote:

Originally Posted by bassmadrigal (Post 6048976)
It should work fine, but unless your company is getting you a 3 year old laptop, you'd probably want to run -current since semi-recent hardware support in 14.2 will probably be lacking. The fix for NVMe drives has been in -current for many years and you won't need the fake_slackware64-14.2-4.iso.

They told me they are going to buy a new laptop. I thought that when it comes to hardware support kernel is the most important part of an OS with only several pieces of software that should be present in the userland and bootloaders. I have created my custom ISO with all packages upgraded to their newest versions what means I will use Linux 4.4.190 that was released in August https://lwn.net/Articles/797253. Can you give me some examples of hardware that is not supported by Slackware 14.2?

Quote:

Originally Posted by Didier Spaier (Post 6048990)
Or install Slint64-14.2.1.2, that ships a 4.19 kernel and speaks Polish during installation ;)

Thanks, but even though I'm not a native English speaker I prefer when my computer speaks to me in English, it just sounds natural.

bassmadrigal 10-20-2019 06:21 PM

Quote:

Originally Posted by average_user (Post 6049010)
They told me they are going to buy a new laptop. I thought that when it comes to hardware support kernel is the most important part of an OS with only several pieces of software that should be present in the userland and bootloaders. I have created my custom ISO with all packages upgraded to their newest versions what means I will use Linux 4.4.190 that was released in August https://lwn.net/Articles/797253. Can you give me some examples of hardware that is not supported by Slackware 14.2?

Any hardware support added to kernels after the 4.4 series are not backported to older kernels. Backporting only happens with security/bug fixes. So, the 4.4.190 kernel should have all the major fixes to ensure it is a relatively secure and bug-free kernel, but no new hardware support has been added since it was released in early 2016.

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.

average_user 10-22-2019 03:03 PM

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
instead of
Code:

cgdisk /dev/sda
Third, X failed to start after installation. I used slackpkg to upgrade to -current but had to copy new vmlinuz manually to /boot/EFI/... so that elilo would pick it up. After reboot I was able to start X. The conclusion is that Slackware 14.2 is getting old.

*EDIT*: what's weird Wi-Fi worked out of the box.

bassmadrigal 10-22-2019 04:20 PM

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.

jazzi 10-30-2019 02:45 AM

@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.