LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how to control what OS are available at grub menu ? (https://www.linuxquestions.org/questions/ubuntu-63/how-to-control-what-os-are-available-at-grub-menu-766188/)

marozsas 11-02-2009 05:37 AM

how to control what OS are available at grub menu ?
 
Hi !

I am a seasoned linux user (fedora/rh/opensuse mainly) and this is my first time with ubuntu 9.10. I am loving it.

My home machine has a lot of disk and OS installed. Winxp 32 and 64 bits, fedora 10 and 11 (32 and 64 bits) and now ubuntu.

Looks like the new grub2 search for systems on the fly. There is not a menu.lst anymore.

But the boot menu is a mess. I want to limit the boot systems to just a few (maybe just two). I don't want to remove the old systems because eventually I can use of of them to test something (after all, this is the main raeson to have a big disk an several os installed)

I installed startup manager but it does not deal with the menu entries, just set the delay time, themes, boot splash, etc...

how to control what OS are available at grub menu ?

merchtemeagle 11-02-2009 07:10 AM

http://ubuntuforums.org/showthread.php?t=1195275

Quote:

No ''/boot/grub/menu.lst''. It has been replaced by ''/boot/grub/grub.cfg''.

marozsas 11-02-2009 08:05 AM

Quote:

Originally Posted by http://ubuntuforums.org/showthread.php?t=1195275
...but unlike Grub Legacy's menu.lst file, grub.cfg is not meant to be edited.

so, this doesn't help at all !

merchtemeagle 11-02-2009 08:07 AM

See chapters:
6. Adding Entries to Grub 2
7. Removing Entries from Grub 2

j1alu 11-02-2009 09:10 AM

mh, if i recall correct i used os-prober to add other OS. but i cant remember about any syntax and cant find info about it. Might be i ran a simple "os-prober" as root and thats it.

i also copied and pasted other grub-entries into:
/etc/grub.d/40_custom
where i could edit them in the usual way.

You need to run update-grub to make any changes take place.
i had to remove and re-install grub2 several times till it worked correct.

no, it aint big fun :-)
greetings

GTrax 11-02-2009 10:37 AM

Quote:

Originally Posted by merchtemeagle (Post 3741212)
See chapters:
6. Adding Entries to Grub 2
7. Removing Entries from Grub 2

Erm.. Chapters 6 and 7 of which?

Actually - I feel very much as marozsas does. I can fully understand that grub2 was thought up with the intentions of offering advantages, but it fails in some of its mission if it causes me to waste very long times in trying to discover its new ways, without borking working systems several times. I want and need to multi-boot. I should not have to be a Linux scripting expert to do it!

The fashion for burying desired user choices in complexity, to almost force users to give up and simply accept the one-click no-function default is beginning to get tiring.

grub.conf was simple, but could be made powerfully versatile if the user read the manual and invoked the commands.

menu.lst, so far as I can tell was only another name for grub.conf, with no other redeeming features (if I be unfair here - do tell)! Thus we have added symlinks left laying about in /boot/grub, so that menu.lst points to a grub.conf, and sometimes vice-versa.

Then - we were assailed by the Debian update work-around (in case the kernel changed), using special groupings of the comment signal symbol #, such as ### to do their thing without upsetting grub, which would simply see the lines as a comments.

Now we have a new game. Find your way to /etc/grub.d. The README is quite opaque to a user like me..
Code:

All executable files in this directory are processed in shell expansion order.

  00_*: Reserved for 00_header.
  10_*: Native boot entries.
  20_*: Third party apps (e.g. memtest86+).

The number namespace in-between is configurable by system installer and/or
administrator.  For example, you can add an entry to boot another OS as
01_otheros, 11_otheros, etc, depending on the position you want it to occupy in
the menu; and then adjust the default setting via /etc/default/grub.

The other files there are complex scripts, except for one. 40_custom is supposedly where a user adds menu entries. Nowhere can one see the boot order in a simple document, including how to set timeouts and saveboot options. I am unsure it is a Ubuntu thing, or a grub2 thing, or a bit of both.

This arrangement may be the dog's dangly bits (British colloquialism-forgive!) to the proud inventors, but I say, they just made us user's life harder. Truly, this is not just about unfamiliarity, or a reluctance to RTFM. The actual functionality has been reduced so far as users are concerned, even if it has been expanded (they say) for the experts.

I suppose I had better get to a question. So where is a kindly explanation, with maybe some examples, on what to do to multiboot?

merchtemeagle 11-02-2009 10:40 AM

Quote:

Originally Posted by GTrax (Post 3741374)
Erm.. Chapters 6 and 7 of which?

Of the guide on the Ubuntu forums I linked to in my previous post.

marozsas 11-02-2009 11:17 AM

Hi !

yes GTrax, grub2 auto-discovery function (/etc/grub.d/30_os-prober) is nice to auto-detect all OS installed and (/etc/grub.d/40_custom) gives me the ability to add more customization.

But it does not have a easy way (so far as I understand) to REMOVE some of those auto-discovered to create a simple 2 entry menu, so I agree with you on this.

Hey,merchtemeagle, thanks for pointing again the right place and sorry I didn't get there at first time, but I found on chapter 6 - "Building a Totally Customized Menu" a way to do what I want in 6 or 7 steps, (I guess it's the complexity GTrax was talking about)

Besides that, I am loving Ubuntu 9.10 ! I am a seasoned Fedora, RH and openSuSE sysadmin and I am impressed with the simplicity of several tasks in Ubuntu for the regular, non-technical user. I guess things like auto-discover OS is the right thing for the regular user.

This not so direct way to deal with the grub boot menu (no menu.lst anymore) is the price we have to pay to get some nice features to the regular user and put linux to the general public.

thanks !

mhbell 11-02-2009 11:32 AM

Quote:

Originally Posted by GTrax (Post 3741374)
Erm.. Chapters 6 and 7 of which?

I suppose I had better get to a question. So where is a kindly explanation, with maybe some examples, on what to do to multiboot?

I was having problems like you and was referred to the following links in another forum. You have to read read and read. I am no Linux or Grub Guru, but I find that the more you read up on Grub 2 the better you understand it. Below are some of the best links that I find give clear and simple explanations and examples.
Mel

This is one of the best: http://members.iinet.net/~herman546/p20.html

Links and info here: http://forums.scotsnewsletter.com/in...howtopic=29839

http://www.gnu.org/software/grub/grub-2.en.html

how to install Grub2: https://help.ubuntu.com/community/Grub2

GTrax 11-02-2009 12:06 PM

Quote:

Originally Posted by marozsas (Post 3741409)
But it does not have a easy way (so far as I understand) to REMOVE some of those auto-discovered to create a simple 2 entry menu, so I agree with you on this. !

Thanks guys - now I have the links. In this case, I am trying to REMOVE the choice to boot a 100GB partition with Windows 7, and a 40GB partition with a XP on it, and then deliver that space to a LVM2 volume. (Well.. it just seems kind of the right thing to do) :)

I am not so loyal to any distro, that there is never a risk I might someday adopt another. Most have a way of making the install happen, short of going also installing a grub - not necessarily grub2! The Ubuntu 9.10 install just speedily went ahead by itself. Maybe I was just too slow to spot the place where I had a choice

Reading .. RTFM .. :|


All times are GMT -5. The time now is 06:42 PM.