LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Rescue my 15.0 install (https://www.linuxquestions.org/questions/slackware-14/rescue-my-15-0-install-4175732660/)

business_kid 01-11-2024 10:04 AM

Rescue my 15.0 install
 
Hi.

I've had to have my motherboard replaced by a friend, complete with BIOS - such are my present limitations. I swapped an MSI with an Asrock board, so no clever tricks are possible. So although my Slackware-15.0 install is present & correct, it's invisible as an OS until I import some .der file into the new bios, if my understanding of UEFI is correct.

The good news is that somehow Debian bookworm on sdb survived the motherboard swap. I can boot linux, and even installed mokutil in ?Debian.

Efibootmgr doesn't see Slackware. I'd like Slackware-15.0 back, as I have a registered masterpdf in there which doesn't travel well.

Somebody must have written this up and a link to the Slackware .der file would also be wonderful pls.

ZhaoLin1457 01-11-2024 11:10 AM

Quote:

Originally Posted by business_kid (Post 6476035)
Hi.

I've had to have my motherboard replaced by a friend, complete with BIOS - such are my present limitations. I swapped an MSI with an Asrock board, so no clever tricks are possible. So although my Slackware-15.0 install is present & correct, it's invisible as an OS until I import some .der file into the new bios, if my understanding of UEFI is correct.

The good news is that somehow Debian bookworm on sdb survived the motherboard swap. I can boot linux, and even installed mokutil in ?Debian.

Efibootmgr doesn't see Slackware. I'd like Slackware-15.0 back, as I have a registered masterpdf in there which doesn't travel well.

Somebody must have written this up and a link to the Slackware .der file would also be wonderful pls.

Slackware has no support for Secure Boot, which I understand is mandatory on your new motherboard.

So Slackware is not compatible with your new motherboard. Not even Slackware-current.

Petri Kaukasoina 01-11-2024 11:21 AM

Maybe https://docs.slackware.com/howtos:se...ng_secure_boot

hazel 01-11-2024 11:35 AM

Debian uses shim for secure boot. Here is an extract from the Debian wiki describing how to access the MOK keys that shim has registered. https://wiki.debian.org/SecureBoot. In theory, you should be able to use the shim MOK private key to sign the Slackware kernel and any modules you want it to load.

Windu 01-11-2024 12:15 PM

Quote:

Originally Posted by business_kid (Post 6476035)
it's invisible as an OS until I import some .der file into the new bios, if my understanding of UEFI is correct.

UEFI and SecureBoot are two separate things. See if you can disable SecureBoot in the UEFI firmware and your problem should be solved. Slackware supports UEFI 100%, perhaps you need to create a EFI partition before you can install elilo or Grub, but if you already can boot Debian there, the EFI partition should already exist and you can simply add Slackware EFI bootloader to it.

business_kid 01-11-2024 01:27 PM

Thanks for the replies, guys. Judging by the variety I must have expressed myself very badly.

Slackware-15.0 was the default boot option under secure boot from my NVME. The EFI partition is present & correct, and I added a section for debian on a second hd.

Then we removed the MSI motherboard, and replaced it with an Asrock motherboard (Same cpu, ram, chipset, pcie cards). It probably has similar or identical BIOS.

Now, windows is default, but debian can be selected. The EFI entry for Slackware is present & correct but it isn't listed as a boot option even though it'd boot option 0000. efibootmgr does list it in the boot, but the BIOS doesn't.

I feel sure I'm not in ultra-secure boot mode because it's the manufacturer's setting, and he'd only get all the new boards returned as defective if he set them up that way. Somebody just took out one m/b, put in another, and tested it in windows.

Now, is THAT any clearer?

rkelsen 01-11-2024 06:02 PM

You haven't answered the question about whether you disabled secure boot. By default, Slackware won't boot with it on.

Of course it can be done, but you must follow the steps in the document linked by Petri above.

enorbet 01-11-2024 06:45 PM

Some questions and a suggestion...

Quote:

Originally Posted by ZhaoLin1457 (Post 6476043)
Slackware has no support for Secure Boot, which I understand is mandatory on your new motherboard.
So Slackware is not compatible with your new motherboard. Not even Slackware-current.

Sorry but I don't understand how you reached the conclusion that Secure Boot is mandatory with only the mobo manufacturer's name, absent the model. I'd like to understand this better.


Quote:

Originally Posted by business_kid (Post 6476035)
Efibootmgr doesn't see Slackware.

Does the Slackware 15.0 Installation media boot? I ask this assuming you ran efibootmgr from Debian since apparently you have yet to boot Slackware on the new mobo.


Quote:

Originally Posted by business_kid (Post 6476072)
Slackware-15.0 was the default boot option under secure boot from my NVME. The EFI partition is present & correct, and I added a section for debian on a second hd.

So on the previous MSI mobo you had Slackware working with Secure Boot enabled? How?

Quote:

Originally Posted by business_kid (Post 6476072)
Then we removed the MSI motherboard, and replaced it with an Asrock motherboard (Same cpu, ram, chipset, pcie cards). It probably has similar or identical BIOS.

Certainly not identical but likely similar and should work with little or no problem. FWIW as a vote of confidence, I have successfully swapped drives back and forth between a 2006 Thinkpad laptop, a 2010 SuperMicro tower, and a 2012 Asrock tower, however only the latter employs proper EFI Boot (Secure Boot disabled) but would boot with LILO. After first boot into Slackware via installation media in EFI mode and chroot-ing into main drive, running efibootmgr added Slack to Boot Menu and Iwould boot Slack via either method.

Quote:

Originally Posted by business_kid (Post 6476072)
Now, windows is default, but debian can be selected. The EFI entry for Slackware is present & correct but it isn't listed as a boot option even though it'd boot option 0000. efibootmgr does list it in the boot, but the BIOS doesn't.

Absent a kernel aware bootloader like rEFInd or Grub, I'm confidant efibootmgr needs to be run from Slackware to insert the entry into BIOS/EFI Boot Menu, with the possible exception (and welcome relief) of the ability to use the F-Key to select Boot Menu. Some BIOSes will detect any bootable drive, even removable drives even if no entry is present in the default BIOS/EFI screen.

Quote:

Originally Posted by business_kid (Post 6476072)
I feel sure I'm not in ultra-secure boot mode because it's the manufacturer's setting, and he'd only get all the new boards returned as defective if he set them up that way.

I don't understand the assumed levels of Secure Boot. AFAIK it is either Enabled or Disabled. Do you have a 3rd option for "ultra-secure"? This could be simply because my newest mobo is a Z490 and I'm ignorant in more recent changes, but if you enter BIOS Setup I'd try disabling Secure Boot altogether at least for a few tries. You can always put it back if desired.

That desire as I understand it will depend on whether your Windows version is 7, 10, or 11. 7 can be made to boot with Secure Boot from EFI, 10 defaults that way but will run absent Secure Boot, and AFAIK 11 may require both.

It might be wise if Debian uses Grub to either manually add Slackware to Grub or enable the "OS Prober" function to autodetect and boot Slack. Another option would be to try the Slackware Installation media or build a rEFInd USB stick which will detect any possibly bootable kernel and attempt to boot it. Assuming Slackware's "/efi/EFI/Slackware exists" (possibly even without it) it should boot.

Good Fortune!

allend 01-11-2024 08:55 PM

Quote:

Slackware has no support for Secure Boot, which I understand is mandatory on your new motherboard.
Highly unlikely. From Microsoft
Quote:

All x86-based Certified For Windows PCs must meet several requirements related to Secure Boot:

They must have Secure Boot enabled by default.
They must trust Microsoft's certificate (and thus any bootloader Microsoft has signed).
They must allow the user to configure Secure Boot to trust other bootloaders.
They must allow the user to completely disable Secure Boot.
There is no support for the Slackware installer to boot with Secure Boot enabled, same as the Arch official installation image.

Quote:

I don't understand the assumed levels of Secure Boot. AFAIK it is either Enabled or Disabled. Do you have a 3rd option for "ultra-secure"?
From the above Microsoft link
Quote:

Secured-core PCs require Secure Boot to be enabled and configured to distrust the Microsoft 3rd Party UEFI CA signature, by default, to provide customers with the most secure configuration of their PCs possible.
I do not think this is a problem for the OP, otherwise Debian would not boot. Even if it were, the trust can be enabled.

hazel 01-12-2024 12:11 AM

Quote:

Originally Posted by business_kid (Post 6476072)
Now, windows is default, but debian can be selected. The EFI entry for Slackware is present & correct but it isn't listed as a boot option even though it'd boot option 0000. efibootmgr does list it in the boot, but the BIOS doesn't.

That sounds a bit like what my UEFI chip does. Sorry, I don't know the make of the mobo but the machine is a Lenovo Thinkcentre. The UEFI simply does not recognise most of the info provided by efibootmgr. It ignores boot order and deactivation of entries. To get it to boot Slackware's elilo.efi on my new drive, I had to use efibootmgr to remove the preferred alternative (which was actually the bootloader on the old disk).

Do you actually need two separate bootloaders for Debian and Slackware?

henca 01-12-2024 12:34 AM

Quote:

Originally Posted by business_kid (Post 6476035)
The good news is that somehow Debian bookworm on sdb survived the motherboard swap. I can boot linux,

So what does "/sbin/fdisk -l" say? Do you have multiple EFI partitions?

regards Henrik

business_kid 01-12-2024 06:54 AM

Thanks for all the replies, lady & gentlemen. Some things Have become clear to me

* I have been misusing the term "Secure Boot". Sorry for any confusion. The box is on the m/b default setting, and I presume they don't want customers unable to boot.

* I referenced an output from efibootmgr which had windows as #1 in the Boot Order and which allowed me to insert Slackware in as Boot order 0000. That wasn't connected to reality. It was wrong.

* Debian gives me the following boot order
Code:

dec@Ebony:~$ sudo efibootmgr
[sudo] password for dec:
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0000,0002,0003
Boot0000* Windows Boot Manager
Boot0002* debian
Boot0003* Hard Drive

And Slackware agrees. The XFCE Liveslak doesn't have efibootmgr or mokutil, but I could mount the Slackware partition and run them from there. That agrees with debian. I presume Slackware was left out because of Murphy's Law. It was the one I really wanted in, and windows got in and overwrote that spot in the boot order. Some other stuff
Code:

dec@Ebony:~$ sudo gdisk -l /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.9

Number  Start (sector)    End (sector)  Size      Code  Name
  1            2048          206847  100.0 MiB  EF00  EFI system partition
  2          206848          239615  16.0 MiB    0C01  Microsoft reserved ...
  3          239616      531958412  253.5 GiB  0700  Basic data partition
  4      531959808      533118975  566.0 MiB  2700 
  5      533121024      534145023  500.0 MiB  8300  boot
  6      534145024      659974143  60.0 GiB    8300  root
  7      659974144      999170047  161.7 GiB  8300  home
  8      999170048      1000212479  509.0 MiB  2700 

dec@Ebony:~$ sudo ls /boot/efi/EFI/
Boot  debian  Microsoft  SDASlack  Slackware

dec@Ebony:~$ sudo ls /boot/efi/EFI/Slackware
elilo.bak  elilo.conf  elilo.efi  initrd.gz  memtest86+-6.20.bin  vmlinuz

dec@Ebony:~$ sudo efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0000,0002,0003
Boot0000* Windows Boot Manager        HD(1,GPT,5e0a4df4-b065-41f1-b1a5-8ce98d4fbe2e,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...M................
Boot0002* debian        HD(1,GPT,5e0a4df4-b065-41f1-b1a5-8ce98d4fbe2e,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
Boot0003* Hard Drive        BBS(HD,,0x0)..GO..NO........u.T.O.S.H.I.B.A. .M.Q.0.4.A.B.F.1.0.0....................A.................................>..Gd-.;.A..MQ..L. . . . . . . . . . .Z. .J.8.C.Y.J.K.T.1........BO..NO........s.I.N.T.E.L. .S.S.D.P.E.K.N.W.5.1.2.G.8....................A.......................................6..Gd-.;.A..MQ..L.B.T.N.H.2.0.3.5.0.U.3.Z.5.1.2.A........BO
dec@Ebony:~$

As you'll see, there's only one EFI partition, Slackware isn't to be seen, and I'm coming to terms with being stuck in Debian. As soon as I get time, I'll bend that boot order into something more to my liking, and get Slackware back. So I'll go quiet for a day or two while I figure this out, and hope to come back with good news. Debian's efibootmgr is throwing funny errors (on /dev/nvme0n1p6 I think).

biker_rat 01-12-2024 08:23 AM

Is windows version 11 or 10? I believe 11 requires secure boot. Sometimes default is secure boot on if Windows 11 is intended OS. When you switch mobo slackware key for secure boot is maybe no longer good? Process can maybe be redone from linux live usb that supports secure boot mounting slackware partition? This is advanced stuff for experienced slackware person who has taken an interest in getting it to work, which I am not, and I am not willing to become one as I would never install windows product outside VM. Or, if secure boot is off, use slackware installer usb as boot for slackware partition to start and go from there.

BrunoLafleur 01-12-2024 09:15 AM

Quote:

Originally Posted by business_kid (Post 6476220)
Thanks for all the replies, lady & gentlemen. Some things Have become clear to me

* I have been misusing the term "Secure Boot". Sorry for any confusion. The box is on the m/b default setting, and I presume they don't want customers unable to boot.

But is the option "Secure Boot" set to "Enable" in the Bios panel or not ? It is now often the default as I often see in boxes sold with MS Windows. It is called like that in the bios menus.

You can also have "Other OS" as an option near the "Secure Boot" options.

Petri Kaukasoina 01-12-2024 09:27 AM

Quote:

Originally Posted by business_kid (Post 6476035)
installed mokutil in ?Debian.

Quote:

Originally Posted by business_kid (Post 6476220)
The XFCE Liveslak doesn't have efibootmgr or mokutil, but I could mount the Slackware partition and run them from there. That agrees with debian.

To check whether Secure Boot is enabled, run:

Code:

mokutil --sb-state
Does it reply “Secure Boot enabled” ?


All times are GMT -5. The time now is 02:18 AM.