Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
In short - I don't quite know how to do it. I would like the user to see only the (2) OS boot choices suitable. ie. not to include every ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Location
    UK
    Posts
    33

    Removing GRUB 2 entries

    In short - I don't quite know how to do it.

    I would like the user to see only the (2) OS boot choices suitable. ie. not to include every previous abandoned kernel, and recovery options, and memory tests.

    I am thinking the GRUB 2 more functionality was achieved at the price of presenting a user with what I experience as Byzantian mangle of default loaded templates, almost designed to make me give up and leave the defaults.

    menu.lst is no more - its now /boot/grub/grub.cfg DON'T edit it!
    /etc/grub.d has the new stuff. These are not just a list of boot-up choices anymore. It requires one to be a programmer.
    One called 20_memtest86+ is not really to be meddled with. I tried simply making it non-executable.
    The last choice, 40_custom, allows to add entries only - not quite what we wanted to do.

    So am I doing this wrong? I know I can fully remove old kernels using Synaptic, but I don't really want to strip out the other OS - just make them not appear on the menu. It seems a simple thing, and I feel foolish I can't just do it easily, but I gave it a good try, and now I need help..

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    It's actually a bit easier than that. You can just uninstall your old kernel packages through Synaptic and then run sudo update-grub to have the menu reflect the changes. Ignore the scripts in /etc/grub.d - think of them as tools rather than an actual configuration. The grub configuration file is now /etc/default/grub

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Have you execute sudo update-grub command after removing old kernels and resetting execution of memtest grub script?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Just Joined!
    Join Date
    Mar 2010
    Posts
    1
    1. sudo chmod 777 /boot/grub/grub.cfg
    2. sudo gedit /boot/grub/grub.cfg

    3. no sure: sudo chmod 444 /boot/grub/grub.cfg

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by Agresiv View Post
    1. sudo chmod 777 /boot/grub/grub.cfg
    2. sudo gedit /boot/grub/grub.cfg

    3. no sure: sudo chmod 444 /boot/grub/grub.cfg
    Its not recommended to edit grub.cfg file. It will be overwritten whenever update-grub command get executed. update-grub command generates new grub.cfg file using data available in /etc/default/grub file and /etc/grub.d/ scripts.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,099
    Hi, Gtrax

    In addition to trying the suggestions above, Ubuntu has a couple of nice articles for working with GRUB2 that you might want to check out if you haven't found them already:

    https://help.ubuntu.com/community/Grub2

    https://wiki.ubuntu.com/Grub2

    I'd have to agree with you that the GRUB devs have really complicated things for users with the release of GRUB2, but I'm hoping that they'll make it easier to work with as it improves.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  7. #7
    Just Joined!
    Join Date
    Jul 2009
    Posts
    16
    Just find the lines in your grub config file whatever that may be and comment out the ones you don't want by putting a # at the beginning of each one.

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by bendib View Post
    Just find the lines in your grub config file whatever that may be and comment out the ones you don't want by putting a # at the beginning of each one.
    As I mentioned in last post, one should not edit grub.cfg file. Its contents overwritten on execution of update-grub command. You should make necessary changes in script files and default grub conf file ( /etc/default/grub ) only.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #9
    Just Joined!
    Join Date
    Nov 2006
    Location
    UK
    Posts
    33
    Sorry for the pause - I have been away. Thanks very much to all of you for the replies.
    However I do it, I will not be meddling with grub.cfg.

    Even though the new deal is not as handy in letting us make the boot-up choice appearance as we would like, I find the auto-update kernel bonus just way too convenient to ignore. Keeping menu.lst properly pointing at the wanted kernels was a chore!

    Tnx also Ozar for the article links

    The whole thing has, to some extent, blunted my favorite game of trying out all sorts of distros, on a bunch of logical partitions, using the same old grub for years on end, and simply editing menu.lst. The better way is either VirtualBox, or use a "retired" box.
    G

  10. #10
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by Gtrax
    The whole thing has, to some extent, blunted my favorite game of trying out all sorts of distros, on a bunch of logical partitions, using the same old grub for years on end, and simply editing menu.lst.
    Its more easy than earlier now. You had to edit menu.lst file after distro installation. Now, just execute sudo update-grub command and it will detect new distro and edit grub.cfg accordingly. You don't have to edit any file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...