help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting rid of 'recovery' entries when generating grub's menu


From: Chris Jones
Subject: Re: Getting rid of 'recovery' entries when generating grub's menu
Date: Mon, 09 Apr 2012 05:02:59 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Apr 09, 2012 at 03:03:03AM EDT, Jordan Uggla wrote:
> On Sun, Apr 8, 2012 at 10:08 PM, Chris Jones <address@hidden> wrote:

[..]

> > Interestingly, this only appears to be a problem with Ubuntu and
> > derivates like Mint, not with debian.
> 
> More accurately, GRUB_DISABLE_RECOVERY only affects entries generated
> by /etc/grub.d/10_linux . GNU/Linux entries from
> /etc/grub.d/30_os-prober depend on output from linux-boot-prober,
> which gets its information from many sources, though mostly from
> existing bootloader configuration files. In other words, Debian's
> entries for Ubuntu include recovery mode entries because Ubuntu's own
> grub.cfg includes these entries. If you have
> GRUB_DISABLE_RECOVERY=true in /etc/default/grub in Ubuntu, re-run
> update-grub/grub-mkconfig in Ubuntu, then re-run
> update-grub/grub-mkconfig in Debian, the recovery entries will go
> away. I will update the documentation on GRUB_DISABLE_RECOVERY in the
> grub manual to make this more clear.

Correct. Thanks for confirming what I was guessing at...

The difference is that debian does not generate a grub.cfg at install
time if you don't ask him to but apparenty Ubuntu and derivates cannot
leave well alone and create one even if you have no need for grub on
such systems.

But if something needs to be stressed, it is that you should _never_
trust what's detected/generated by OS-prober except perhaps for the
simplest of Windows+linux dual-boot configurations.

I've had problems with 30_os-prober picking up crap in the past e.g.
after partitions got renumbered and the grub.cfg's on those partitions
had long fallen into disrepair, so I have no excuse.. I guess I just got
lazy. :-(

As far as I am concerned the only sensible approach is to initially let
30_os-prober generate a template, copy the generated entries in grub.cfg
to a xx_custom file in /etc/grub.d, edit them to one's liking, checking
each entry is valid (also a good time to remove whatever ‘recovery’
stuff is in there if so desired), disable 30_os-prober, and re-run
grub-update to create the final grub.cfg.

Quite a bit of an effort at first, but it's a sound investment, because
after that, adding/removing linux systems by editing the xx_custom file
is painless.

In any case, thank you very much for the time you spent clarifying these
aspects.

CJ

-- 
Hi! My name is bobby...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]