camscape - for excellent IT solutions itkb.ro - IT knowledge base

linux :: slackware 14.2 with grub and nvme

David
David G.
TitleSlackware 14.2 with GRUB and NVME
Tagsslackware,nvme,grub
Desc.Slackware 14.2 with GRUB and NVME
CodeKBLN0044 v1.0
Date22 mai 2020

Suppose:

- have a fresh install of Slackware 14.2 64b on a server

- have a NVME disk named /dev/nvme0n1 partitioned with nvme0n1p1 swap, a 500MB nvme0n1p2 as /boot and the rest (root) in nvme0n1p3

- alternatively, have 2 NVME disks, named /dev/nvme0n1 and /dev/nvme1n1. Create same partitioning as above on both and 2 RAID1 devices for /boot and root

 

Boot with Slackware DVD or something that will see NVME disks

 

Mount partitions:

 

mount /dev/nvme0n1p3 /mnt
mount /dev/nvme0n1p2 /mnt/boot

 

Or, for RAID version:

 

mount /dev/md1 /mnt
mount /dev/md0 /mnt/boot

 

Mount /sys and /proc from live DVD:

 

mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc

 

Copy (if not exists) /dev/nvme* from live DVD:

 

cp -a /dev/nvme* /mnt/dev

 

Get a recent GRUB (existent 2.00 on Slackware 14.2 does not know about NVME) from https://ftp.gnu.org/gnu/grub/ for example: https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz

 

Install it:

 

tar -xf grub-2.04.tar.xz
cd grub-2.04
./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc
make
make install

 

Now, configure GRUB:

 

grub-mkconfig -o /boot/grub/grub.cfg

 

And install GRUB:

 

grub-install /dev/nvme0n1

 

or for RAID1 version:

 

grub-install /dev/nvme0n1
grub-install /dev/nvme1n1

 

Reboot