Grub 2 in LXF 174

Comments, suggestions and questions about Linux Format magazine and the coverdiscs

Moderators: ChrisThornett, LXF moderators

Grub 2 in LXF 174

Postby Nuke » Tue Jul 16, 2013 10:14 pm

Must admit I'm a bit lost in Carl Fletcher's Grub 2 article [LXF 174].

He tells us how to install from a Ubuntu/Mint[DEB] distro, then how to install from a Suse/Fedora/[RPM] distro. Fair enough.

But then he says "where you have two .. distros installed, try switching from the one controlling Grub to the other"

Why? Once Grub 2 is installed it can boot either surely, it does not need to be "controlled" by the one you want to boot. Why does he go through a palava of "switching control" from Suse to Mint and then back again? Am I missing something here or is this just for fun ?

I also have a problem with the very concept of Grub being "controlled" by any one distro. I think/thought a boot manager should be OS neutral, especially if it is in the MBR. While, clearly, Grub needs to be installed by one distro or another, after that it should be independent surely?

FWIW, my boot manager is Smart Boot Manager [SBM] in the MBR, and it is this neutral SBM that gives me my choice of OS. To boot a Linux distro it hands over to a Grub [1] in the Boot Sector of that distro's partition which immediately boots it. So I have several Grubs (and a Windows bootloader - and a DOS bootloader believe it or not) around my drives. Come to think of it, those Grubs do have graphical backgrounds appropriate to that distro but I do not mind that because they are exclusively for that distro and in its partition.
Unsolved mysteries of the Universe, No 13 :-
How many remakes of Anna Karenina does the World need?
User avatar
Nuke
LXF regular
 
Posts: 217
Joined: Wed Feb 09, 2011 12:11 pm
Location: Chepstow, UK

Re: Grub 2 in LXF 174

Postby caf4926 » Sat Jul 20, 2013 9:48 am

Nuke wrote:Must admit I'm a bit lost in Carl Fletcher's Grub 2 article [LXF 174].

He tells us how to install from a Ubuntu/Mint[DEB] distro, then how to install from a Suse/Fedora/[RPM] distro. Fair enough.

But then he says "where you have two .. distros installed, try switching from the one controlling Grub to the other"

Why? Once Grub 2 is installed it can boot either surely, it does not need to be "controlled" by the one you want to boot. Why does he go through a palava of "switching control" from Suse to Mint and then back again? Am I missing something here or is this just for fun ?

I also have a problem with the very concept of Grub being "controlled" by any one distro. I think/thought a boot manager should be OS neutral, especially if it is in the MBR. While, clearly, Grub needs to be installed by one distro or another, after that it should be independent surely?

FWIW, my boot manager is Smart Boot Manager [SBM] in the MBR, and it is this neutral SBM that gives me my choice of OS. To boot a Linux distro it hands over to a Grub [1] in the Boot Sector of that distro's partition which immediately boots it. So I have several Grubs (and a Windows bootloader - and a DOS bootloader believe it or not) around my drives. Come to think of it, those Grubs do have graphical backgrounds appropriate to that distro but I do not mind that because they are exclusively for that distro and in its partition.

FYI I wrote that

It's just a project.

You are correct that once grub is installed by say Ubuntu it will boot Ubuntu and any other OS's installed (Linux or Windows), that's the idea any way. In practice, it doesn't always work out that way.

You ask why all the switching?
It's just to illustrate the practice. You would be surprised how often we get people asking in the forums..."I just installed Ubuntu to try it.. but I want my XXXX grub back, it's way prettier than Ubuntu's" OR
A user test another distro, planning to use it, but finds it doesn't meet up to expectations, he may want to switch grub back to his other distro etc..

I also have a problem with the very concept of Grub being "controlled" by any one distro. I think/thought a boot manager should be OS neutral, especially if it is in the MBR.
Unfortunately it doesn't work that way - at least not at a standard user level. But it is true, technically you can edit any grub menu at boot to do whatever you edit in, assuming the boot option exists and you edit it in correctly, it will boot.

But when a distro is installed and allowed to write grub, as a generalization, it does take control of booting/grub.
CAF4926
User avatar
caf4926
 
Posts: 40
Joined: Mon Dec 26, 2005 6:28 am
Location: The English Lake District

Postby PCNetSpec » Sat Jul 20, 2013 11:20 am

Only *part* (stage 1) of GRUB is installed to the master boot record.

the other parts (stages) are in /boot

Think of /boot/grub/grub.cfg .. only the the changes made in "one" distros /etc/default/grub are going to be applied to it .. the one you run "update-grub" from.
WARNING: You are logged into reality as 'root'... logging in as 'insane' is the only safe option.
Linux in the UK
The Linux Community Forum
User avatar
PCNetSpec
LXF regular
 
Posts: 631
Joined: Sun Feb 21, 2010 3:50 pm
Location: Cornwall UK

Postby caf4926 » Sat Jul 20, 2013 4:38 pm

PCNetSpec wrote:Only *part* (stage 1) of GRUB is installed to the master boot record.

the other parts (stages) are in /boot

Think of /boot/grub/grub.cfg .. only the the changes made in "one" distros /etc/default/grub are going to be applied to it .. the one you run "update-grub" from.


Absolutely correct
CAF4926
User avatar
caf4926
 
Posts: 40
Joined: Mon Dec 26, 2005 6:28 am
Location: The English Lake District


Return to Magazine and coverdiscs

Who is online

Users browsing this forum: No registered users and 1 guest