LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-16-2023, 01:00 PM   #31
seskanda
Member
 
Registered: Jun 2007
Posts: 68

Original Poster
Rep: Reputation: 0

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.
Attached Thumbnails
Click image for larger version

Name:	cfdisk.jpg
Views:	18
Size:	137.3 KB
ID:	40825   Click image for larger version

Name:	bootefi.jpg
Views:	16
Size:	113.9 KB
ID:	40826  
 
Old 04-16-2023, 02:33 PM   #32
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Mount everything if needed and chroot back into the system and run this to register slackware with the bios:
Code:
efibootmgr --create --disk /dev/sda --part 1 --loader \EFI\Slackware-14.2\grubx64.efi --label "slackware-14.2" --verbose
If no errors reboot to see if you get the grub menu.
 
Old 04-16-2023, 02:37 PM   #33
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by colorpurple21859 View Post
Mount everything if needed and chroot back into the system and run this to register slackware with the bios:
Code:
efibootmgr --create --disk /dev/sda --part 1 --loader \EFI\Slackware-14.2\grubx64.efi --label "slackware-14.2" --verbose
If no errors reboot to see if you get the grub menu.
I am curious colorpurple21859.

Does one need to escape the nasty chars in \EFI\Slackware-14.2\grubx64.efi when running efibootmgr from the commandline ?

-- kjh
 
Old 04-16-2023, 02:38 PM   #34
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,797

Rep: Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436
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.
 
Old 04-16-2023, 03:11 PM   #35
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
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 \.
 
Old 04-16-2023, 03:40 PM   #36
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by kjhambrick View Post
I am curious colorpurple21859.

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 View Post
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>>
 
Old 04-16-2023, 09:27 PM   #37
seskanda
Member
 
Registered: Jun 2007
Posts: 68

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
Mount everything if needed and chroot back into the system and run this to register slackware with the bios:
Code:
efibootmgr --create --disk /dev/sda --part 1 --loader \EFI\Slackware-14.2\grubx64.efi --label "slackware-14.2" --verbose
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
 
Old 04-16-2023, 10:09 PM   #38
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
always do the mount bind commands and chroot into system when attempting to fix grub problems from slackware iso

Code:
mount /dev/sda10 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
mount /dev/sda1 /mnt/boot/efi
chroot /mnt /bin/bash
efibootmgr --create --disk /dev/sda --part 1 --loader \EFI\Slackware-14.2\grubx64.efi --label "slackware-14.2" --verbose
"--disk /dev/sda" is the drive , "--part 1" is the partition number

Last edited by colorpurple21859; 04-16-2023 at 11:00 PM.
 
Old 04-16-2023, 10:30 PM   #39
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
that means something is wrong with my BIOS/UEFI boot menu only, but no clue how to fix that.
There may be some obscure setting that needs to be changed.
 
Old 04-17-2023, 12:44 AM   #40
seskanda
Member
 
Registered: Jun 2007
Posts: 68

Original Poster
Rep: Reputation: 0
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?
Attached Thumbnails
Click image for larger version

Name:	efiboot.jpg
Views:	26
Size:	64.9 KB
ID:	40829  
 
Old 04-17-2023, 04:36 AM   #41
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,551

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
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.

https://linuxconfig.org/how-to-manag...tries-on-linux
 
Old 04-17-2023, 05:27 AM   #42
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
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.
 
Old 04-17-2023, 11:26 AM   #43
seskanda
Member
 
Registered: Jun 2007
Posts: 68

Original Poster
Rep: Reputation: 0
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:

https://www.pendrivelinux.com/instal...-from-windows/

But although it boots, it does not detect my hard drive at all, It picks up the USB drive and an SD drive, but that is it, any clue how to fix that ?

Last edited by seskanda; 04-17-2023 at 11:33 AM.
 
Old 04-17-2023, 12:05 PM   #44
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,797

Rep: Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436
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.
 
Old 04-17-2023, 12:26 PM   #45
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware 64 Current: Network Manager and lid open: works in January Slackware, not August Slackware jr_bob_dobbs Slackware 7 01-28-2021 09:02 AM
About Slackware 9.1 boot disk?? ftp://ftp.kpn.be/pub/linux/slackware/slackware-9.1-is AL3OMDAH Slackware 4 04-18-2007 09:54 AM
/boot/boot/boot/boot/boot/ muddywaters SUSE / openSUSE 1 09-10-2005 06:08 AM
system alarm on boot in slackware 10.0 but not win2000(dual boot) Arch Stanton Slackware 3 01-24-2005 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration