Find the answer to your Linux question:
Results 1 to 7 of 7
I'm used to Lilo. All I wish to do in grub is set the menu timeout to -1 (i.e. wait for me). What sequence of commands do I need to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Location
    Newbury, UK
    Posts
    1

    Grub: How to actually set the menu timeout


    I'm used to Lilo. All I wish to do in grub is set the menu timeout to -1 (i.e. wait for me). What sequence of commands do I need to do to achieve this?

  2. #2
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    I think you need to edit either:

    /etc/default/grub

    and then do:

    update-grub or grub-update

    OR:

    directly edit /boot/grub/grub.cfg

    The first sequence of commands rebuilds the latter. This will make your changes persistent.

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello and welcome!

    You would need to edit your /etc/default/grub file to change the timeout using your favorite text editor (root or sudo required), then generate a new grub.cfg file, the method of which would depend on which distro you are running. I run Arch and for me the grub.cfg generation command is:

    Code:
    # grub-mkconfig -o /boot/grub/grub.cfg

    edit: Rexilion beat me to it. I think the command he gave above works for Ubuntu and probably many others. When using CRUX, I've always had to manually edit the /boot/grub/grub.cfg file to make desired changes.
    oz

  4. #4
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Oz's suggestion might work as well. A closer inspection of both Ubuntu packages seems they both contain grub-mkconfig as well.

    I think that /usr/sbin/update-grub will actually run 'grub-mkconfig -o /boot/grub/grub.cfg'. It's just somewhat more user friendly.

    These instructions apply to all distributions using GRUB2 I guess.

  5. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Quote Originally Posted by Rexilion View Post
    I think that /usr/sbin/update-grub will actually run 'grub-mkconfig -o /boot/grub/grub.cfg'. It's just somewhat more user friendly.

    These instructions apply to all distributions using GRUB2 I guess.
    Arch doesn't have an update-grub command:

    Code:
    # /usr/sbin/update-grub
    bash: /usr/sbin/update-grub: No such file or directory
    Code:
    # update-grub
    bash: update-grub: command not found
    The last time I installed CRUX, I don't remember it having one either, and I had to manually create/edit the grub.cfg file because the grub-mkconfig wasn't working properly. However, CRUX does specify that grub-mkconfig should be used:

    CRUX | Main / Handbook2-8-Appendix

    Not sure why neither of them include the much simpler update-grub command...
    oz

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by RaggedRat View Post
    I'm used to Lilo. All I wish to do in grub is set the menu timeout to -1 (i.e. wait for me). What sequence of commands do I need to do to achieve this?
    Hi and Welcome !

    Which GRUB version are you using?
    If its Legacy GRUB then set timeout=-1 in /boot/grub/grub.conf or menu.lst (whichever file is present in your system).

    In case your are using latest version, GRUB2, open /etc/default/grub file and set GRUB_TIMEOUT=-1. Save file and execute update-grub command.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello, RaggedRat... since you are new to GRUB, here are a couple of good tutorials that should help you to get a better understanding of how it works:

    GRUB Legacy bootloader - Full tutorial

    GRUB 2 bootloader - Full tutorial
    oz

Posting Permissions

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