grub bis (grub-pc and grub 2)

Thierry de Coulon tcoulon at decoulon.ch
Fri Nov 19 10:40:36 UTC 2010


On Friday 19 November 2010 08:13:11 am Goh Lip wrote:
> On Friday 19,November,2010 01:51 PM, Thierry de Coulon wrote:
> > While I'm on the grub subject...
> >
> > My main machine (desktop) had several Linux installs. Ubuntu installed
> > grub 2. I could then apt-get remove it,
>
> How? "sudo apt-get remove <what?>"

apt-get remove grub2  (I did not use sudo as I was root)

> > apt-get-install grub, etc...
>
> How? "sudo apt-get install grub" ?

yep

> > My laptop only has one Ubuntu installed. When I wanted to remove grub 2,
>
> Again how? "sudo apt-get remove <what?>"

apt-get remove grub2 ; I tries autoremove but it would remove a bunch of other 
thiings and I still have to investigate why, so I canceled.

> > it said there was no grub 2 installed. I found out "grub-pc" was
> > installed. if I try to remove it, it automatically wants to install grub
> > legacy... but there is no stage 1... so I tried to ramove grub-legacy to
> > reinstall it... and then the system want's to reinstall grub-pc.
>
> That's to prevent you from not having any bootloader at all, so should
> be a good thing, right?

yes and no. I like somone to warn me that I'll hurt myself but I don't like 
him to forbid me to hurt myself :) (yes, I understand the idea, but you get 
stuck in a loop...)


> package "grub" is grub-legacy 0.97
> package "grub-pc" is grub2 1.98
>
> This is so users won't confuse between the two.
>
> package "grub2" is 'non-existent' but is 'there' in case users tried to
> install 1.98 but doesn't know about 'grub-pc' as this shows...

Got it, but it does not explain (to me) why it worked on one computer and not 
on the other. I suppose it means that "autoremove" make removing grub2 remove 
grub-pc, but only remove tells you grub2 is not installed.


> If in grub-l, you said you'll modify fstab and menu.lst.
> Right, I assure you you can do the same in grub2. (but with grub.cfg)
> And in both cases whenever you've have 'update-grub' (new kernel or
> whatever), it will create new menu.lst or grub.cfg but with the correct
> parameters, ie., if the device map is correct (which won't be, again for
> both cases, unless there's new version of grub to install)
> To create correct device map, you've to "sudo grub-mkdevicemap" (again
> for both case, hmmm, it's getting tiresome).

Ha! That's what I was looking for - never heard of this command before, I did 
not even know that grub used a device map. I changed menu.lst by hand and 
replaced th UUIDs with /dev/sdx because it's easier to read.

> A better way (both cases) [if you copy your partitions, that is], is not
> to modify menu.lst or grub.cfg but to
> sudo grub-mkdevicemap
> sudo update-grub
>
> So, I hope this gives you a clearer picture and hope you understand why
> sometimes when somebody says grub-l is better than grub2, some of us
> don't really feel like replying. (it's tiresome)

Thanks for the clearer picture. I'd suggest to find some place to put your 
explanation (at the start of the elp.ubuntu.com/community/Grub2 page, for 
example). If I had found it there, I would not have had to ask here in the 
first place.

Besides, I did _not_ say that grub-l is better than grub2, I said it should be 
better documented so that average users that do poke with their system 
understand what is to be done. I've searched the page for "grub-mkdevicemap", 
and there is nothing...

> > Which brings again the question if users, at least in an alternate
> > install, should not be able to choose at install time which bootloader
> > they want.
>
> I should hope not, otherwise I'll insist they include LILO as well.

Why not?

Thierry





More information about the ubuntu-users mailing list