LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-26-2010, 05:53 PM   #1
icmp_request
Member
 
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54

Rep: Reputation: 15
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.
 
Old 01-27-2010, 01:14 AM   #2
DanceMan
Member
 
Registered: Mar 2009
Location: Vancouver BC
Posts: 148

Rep: Reputation: 22
Saikee is the grub master. Either this thread or this one should have your answers. If not post him a question.
 
Old 01-27-2010, 07:53 AM   #3
icmp_request
Member
 
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks DanceMan, I didn't find it on the threads put I'll PM him about this post.
 
Old 01-27-2010, 07:57 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,439

Rep: Reputation: Disabled
Ubuntu uses GRUB2 as opposed to GRUB-legacy . There are some subtle and some not so subtle incompatibilities. Read e.g. this:

http://www.dedoimedo.com/computers/grub-2.html
http://ubuntuforums.org/printthread.php?t=1195275
 
Old 01-27-2010, 08:01 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,807

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
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.....
 
Old 01-27-2010, 08:20 AM   #6
icmp_request
Member
 
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54

Original Poster
Rep: Reputation: 15
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.

Thanks for the replies! =)
 
Old 01-27-2010, 08:32 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
It's probably an "anti-newbie" warning.

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.
 
Old 01-29-2010, 10:12 AM   #8
icmp_request
Member
 
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54

Original Poster
Rep: Reputation: 15
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

Thanks for the replies and the attention guys! =)
 
Old 03-01-2011, 02:03 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,439

Rep: Reputation: Disabled
In case the subject is still of interest for you, here is a nifty way and explanation, when and why to place GRUB in the root partition: http://www.justlinux.com/forum/showthread.php?t=147959. Cheers.
 
Old 03-01-2011, 06:33 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,580

Rep: Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504
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.
 
Old 03-01-2011, 06:36 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,439

Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
...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.
 
Old 03-01-2011, 08:29 AM   #12
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
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.
 
Old 03-01-2011, 09:00 AM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,580

Rep: Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504Reputation: 3504
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.
 
Old 03-02-2011, 01:47 AM   #14
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,439

Rep: Reputation: Disabled
@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
 
Old 03-02-2011, 03:06 AM   #15
icmp_request
Member
 
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54

Original Poster
Rep: Reputation: 15
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... =)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad partition after installing Ubuntu over Vista cadiolis Linux - General 3 02-26-2008 02:46 AM
Good idea/bad idea: interface colors introuble General 5 10-30-2006 01:33 PM
Installing older gcc. Bad idea? Surg Debian 1 11-14-2005 10:53 AM
Bad Idea dudeman41465 Linux - Software 1 10-10-2005 02:37 AM
Installing Debian via Knoppix HD install, bad idea??? shermang Debian 3 09-01-2003 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:16 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