LinuxQuestions.org
Review your favorite Linux distribution.
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 12-20-2023, 07:42 PM   #286
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 508

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586

Just wanted to point out that the slackware images on Linode(akamai?) appear to be using GRUB. It seems to work perfectly fine. The only issue I encounter with it is when trying to remember how to update. Whenever I think try to remember the GRUB commands my brain goes into *buntu mode and I instinctively type "update-grub" which obviously doesn't do anything here...

If we do switch to GRUB, it would be nice to add an /sbin/update-grub script that calls the appropriate commands to write grub.cfg to whatever standard file location Pat decides is best.
 
4 members found this post helpful.
Old 12-21-2023, 06:16 AM   #287
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,549

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Quote:
it would be nice to add an /sbin/update-grub script that calls the appropriate commands to write grub.cfg
The update-grub on Ubuntu and derivatives is just one line which runs grub-mkconfig which you can see below. If you look at the file on your Ubuntu, you will see that. You could just create a link to run it if you are more familiar with that.

Code:
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
 
3 members found this post helpful.
Old 12-21-2023, 06:37 AM   #288
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,979

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by Pithium View Post
If we do switch to GRUB, it would be nice to add an /sbin/update-grub script that calls the appropriate commands to write grub.cfg to whatever standard file location Pat decides is best.
Just my opinion, not a fan of this, not really needed. What Pat decides, I am good with. It's not like I really have any choice.
 
Old 12-21-2023, 06:25 PM   #289
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,189

Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by chrisretusn View Post
Just my opinion, not a fan of this, not really needed. What Pat decides, I am good with. It's not like I really have any choice.
Well he pretty much implicitly confirmed when I made a request about having a choice of both LILO/ELILO and GRUB in the installer that it will be only GRUB - because well LILO/ELILO has pretty much stopped being maintained from what it seems anyhow. So it is now not if, but when Pat pulls the trigger and makes GRUB the new bootloader.
 
Old 12-21-2023, 10:03 PM   #290
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,979

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by Jeebizz View Post
Well he pretty much implicitly confirmed when I made a request about having a choice of both LILO/ELILO and GRUB in the installer that it will be only GRUB - because well LILO/ELILO has pretty much stopped being maintained from what it seems anyhow. So it is now not if, but when Pat pulls the trigger and makes GRUB the new bootloader.
I was referring to /usr/bin/update-grub, a wrapper that runs 'grub-mkconfig -o /etc/boot/grub.cfg'; it is not necessary. If Pat decides to add an upgrade-grub to the package, so-be-it. I will still do it my way and use 'grub-mkconfig -o /etc/boot/grub.cfg' as I do now.

As for lilo/elilo? Yes I read Pat's comment on this the same as you did; lilo/elilo are gone in the next version of Slackware. I was a die hard lilo user. It's the reason I decided to learn grub. Better now than when the shoe drops. I'm good with lilo now, figure it out enough to make it work the way I like. I do wish the scripts in /etc/grub.d/ were better documented, maybe in this upcoming version. I only played with elilo in a VirtualBox EFI machine, it was not very dependable; grub on the other hand is. I am 100% on grub now. So even if lilo/elilo don't make it to pasture I fine with that.
 
Old 12-22-2023, 03:37 AM   #291
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by chrisretusn View Post
What Pat decides, I am good with.
Whichever boot loader becomes the default doesn’t matter to me either—especially as long as I get the choice to deploy it or not. Ever since I learned how to build a boot loader from source and deploy it (i.e., since the days of the Red Hat 9 desktop and GRUB 0.97), I’ve been installing my boot loader independently of any operating system; I can, thus, remove or change or add operating systems as I see fit without ever destroying the boot loader.

Whenever I set up a computer from scratch, I first set up the boot loader and make sure that it works; only then do I install the (only or first) operating system. One of the great little details about the Slackware installer is, that it won’t force me to deploy a boot loader. I have just installed the Devuan desktop, and that, on the other hand, insists on installing GRUB even if there’s already a boot loader present. Under UEFI, that’s OK by default—an entry gets added to the EFI boot menu, and some stuff gets copied to the ESP (“EFI System Partition”); I won’t even notice it unless I go looking for it, and I can remove it all if I wish. Under legacy BIOS, however, the existing boot loader will get overwritten unless I take care to change the location to which Devuan will install its own GRUB copy.

