Why installing GRUB into a partition is a BAD idea?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Why installing GRUB into a partition is a BAD idea?
Hello guys! Using Ubuntu which comes with grub 1.97~beta4:
root@voyager:~# grub-install /dev/sda7
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
As you can see, the installation goes well, but, why installing grub into a partition instead of MBR is a bad idea?
I like to have many distros on my computer, and each one comes with their own menu.lst parameters, which also can change during updates. So it's much more pratical to create an empty partition of 64MB or less, create a /boot/grub there, install into MBR and then chainload into the other partitions.
So if I mess up with any distro, my mbr is still intact. And also if the parameters of grub setup required for a distro changes with any updates on the distro, they keep updated.
So for me it is not pratical to have one distro installed on MBR controlling the other ones, having to constantly change my menu.lst
But why does the program think it is not a good idea? What are the risks of installing GRUB into a partition instead of MBR? Why is this message displayed?
Thanks in advance for anyone who knows.
Edit: Maybe the question goes for why blocklists are unreliable or something like that?
Last edited by icmp_request; 01-26-2010 at 05:57 PM.
I would guess that the program is simply saying: "putting GRUB on a partition is a bad idea if you don't know what you are doing." You obviously KNOW what you are doing, so worrying about this may not be necessary.....
I understand... actually the warning message that has made me doubt I was doing a good thing was "grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged." I have absolutely NO IDEA what it means but it *seemed* to be related to why installing GRUB in a root partition is a bad idea.
But if you say it may only be an "anti-newbie" warning, I believe.
Anyways, I didn't know that Ubuntu was using this still testing version of GRUB, that should explain the amout of weird files I've found on /boot/grub instead of just stage1, stage1_5, etc.
I remember that the first time I tried installing Arch I installed GRUB in the root partition (thinking that's where it's supposed to be, I hardly know anything about bootloaders), and so the whole installation went for nothing.
Ok, I just hope we're right and I don't find the "hard way" that installing grub into a partition and not MBR could entirely corrupt that partition... lol
As implied above, this is a grub2 issue only - not classic grub (aka grub1).
It is because of the structure of the core.img - this also requires a separate partition if gpt for similar reasons.
It is conceivably possible to screw up your boot if core.img gets moved at some point in the future. I've installed grub2 into the boot sector record several times without incident.
Your partition itself (and the data) is not in danger.
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,439
Rep:
Quote:
Originally Posted by syg00
...this is a grub2 issue only...
No it isn't. Specifically the OP asked "...why installing grub into a partition instead of MBR is a bad idea?" In answer of that I posted the above link.
The only problem I have had using grub2 in a separate partition to chainload is the device mapping of legacy distros. I have one IDE and one Sata drive. The Sata boots first, IDE second and grub 2 label them sda and sdb. For some reason three of the grub legacy list the device mapping is opposite. No problem to change, just a pain to find the problem the first time.
Last edited by Larry Webb; 03-01-2011 at 08:30 AM.
The OP asked the question badly. grub1 doesn't issue that (or similar) message, nor does it have any issue with being installed into the boot sector record.
This is a grub2 problem - only.
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,439
Rep:
@syg00 Please clarify: Is this a problem of GRUB2 chainloading legacy GRUB? I don't use GRUB2 (yet) so I'm not familiar with "core.img" though I read up on it here: http://www.gnu.org/software/grub/man...de/Images.html. It is beyond me, though, why the developers chose a deployment which can be rendered unusable by the file system (again, if I understood correctly ).
Last edited by JZL240I-U; 03-02-2011 at 03:19 AM.
Reason: naming the adressee of my question
I'm sorry, the question was not really "Why installing GRUB into a partition instead of MBR is a BAD idea?" but "Why did GRUB2 say that installing GRUB into a partition instead of MBR is a BAD idea?" As it seemed to be just an anti-newbie question only, I disregarded since the last of last year's replies and had no problem until now. Actually what most scared me was "Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged" Hadn't and still haven't any idea about what it means, but this also seemed to give me no problem.
I also hadn't any problem about GRUB1 on MBR chainloading into GRUB2 and GRUB2 on MBR chainloading into GRUB1... =)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.