Forum › Forums › New users › New Users and General Questions › GRUB – where should it be located.
- This topic has 18 replies, 6 voices, and was last updated Nov 28-12:22 pm by banned.
-
AuthorPosts
-
November 19, 2022 at 8:53 pm #93557Member
banned
Boot and Grub are above my pay grade and I have no experience.
So I floundered about when confronted with this during the last update.
Never seen this before…Is there something I should check as I believe you can have two or more versions in different partitions?
Attachments:
November 19, 2022 at 8:59 pm #93560Moderator
Brian Masinick
::I typically install GRUB to all of the selections – but I am NOT a “typical user”.
You may select all but selecting the first option will probably suffice, especially if there are no other systems to boot on the same hardware.
However, if you want to learn more about Grub, here’s what I have bookmarked:
https://www.gnu.org/software/grub/manual/grub/grub.html
--
Brian MasinickNovember 20, 2022 at 12:18 am #93564Forum Admin
dolphin_oracle
::so it looks like your grub is installed to the master boot record, or mbr, of the device. in that case, grub goes to /dev/sda.
If you installed it at all offerred locations it would be safe but overkill. its a good choice if you don’t know what else to do.
November 20, 2022 at 12:11 pm #93568Memberbanned
::Wo Brian and admin, what a document – astounded that someone wrote this up, checked it for errors, and then published it. Mind-boggling 🙂 Yet at the same time somewhat typical of GNU specialists with a brain the size of a small planet 🙂 (Marvin the Paranoid Android)
Thought you and I were fanatical about AntiX but this guy Gordon Matzigkeit has to be tamed by others – Quote: “We, the GRUB maintainers, do not (usually) encourage Gordon’s level of fanaticism, but it helps to remember that boot loaders deserve recognition. We hope that you enjoy using GNU GRUB as much as we did writing it.” Phew 🙂
Yet when you look at the foundations or building blocks it is so, so simple as MSDOS – (fd0) (hd0,msdos2) (hd1,msdos1,bsd1) set root=(… etc
Took me back years to being forced to learn dos during Margaret Thatcher’s recession.
Managed to write a simple question and answer game – true or false… question type in Greek (Hellas) currency – Drachmas = true, Euro = false 🙂 etc.
If my 72 year old brain can take it; I will have to read deeper to find the command to display what version and where, as I have read somewhere that placing it everywhere can cause conflicts in some circumstances. Think it was some Debian web page or document…?
Thanks guys – appreciate your time 🙂
Edit: just found this again – see attachment – is it the latest but still do not know where it is. Duh
- This reply was modified 5 months, 2 weeks ago by banned.
- This reply was modified 5 months, 2 weeks ago by banned.
- This reply was modified 5 months, 2 weeks ago by banned.
Attachments:
November 20, 2022 at 1:43 pm #93580Moderator
Brian Masinick
::Grub 2 was a major improvement in some ways compared to the previous version, which never quite made it to Version 1.
There are some consequences to the design however. 1) it’s over complicated and pretty complex. 2) you have to use a specific configuration to get it to work.
On the other hand it recognizes many diverse operating systems and yes, it recognizes Windows, Linux, UNIX, BSD and others.
There are other boot loaders available.
A search of “boot loader” will provide quite a lot of information.--
Brian MasinickNovember 20, 2022 at 2:17 pm #93588Memberolsztyn
::There are some consequences to the design however. 1) it’s over complicated and pretty complex. 2) you have to use a specific configuration to get it to work.
IMHO grub2 is an artificially complicated kludge. Most that complexity is to obfuscate design and boot process. I avoid using Grub as much as possible. If I boot antiX from hdd, it is using syslinux/extlinux. However if you have multiple different systems and Windows it became hard to avoid Grub monopoly…
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersNovember 20, 2022 at 2:34 pm #93589MemberKempelen
::Most likely the good choice is “/dev/sda”
If you think of it as steps of the boot process:
1. When your PC starts, it tries to boot from various drives and devices (hard disks, USB, DVD, etc). The order in which it tries devices, is specified in the BIOS settings. (I hope you know what I mean by BIOS settings.)
2. When it finds a boot loader in the specified devices, it starts it. (The first it finds.)
3. That “boot loader” offers you to choose operating system and starts loading them.
There MUST BE a boot loader in the drive to be able to start. So that /dev/sda MUST have a boot loader (GRUB). If AntiX is your only OS, then the answer is obvious.
That places very small part of GRUB in the drive’s beginning, but it also instructs that “small part” where the “rest of the parts” are to be found. (That is /boot, /boot/grub folder on one of your partitions.) If all right, it will start. These extra parts are required for it to be operational. (E.g. even the menu items list is there.)
Now, if someone chooses to install GRUB on a partition instead of a drive (e.g. /dev/sda1 – that is a PARTITION on /dev/sda DRIVE), there must be another loader on the DRIVE ITSELF too (or one of the drives), that “chain loads” the loader on the partition – this is quite advanced setup. And the PC itself does not load boot loaders from the “partitions” (e.g. sda1), just the “drives” (e.g. sda)!
I have 3 different Linuxes, I allow only one of them to write to the first drive’s “boot record” (/dev/sda). But Linux systems are good in finding other operating systems on the PC and add it to their menu. So AntiX works totally OK for me without even installing GRUB from AntiX anywhere.
(However since I have 3 drives in this PC, and 3 Linuxes, one on each drive, I always choose to install the drive’s own Linux’s GRUB on the drive’s “boot record”. So if something fails with my “sda”, I can still choose the other drive in the “BIOS” – and start at least some of the Linuxes. But probably those menus (on sdb, sdc, that I never see) also contain the other Linuxes, because GRUB adds them to the menu.) And I almost never install a boot loader on a partition (e.g. sda1, sda2, sdb1, sdb2) because that would require that another boot loader from the device itself loads the loader on the partition.
I hope that makes it easier to understand.
Your device, /dev/dm-0 is probably a frugal install (is it? I didn’t try that yet, or software raid or other special volume). But that’s a mapped device, so the grub software must be outside of it to even start using it! That’s why you have a /boot partition, to access grub extra parts before anything else.
Regarding Grub documentation: you need that only if the computer does not start and you are faced with a “grub>” or “grub-rescue>” prompt instead of normal startup. So I printed a shorter cheat-sheet version of that, so that I can do basic operations in both “grub>” and “grub-rescue>”. (Grub-rescue is when it cannot even find those “additional parts”.) I hope you won’t see these right after following my answer. 😉
November 20, 2022 at 2:50 pm #93590Moderator
Brian Masinick
::Nice explanation, and I agree with your comments.
GRUB, especially the current implementation of it, is quite complicated; unless you know what you are doing, following the explanation immediately above is the way to go.
(Incidentally, if you do happen to read any of that GRUB documentation, you’ll see that for “ordinary circumstances”, what has been clearly explained above, step by step, is also their simple recommendation for the default handling of their boot loader).--
Brian MasinickNovember 20, 2022 at 2:51 pm #93591Memberolsztyn
::I hope that makes it easier to understand.
Thank you for such informative write-up on Grub…
Just to add, antiX in itself (Live only) has a built-in capability to discover bootloaders, Grub menus and Windows bootloaders (so to discover all installed systems) and to select any of such Linux or Windows systems for booting. This is buried under grub Rescue menus on the initial boot screen… This works even if Grub is not installed to MBR on any disk or is corrupted…Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersNovember 20, 2022 at 3:02 pm #93592Moderator
Brian Masinick
::@olsztyn: Yes, syslinux is one of the other simple boot loaders. If you’re using only one system, that is an arguably lighter way to handle system startup.
lilo is one of the other early boot loaders; I believe I used lilo on the very first (or one of the first) distributions I used.If you want to read about a variety of boot loaders, https://www.ubuntupit.com/best-linux-bootloader-for-home-and-embedded-systems/ has an article that describes quite a few different alternatives; refind is one that some people use.
As I had suggested earlier, I ran a simple search “Linux boot loaders” and found more than enough articles (with different opinions) on boot loaders, the “best” boot loader, etc.
The link above was one reference.https://www.tecmint.com/best-linux-boot-loaders/
https://www.techrepublic.com/article/introduction-to-linux-boot-loaders/
https://www.oreilly.com/library/view/linux-fundamentals-2nd/9781284254891/xhtml/9781284254884_CH04_03.xhtml
https://www.terabyteunlimited.com/kb/kb-articles/how-to-use-linux-boot-loaders-with-bootit-bm/are a few other links; notice the different opinions, though most of the articles at least mention a few of the most common boot loaders.
There are more articles if you care to search and read; this ought to be more than enough. The casual user will just use whatever is included in their distribution.--
Brian MasinickNovember 20, 2022 at 5:15 pm #93598Memberolsztyn
::a few different alternatives; refind is one that some people use.
Thanks for the links. Problem IMO is that the choice of boot loader is taken out of hands of vast majority of users, Grub being imposed by default in almost every Linux distro. No choice provided. Even antiX being traditionally installed uses Grub as boot loader. However antiX Live is using syslinux, even if installed on hdd.
Subsequent to forced on users installation of Grub as boot loader for typical Linux, users find it hard to justify the effort to perform a change to another boot loader, considering steep learning curve and difficulty.This situation is analogous to systemd, which has taken over a vast majority of Linux distros, where systemd is designed to become a irreplaceable dependency of most Linux distros. If you want a Linux systemd-free you can only start from the beginning to architect and then maintain your systems to keep it systemd-free on continual basis.
Such design imposed on Linux is like a virus, for the lack of another word to describe it.If Linux is to be considered as providing free choices it should not let itself to be taken over and managed by such viruses. However in reality most distros quietly and obediently accept hegemony with just a few dissenting…
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersNovember 20, 2022 at 6:27 pm #93600Moderator
Brian Masinick
::@olsztyn: Everything you say is absolutely true. You’re also right about changing the boot loader; for most people, that’s not something they even think about.
Notice, as you did, that antiX does use syslinux on live boot. As we are installing antiX, the “astute” observer, while this might be a challenge or not even possible to some, nevertheless has the option and alternative to install other boot loaders, either at installation time, by adding additional packages instead of simply accepting every default.
Also, for most distro makers, I can understand their choice of using the de facto default; though, like systemd, it complicates and adds hidden binary logic to many of the operations underneath, it does also provide a very good overall hardware support, ONE of the reasons it was redesigned.
So while I share many of the same concerns you do, AND I wasn’t particularly happy when it was released; I HAD been looking forward to GRUB 2 back in time until I saw the actual implementation, same with systemd.
The one positive take away from both of those over complicated rewrites is that in both cases, thanks to freely available software, we not only have other options, we actually have several of them. So for the true software enthusiast, we CAN (and DO) make other choices. It’s the uninformed people who consistently get stuck with only the de facto choices.
That said, I use GRUB 2 probably 75-80% of the time, but I do also have access to lilo, syslinux, and refind in addition to GRUB, plus, though I’ve not done a deep dive into it, there’s a Linux alternative to GRUB – reverse the letters in typical UNIX/Linux punster way and try out BURG!
--
Brian MasinickNovember 20, 2022 at 6:39 pm #93601Moderator
Brian Masinick
::Alternative to GRUB: lilo, syslinux, rEFind, BOOTMGR, Syslinux, iBoot — there are probably more than that!
Alternatives to systemd: runit, SysVinit, Upstart, s6, OpenRC, Dinit — again, there are probably more!So even though “free software” tends to converge to only a couple of methods, as long as source code is freely available, and lacking that, as long as a couple of binary alternatives are offered, we’re not stuck with anything. I love what we provide by default in antiX; nevertheless, I frequently change things, either to experiment or to fine tune specific features to meet specific capabilities, interests, or things I want to test; we provide that flexibility, and that makes me very happy.
So while we can grieve the fact that default choices tend to vary only slightly, the reality is that we have more choices in software – more commercially available choices and considerably more free choices than we’ve had at any time in the history of computer software. The number of choices since I first used a computer in 1972 are so much more expansive (with numerous more FREE choices), that I have nothing to complain about, because I can always find what I want, and it is RARELY the status quo!
--
Brian MasinickNovember 20, 2022 at 7:20 pm #93602Memberseaken64
::Hi @Andy,
Yes, that Grub update notice can be difficult to manage when you see it for the first time. It comes from Debian, not from the antiX team.
You’ve already been helped with the selection. I either choose the first line, or the partition line on which my antiX is installed, depending on whether my antiX install I am currently upgrading (and for which this cryptic Grub upgrade notice is being generated) is the controlling, or only, operating system on my drive. If my antiX is NOT in control of my boot laoder anyway, being a multi-boot where MX is in control, then I choose the Partition entry, or nothing. If my antiX IS in control of my boot loader then I choose the first line (the boot drive).
My suggestion for everybody is to keep your Live USB, or Live CD/DVD, handy. If something goes wrong with the Debian Grub upgrade then you can use your Live USB to run Boot Repair to get things back to normal.
This decision is easiest when antiX is your only installed OS on the drive. Just choose the first line every time. It becomes a harder decision when you have more than one OS in a multi-boot setup.
This is one of the reasons for the Boot Repair feature of antiX.
The antiX Live USB boot menu also has a Switch to Grub choice. If you drill down on that you can get to a recovery routine. That will find your OS files and allow you boot into it. After you are in you can run Boot Repair on the hard drive. Very cool to have this on the Live USB. I used to use a Grub recovery CD named Super Grub 2. Now I just use antiX Live USB.
Seaken64
November 20, 2022 at 7:29 pm #93603Moderator
Brian Masinick
::@seaken64: Excellent analysis, and also mention of the Super Grub 2 recovery tool. Yes, it’s handy, but I love your comment, and I’ve recently noticed the exact same feature and I’ve used it more than once to either reset or fix the boot loader.
I’ve been alternating between a few systems on my current system to manage the boot loader and I’ve found that they have all been capable of doing the job.
PCLinuxOS and openSUSE have had a tendency to take over loading their boot instance whenever the boot loader is updated; I had been using antiX exclusively, and also using antiX boot repair. MX Linux has the same features, so I’m giving them a run for a while and I’ll evaluate if they’re as good as antiX is at managing and recovering the boot loader. From what I can see, both use very similar, possibly identical tools for this purpose.
Also, glad to see you here again! Welcome back!
--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.