I currently use Limine as my boot loader, but even if I return to GRUB, I’ll continue to handle it myself, independently of any operating system.
 
Old 12-22-2023, 03:53 AM   #292
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Quote:
Originally Posted by luvr View Post
Whenever I set up a computer from scratch, I first set up the boot loader and make sure that it works; only then do I install the (only or first) operating system.
Just out of curiosity, how do you install a bootloader (I assume you build it elsewhere) and test it without a running OS?
 
Old 12-22-2023, 09:47 AM   #293
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by hazel View Post
Just out of curiosity, how do you install a bootloader (I assume you build it elsewhere) and test it without a running OS?
To build the boot loader, I obviously need a host computer that runs a suitable operating system; until recently, I built the boot loader under Ubuntu 20.04 on my desktop computer, but nowadays I use Slackware 15.0 as the host OS. I perform the build on a separate ext4 partition (labelled “CustomBootLoader”) and keep a copy of its contents on a USB stick.
These days, all my system disks will be partitioned with a GPT, and they will be hybrid BIOS/UEFI bootable.

When I get to install a computer from scratch, I will, obviously, have to boot it from some medium like a DVD or a USB stick (generally, “SystemRescue” is an interesting option); I usually either wipe the partition table clean with the ‘dd’ command—e.g.:
Code:
dd if=/dev/zero of=${SYSTEMDISK} bs=$(( 64 * 1024 )) count=4096 status=progress
(or some such), or with the “o” option (“create a new empty GUID partition table (GPT)”) of the ‘gdisk’ command.

I then create three partitions on the system disk:
  1. BIOS Boot partition—just 960 KiB, sectors 128 through 2047 (this is the first MiB of the disk, minus 64 KiB at the start to leave ample room for the GPT).
    The first stage of the Legacy BIOS boot loader will get dumped here when it is deployed; when the computer boots in UEFI mode, this partition will remain unused.
  2. ESP (“EFI System Partition”), a few hundred MiBs, depending on the available disk space. While this is a requirement for UEFI mode only, it is a handy location for some files that the boot loader needs in Legacy BIOS mode as well—e.g., in the case of Limine, the ‘limine.cfg’ configuration file (shared by the Legacy BIOS and UEFI modes) and the ‘limine-bios.sys’ module (for Legacy BIOS only).
  3. An ext4 partition labelled—you guessed it—“CustomBootLoader”, onto which I copy the contents of the USB stick.
Next, I deploy the boot loader according to its instructions; in the case of Limine, this means:
  • Copy ‘BOOTX64.EFI’ to the ‘/EFI/BOOT’ directory (which must, obviously, first be created) of the ESP; this will provide UEFI boot support.
  • Copy ‘limine-bios.sys’ to the root directory of the ESP, for Legacy BIOS boot support.
  • Copy a dummy ‘limine.cfg’ configuration file to the root directory of the ESP, just so Limine will have at least something to do when it boots.
  • Run ‘limine bios-install’ to deploy the Legacy BIOS boot loader to the first partition (i.e., the BIOS Boot Partition) of the system disk.
Finally, I attempt to boot the computer from its system disk. Unless I somehow messed up, the boot loader should successfully process its configuration file and display its (fairly useless, at this point) menu.
 
2 members found this post helpful.
Old 01-04-2024, 07:18 AM   #294
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
Quote:
Originally Posted by yancek View Post
The update-grub on Ubuntu and derivatives is just one line which runs grub-mkconfig which you can see below. If you look at the file on your Ubuntu, you will see that. You could just create a link to run it if you are more familiar with that.

Code:
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
Quote:
Originally Posted by chrisretusn View Post
Just my opinion, not a fan of this, not really needed. What Pat decides, I am good with. It's not like I really have any choice.
Well, it's not really so nice.. Anyhow, there is something similar for Slackware currently, for Lilo, so to say, which is the bootloader setup.. If Slackware drops Lilo and goes with Grub, I'm pretty sure the Lilo bootloader setup will be removed, and maybe even be replaced with something similar for Grub. Several of these little bits of the installer have their separate invocation outside the installer, like netconfig.

Last edited by zeebra; 01-04-2024 at 07:23 AM.
 
  


Reply

Tags
grub, grub2



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
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM

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

All times are GMT -5. The time now is 10:58 AM.

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