Article 6M031 Updating Slackware 15.0+

Updating Slackware 15.0+

by
rocknrobin
from LinuxQuestions.org on (#6M031)
I just recently built a new PC whereupon I cannot enable CSM on my motherboard so I am trying to move an existing Slackware 15.0+ MBR image on hard drive to UEFI. I posted a thread on this forum back in February 2022, https://www.linuxquestions.org/quest...ub-4175708479/, that detailed directions to make this happen which I have summarized here:

Code:
To fix:
reimage the hardrive
boot ubuntu usb,
use gparted to shrink sda1 and create a 200mb fat32 partition flagged esp.
open a terminal

to convert to gpt drive use gdisk

sudo gdisk /dev/sda

after converting to gpt mount /dev/sda1 and chroot into the system and install grub
chroot /mnt /bin/bash

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
sudo chroot /mnt
mkdir /boot/efi
mount /dev/sda2 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
exit

Also if used in a virtual environment:

mkdir /boot/efi/EFI/boot
cp /boot/efi/EFI/grub/grubx64.efi /boot/efi/EFI/boot/bootx64efiAll these steps worked great and I was able to have a UEFI bootable Slackware platform on my new PC then. I tried with basically the same hardware today on a new machine...same exact motherboard, same RAM, and same processor. This is the error message I get when I try the grub-install today.

Code:
bash-5.2# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.Repartitioning the hard drive and converting to a GPT drive worked ( on /dev/sda -- sdb is the usb drive I am using to make these modifications).

Code:
root@robby-Z690-UD-DDR4:~# parted -l
Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 32.3kB 999GB 999GB ext4 Linux filesystem
2 999GB 999GB 537MB fat32 EFI system partition boot, esp

Model: USB SanDisk 3.2Gen1 (scsi)
Disk /dev/sdb: 61.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 61.5GB 61.0GB ext4

root@robby-Z690-UD-DDR4:~# gdisk /dev/sda

GPT fdisk (gdisk) version 1.0.8

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

Found valid GPT with protective MBR; using GPT.
I do see that efivar must be installed:

Code:
bash-5.2# efivar --usage
Usage: efivar [OPTION...]
-t, --attributes=<attributes> attributes to use on append
-l, --list list current variables
-p, --print print variable specified by --name
-D, --dmpstore use DMPSTORE format when exporting
-d, --print-decimal print variable in decimal values specified
by --name
-n, --name=<guid-name> variable to manipulate, in the form
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0000
-a, --append append to variable specified by --name
-f, --datafile=<file> load or save variable contents from <file>
-e, --export=<file> export variable to <file>
-i, --import=<file> import variable from <file
-L, --list-guids show internal guid list
-w, --write write to variable specified by --name

Help options:
-?, --help Show this help message
--usage Display brief usage messagebut when listing the variables, which I can do on the working UEFI machine lists nothing.

Code:
bash-5.2# efivar --list
efivar: error listing variables: Function not implementedHas something changed with Slackware since 2022 that needs to be modified to make this work now?

Thanks for any help.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments