When and why do we need grub bootloader on Linux!?

dhubs

Active Member
Joined
Nov 5, 2024
Messages
135
Reaction score
68
Credits
2,225
good day dear friends, :cool:
hello everyone,


When I stated using Linux in the late 2011, I was urged to never use LILO and always install Grub and then Grub2.
note: i used OpenSuse for some years. And i was happy with it!

Now using all kinds of hardware - and yes: sometimes i use old Notebooks like Thinkpad T420 and T 520 with 4 Gigs of RAM.
Note i love those Thinkpads - they are robust and undestroyable.

Back to the GRUB-Question: When and why do we need grub bootloader?

why do you use Grub - i do not know much about Grub - and yes: i am sure that all i know and write here
is biased or probably incorrect so feel free to dissuade me.

Why should /could we use GRUB?
hmmm - in my humble opinion: It was developed primarily for multibooting purposes when there was no UEFI yet.
but - hmmm - dont we have more - for example with UEFI and we can multiboot without additional layers of complexity.

I would love to hear your comments.

best regards:)
 


GRand Unified Bootloader, if you run more than one OS this is what gives you the ability to choose which at startup
 
good day dear friends, :cool:
hello everyone,


When I stated using Linux in the late 2011, I was urged to never use LILO and always install Grub and then Grub2.
note: i used OpenSuse for some years. And i was happy with it!

Now using all kinds of hardware - and yes: sometimes i use old Notebooks like Thinkpad T420 and T 520 with 4 Gigs of RAM.
Note i love those Thinkpads - they are robust and undestroyable.

Back to the GRUB-Question: When and why do we need grub bootloader?

why do you use Grub - i do not know much about Grub - and yes: i am sure that all i know and write here
is biased or probably incorrect so feel free to dissuade me.

Why should /could we use GRUB?
hmmm - in my humble opinion: It was developed primarily for multibooting purposes when there was no UEFI yet.
but - hmmm - dont we have more - for example with UEFI and we can multiboot without additional layers of complexity.

I would love to hear your comments.

best regards:)
A few observations:

Essentially the reason that distros came to use grub was because it had more advanced features than the previously popular bootloader which was LILO. That's just a common reason why one software displaces another.

LILO had significant limitations compared to grub which included that it couldn't read filesystems, wasn't interactive, was restricted to MBR installations, had no automatic detection of new kernels and had to be re-configured and have its executable run for each new kernel. Grub solved all those shortcomings. It is more complex, but it's that complexity that offers the user far more options, more convenience and more flexibility.

Grub is largely used because of its great configurability for a great multitude of circumstances. Its all described in the grub manual which is more than 150 pages. Grub is major software in the linux world as is evident from it's widespread use.

Nevertheless, there are other bootloaders but they have have fewer facilities. For example systemd-boot, syslinux and the EFI stub bootloader. There are more, some specialised for embedded systems.

Bear in mind that the linux kernel needs a bootloader to actually start it running and provide the user with a usable operating system. For so many distro releases, grub is the usual choice of bootloader specifically because of the wide range of capabilities it offers. Different users can each configure it to fulfil their own particular requirements.

For many users the bootloader just works and they have no need or interest in it so long as it's booting the system, which grub does reliably. Notwithstanding that, linux allows such users to change to a simpler and less resource hungry bootloader. With modern machines with higher specs though it may not make any noticeable difference.
 
Last edited:
@dhubs :-

Yeah, you do NEED a bootloader of some kind. Even on a single OS set-up - where by default you don't usually even SEE the bootloader menu - there's a boot-loader of some kind present.

If not GRUB/GRUB2, then syslinux.....or isolinux (this is usually present on most ISOs for 'live' booting).....there's also LILO (see above in Osprey's post), Grub4DOS (we've used this for years in Puppy), or there's Limine. PLOP I'm not sure about; does this boot direct, or does it chain-load across to some other bootloader? :confused:


Mike. ;)
 
I've found that grub2 is hands down the easiest I've tried so far -for the way I use it-. It may be just because I've invested more time into it but, of the several different boot loaders I've used to start up linux (lilo, the syslinux family, grub4dos, grub "legacy", grub2 and maybe others that I've forgotten about), grub2 fits my MO best.

I use it to multi boot different operating systems (usually different versions of Tiny Core, with a few other outliers thrown in) and to boot either BIOS machines or UEFI machines from the same USB media. Of course, every such multi-OS installation starts out as as single-OS install, but I've generalized the grub config menu entries to make it just dead simple to drop in an additional OS. In its config file, grub2 supports scripting syntax very much like shell scripting. I don't use the various grub utilities, except grub-install, to "manage" grub - I use a plain old text editor to write and update grub.cfg - so the ease of updating grub.cfg is important to me.

grub4dos offered sufficient capability like that but suffered from that "...4dos" idiom - its variable names being used with DOS batch file syntax ( "%SOMEVARIABLE%" instead of "$somevariable" ) which is just annoying unless you're only using it to boot DOS, which ...just no.
 
There's also 'systemd-boot' that's rolling down the pipes. I expect the major distros to adopt it in short order, though I don't yet know much about it. I know it works with UEFI but so does GRUB. I'm not sure if it works with legacy boot.

If it doesn't work with legacy boot, that'll likely slow down adoption rates. Quite a few folks have supported systems that still use legacy boot without UEFI available, though that group of people is getting smaller as time passes and they upgrade to newer devices.

I'd guestimate that most users have UEFI available just due to how frequently the average person upgrades their hardware and because UEFI. (Development started way back in the 90s but it wasn't really a thing until the standards were formalized in the mid-2000s.)
 


Follow Linux.org

Members online


Top