SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I hope that is the case. This is odd so it looks like grub-install is doing everything in the wrong partition then. Yes, that makes sense for /boot/efi/EFI to show a Microsoft directory for Windows efi bootloader. I have no idea at all, is any command or way to find this out ? I will put a screenshot of cfdisk to see if have more than one efi partition. Yes I will try to use same one as windows. I bet my uefi/firmware also only works on original efi partition too.
Yes let's try to keep our posts shorter.
That is fine and this is not something that will really help me with my problem at hand here anyways but good to know. I'm not familiar with Liveslak but Slackware has the same Ctrl-Alt-Backspace to get out of the default X session if I'm not mistaken, but not sure what init 3 is or used for. Sure is always something good to find out more.
I will look into chainload and how that works it is not really that complex to setup but, behind the scenes, a lot is going for that to actually do its job
Good that LILO and elilo can boot into Windows. one way or another, even if by chainload only. Yes chainload passes itself off to a different bootloader, like Windows here, and at that point Windows takes over for bootup.
Well I'm no where near the kernel yet to know if it has any issues or not hope to find out soon. I do not think by skipping LILO/elilo is what is the cause of my current problem or looking into the efibootmgr option switches too. I may not find the cause but still looking to fix this for now. Yes, I'm aware that 'efibootmgr' by itself will only give me information, but that info is very helpful. Sure it needs the switches do actually do anything, and I've been looking at 'efibootmgr --help' and 'man efibootmgr.' I hope they both tell me how to an add an entry in firmware for BIOS/UEFI to "see" and use it. I still do not know how efibootmgr can show the root partition location, but I'm working on that. I need someone who knows grub more than me to say how it is done.
Yes coming from a Windows background you do not really needs to read docs or things like that but Linux is not the same at all here and that's fine. Yes I will make it a habit to look at the docs more often especially with Slackware too.
Sure that is fine. And I'm by no means a hardcore Linux or Slackware user but like to be more well-versed in all of that soon. You are right not much has changed in Slackware since 1998 or so and is why I prefer it as my default linux distro for most tasks. Yes, but many changes that Windows brings are not great.
It is nice to hear that reEFInd is very friendly but still has as many features that other bootloaders like grub and the like do. It is a relief that do not need grub up and running to use rEFInd but need to get Slackware in my BIOS/UEFI boot menu. Yes I almost am going to fix that here for good. Is helpful that rEFInd can do a probe that picks up all and any kernels and even the ones that will not boot. Maybe grub cannot do the same, but I'm likely wrong on that, just something to consider. I like that rEInd can hide entries from the boot menu, and I'm also looking for a bootloader that has a GUI menu as well. And just like most bootloaders, rEFInd has a config file that is called refind.conf and that is great too. I'm surprised refind.conf is based on the syntax from LILO and yes will just read rEFInd's docs instead of LILO to see how that works as well.
Same to you too.
Quote:
On an efi system add "mount /dev/sda1 /mnt/boot/efi" before chroot command, change accordingly if sda1 is not the efi partition.
Ok this seemed to make a huge difference in the output of the ls /boot, ls /boot/efi, and ls /boot/efi/EFI commands. So I posted a new screenshot of them. I will try grub-install again soon.
Yes that is a huge difference and specifically because /boot/efi/EFI shows a slackware-14.2 directory. My slackware-15.0 directory in /boot/efi/EFI has kernels, configs, System.maps and a few elilo files. Since you're using grub the only reference I can show is with my opensuse installation since it is the only install I have (of about a dozen) that is allowed to use grub2. FWIW Suse's grub will not only boot it but also Windows and Slackware, so it should work similarly for you.
Suse is organized differently than my Slackware directories having just "/boot/EFI" instead of "/boot/efi/EFI" and it is organized thusly "/boot/EFI/opensuse" and in it are the typical vmlinuz (kernel), config, and System.map files but importantly also "grubx64.efi" so I'm assuming that until or unless you install elilo or rEFInd you should see a "grub64.efi" file in your /boot/efi/EFI/slackware-14.2/ directory. If not, then probably grub-install has some wrong information on what to boot and/or from where. Fix that and it should boot, in many cases even without a Firmware entry.
BTW I just read that EasyBCD 2.3 works with Windows 10 and will multiboot.
Suse is organized differently than my Slackware directories having just "/boot/EFI" instead of "/boot/efi/EFI"
Does this mean the efi partition is mount at /boot and the efi partition is also being used as the boot partition? The problem with this is a fat32 system can't do symlinks.
Quote:
Does one need to escape the nasty chars in \EFI\Slackware-14.2\grubx64.efi when running efibootmgr from the commandline ?
The majority of the examples I have come across use \, Gave a go in a vm doesn't seem to matter if it is / or \.
Does one need to escape the nasty chars in \EFI\Slackware-14.2\grubx64.efi when running efibootmgr from the commandline ?
-- kjh
Quote:
Originally Posted by colorpurple21859
Does this mean the efi partition is mount at /boot and the efi partition is also being used as the boot partition? The problem with this is a fat32 system can't do symlinks.
The majority of the examples I have come across use \, Gave a go in a vm doesn't seem to matter if it is / or \.
The reason I asked is because the shell will normally treat \ as an escape unless the string is properly quoted.
I can't tell from the man page -- the examples are a mess on my Slackware64 15.0 Laptop
-- kjh
Note the odd back-slash, slash sequences ...
Code:
$ man efibootmgr
<<snip>>
Creating a new boot option
An OS installer would call efibootmgr -c. This assumes that /dev/sda1 is your EFI System
Partition, and is mounted at /boot/efi. This creates a new boot option, called "Linux",
and puts it at the top of the boot order list. Options may be passed to modify the default
behavior. The default OS Loader is \EFI\/boot/efi\grub.efi.
<<snip>>
If no errors reboot to see if you get the grub menu.
Do I only need to mount sda1 the EFI system partition and sda10 the Linux partition ? Should I put sda1 instead of sda since that is where the ESP is at ?
That is right and we are looking at sda1 now which is the EFI system partition and it has a slackware-14.2 folder. If I were able to look inside this slackware-14.2 directory it will have the same things as well. I'm not surprised that opensuse uses grub as the bootloader as most linux distros do as does suse too. So you have a dozen linux distros installed, I bet they are all not on the same PC. Yes it makes sense for Suse's grub to boot Slackware and Windows also, or else it would not be a good bootloader. I hope it works the same for me.
Well I guess just /boot/EFI instead of /boot/efi/EFI it does make it simpler and one less folder to deal with. That looks almost the same as Slackware at '/boot/efi/EFI/slackware-14.2' Yes I'm sure the slackware-14.2 folder has all of this in there too. And I found grubx64.efi here. I'm only going to install rEFInd at some point we will see. So it is a good sign that I have grubx64.efi in /boot/efi/EFI/slackware-14.2. Any clue why the BIOS/UEFI boot menu will not recognize it anymore ? I need to make a GRUB USB and if I'm able to boot Slackware 14.2 from it that means something is wrong with my BIOS/UEFI boot menu only, but no clue how to fix that. I hope to get to the bottom of this in a very short time.
Yes but if I'm not mistaken EasyBCD 2.3 will only work with MBR and BIOS with Windows 10
Sure that is fine and I did the exact commands listed here in the same order as well, but nothing has changed. I put a screenshot of what happens after that long efibootmgr command, but after a restart still do not see 'slackware-14.2' 'linux' or anything like that in the BIOS/UEFI boot menu. Is anything else we can try here ?
Quote:
There may be some obscure setting that needs to be changed.
It feels like I have no control over the BIOS/UEFI boot menu. Any clue what that may be?
The image in your last post shows an entry for Slackware in the efibootmgr output. Check the site at the link below which explains how to use efibootmgr to change the entry priority to put Slackware at the top as the first boot entry and see if that changes anything. Post back if it fails and what warning/error messages you might get.
The screenshot shows Slackware first in the boot order. At the reboot should have at least have a grub> prompt. You may have to change the boot-order in the bios/firmware. I have to on my Hp laptop, the efibootmgr will register the entry, but can't change the boot order. The other thought is it is a 32bit uefi firmware and need to run
Code:
grub-install --target=i386-efi
after chrooting back into the system. Try this first, run the mount commands and chroot back into the system run
Code:
efibootmgr -n 0003
exit and reboot. If you get grub it is a bios problem if you don't get the grub menu/grub> would suggest run the "grub-install --target=i386-efi" after chrooting back into the system again and see what happens.
Last edited by colorpurple21859; 04-17-2023 at 05:33 AM.
Yes in the screenshot I put it shows an entry for Slackware and it is already first boot order. This is a good link but no need to do anything stated in here as Slackware is first boot device. The issue is upon reboot whatever efibootmgr does is not getting saved so everything reverts back to before. If anyone has a clue why that happens, I'm all ears with that. Also, need Slackware to be in the BIOS/UEFI boot menu.
That's right glad someone noticed from the screenshot that efibootmgr did put Slackware as the first device in the boot order. I cannot do that as Slackware is not listed will not show up in the BIOS/UEFI boot menu. That's too bad if on your HP laptop efibootmgr is not able to change the boot order, but I assume many other systems are the same way. And at this point I'm pretty sure it is not 32-bit UEFI.
But I finally solved the problem. I ran 'grub-install --target-x86_64-efi' and when it was done it gave the output of efibootmgr for the first time. I knew then it was fixed. On reboot, I now see 'slackware-14.2' back in the BIOS/UEFI boot menu. The difference from last time was 'mount /dev/sda1 /mnt/boot/efi' before the chroot command. So, grub-install was able to do it's thing on the EFI system partition and not the Linux partition on sda10.
I went into BIOS/UEFI F2 setup to change the boot order to have Windows be the first and that worked. I find efibootmgr a bit cumbersome to use. Also, can I use reEFInd and grub on the same drive ? If not, will put reEFInd on a USB. By the way, I made a grub USB boot drive based on this site:
It is possible to have both Grub and rEFInd work, and even good ol' legacy LILO, too, IF they are installed on separate partitions. Your BIOS/UEFI should recognize fully bootable devices in the Boot Order menu.
For example if one inserts a Slackware Installation USB drive and enters Boot Order, since the installer has both Legacy CSM boot capability as well as EFI capability, there should temporarily be 2 entries in the Boot Order Menu, one for Legacy and one for UEFI on the same drive. On my system I can boot directly to grub by selecting the drive/partition from Boot Order menu, or from rEFInd, or from an elilo entry. This is done via Boot Order and that order can be selected in each of 1 - 6 entries on my main machine right in BIOS/UEFI. This order does not have to match that listed by efibootmgr once a bootable system kernel has been detected.
Yes, refind and be installed alongside grub on the efi partition. For grub to boot windows manually create an entry in /etc/grub.d/40_custom and rerun grub-mkconfig, or create a /boot/grub/custom.cfg file with the window menuentry(no need to run grub-mkconfig), or add this "GRUB_DISABLE_OS_PROBER=false" to /etc/default/grub and run grub-mkconfig. On a slackware system I normally edit the /boot/grub/grub.cfg to use vmlinuz-generic or vmlinuz-huge symlink and never have to bother running grub-mkconfig again.
Last edited by colorpurple21859; 04-17-2023 at 12:27 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.