Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: How do grub/ Ubuntu/ grub.cfg interact during boot ?

  1. #21
    Join Date
    Oct 2020
    Beans
    110

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    I have changed / added

    # test GRUB_TIMEOUT
    GRUB_TIMEOUT_STYLE=menu

    to default/grub

    The ,manual( !) states



    Code:
    ‘GRUB_TIMEOUT_STYLE’If this option is unset or set to ‘menu’, then GRUB will display the menu and then wait for the timeout set by ‘GRUB_TIMEOUT’ to expire before booting the default entry.  Pressing a key interrupts the timeout. 
     If this option is set to ‘countdown’ or ‘hidden’, then, before displaying the menu, GRUB will wait for the timeout set by ‘GRUB_TIMEOUT’ to expire.  If ESC is pressed during that time, it will display the menu and wait for input.  If a hotkey associated with a menu entry is pressed, it will boot the associated menu entry immediately. If the timeout expires before either of these happens, it will boot the default entry.  In the ‘countdown’ case, it will show a one-line indication of the remaining time.
    I am not sure what "they" mean " by " unset ", so I tried both
    GRUB_TIMEOUT_STYLE=
    and
    GRUB_TIMEOUT_STYLE=menu

    Same results , timeout is still 30 seconds .



    Here is the output of update-grub

    Code:
    a@a-desktop:~$ sudo update-grub
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.15.0-122-generic
    Found initrd image: /boot/initrd.img-4.15.0-122-generic
    Found linux image: /boot/vmlinuz-4.15.0-120-generic
    Found initrd image: /boot/initrd.img-4.15.0-120-generic
    Found Ubuntu 16.04.6 LTS (16.04) on /dev/sda2
    Found Ubuntu 16.04.2 LTS (16.04) on /dev/sda5
    Found Ubuntu 16.04.6 LTS (16.04) on /dev/sdc6
    Found Ubuntu 16.04.7 LTS (16.04) on /dev/sdd6
    Found Ubuntu 16.04.7 LTS (16.04) on /dev/sde2
    Found Ubuntu 16.04.7 LTS (16.04) on /dev/sdf18
    Adding boot menu entry for EFI firmware configuration
    done
    a@a-desktop:~$
    I could use some assistance answering these questions:

    1. I realize my system is a mess, however why do I see ONLY two images.
    I am using "only /dev/sdd6" and do no know if it has a valid "image"
    What is the difference between "image" and "dev/.." entries in update-grub ?

    2. What is this line telling me ?
    Adding boot menu entry for EFI firmware configuration
    How can i verify such addition ?
    Pehaps using efibootmgr ?

  2. #22
    Join Date
    Oct 2020
    Beans
    110

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    Quote Originally Posted by oldfred View Post
    /etc/default/grub is the small settings file. You have posted it before.
    Did you try changing everything to defaults and then test?

    You full grub.cfg with all the settings is in your /boot folder.
    Again the scripts build your full grub.cfg using settings from grub.

    Code:
    fred@z170-focal-k:~$ grep "time" /boot/grub/grub.cfg        
      set timeout=30 
      if [ x$feature_timeout_style = xy ] ; then 
        set timeout_style=menu 
        set timeout=3 
      # Fallback normal timeout code in case the timeout_style feature is 
        set timeout=3
    
    
    So if your settings in /etc/default/grub are not correct it defaults to 30.


    Here is my result.
    Not sure what it is telling me.
    Besides, why am I modifying machine generated file - it will change during reboot anyway.







    Code:
    a@a-desktop:~$ grep "time" /boot/grub/grub.cfg        
      set timeout=5
      if [ x$feature_timeout_style = xy ] ; then
        set timeout_style=menu
        set timeout=5
      # Fallback normal timeout code in case the timeout_style feature is
        set timeout=5
    set timeout_style=menu
    if [ "${timeout}" = 0 ]; then
      set timeout=10
    a@a-desktop:~$   set timeout=30 
    a@a-desktop:~$   if [ x$feature_timeout_style = xy ] ; then 
    >     set timeout_style=menu 
    >     set timeout=3 
    >   # Fallback normal timeout code in case the timeout_style feature is 
    >     set timeout=3
    >

  3. #23
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    Windows can update UEFI.
    Now Ubuntu can update some UEFI if vendor uses fwupd.
    https://github.com/rhboot/fwupdate/b...ster/README.md
    https://fwupd.org/lvfs/devicelist &
    https://fwupd.org/vendorlist

    My system is older and will never be on list, so I uninstall fwupd to speed boot slightly.

    First entry in grub is the install you are booting. It will be default in grub menu and should be the main working install you are using.
    If using sdd6, you need to reinstall grub in that install to make it first in menu and be the "image" that is first menu item.

    Do you really need all those other installs?
    I have many different installs and some obsolete.
    So I turn off os-prober and only put the other installs that are current & that I want to boot into 40_custom.
    I am sure I have posted this before.
    http://askubuntu.com/questions/84811.../848614#848614
    How to: Create a Customized GRUB2 Screen that is Maintenance Free.- Cavsfan
    https://help.ubuntu.com/community/Ma...tomGrub2Screen
    https://www.gnu.org/software/grub/ma...-manual-config
    https://help.ubuntu.com/community/Grub2/CustomMenus
    http://ubuntuforums.org/showthread.php?t=2076205
    My entries in 40_custom to boot another install. I use labels now, but have to be careful to have unique labels. Labels are more understandable than UUIDs.
    https://ubuntuforums.org/showthread....5#post13787835
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #24
    Join Date
    Oct 2020
    Beans
    110

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    First entry in grub is the install you are booting. It will be default in grub menu and should be the main working install you are using.
    If using sdd6, you need to reinstall grub in that install to make it first in menu and be the "image" that is first menu item.

    Please explain THE above.


    As far as I know there should be only ONE grub.
    grub "generates" a menu for multi boot system, including "advanced (recovery) options" .

    To certain degree my "grub" functions as expected, including access to OS which are no longer useful ( to me ).

    I have given up on this discussion to ever answer my "how it all interacts " question.

    Since honest opinions are considered inappropriate and rude , I shall just state:
    I am slowly realizing that the "menu timeout of 30 seconds" will not be resolved also.


    HOWEVER - I REMAIN CONFIDENT THAT SOMEBODY WILL HELP ME TO FIND THE REAL SOURCE OF THE PROBLEM.
    Last edited by helen314; 4 Weeks Ago at 06:07 PM.

  5. #25
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    Possibly .. you might get some insights by installing and launching grub customizer.

    I also find the writings of Rod Smith to be helpful. It was there that I found rEFInd as an alternative to the usual loaders.

  6. #26
    Join Date
    Oct 2020
    Beans
    110

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    Quote Originally Posted by dragonfly41 View Post
    Possibly .. you might get some insights by installing and launching grub customizer.

    I also find the writings of Rod Smith to be helpful. It was there that I found rEFInd as an alternative to the usual loaders.
    I'll give a go, BUT - menu timeout is hardy "customizing" anything.
    (Just my opinion )

  7. #27
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    You have 7 grub2s.
    Each install has its own grub, but only one is the default boot at any one time.
    But if you boot into another install & it updates grub, then it will become the default boot.

    With multiple installs you have to do a lot to manage which system is default boot.

    Many have posted confusion where they are booting into a second install, but actual boot is first install.
    They constantly update grub in second install, but first install is still in control and has settings that matter.
    First menu item in grub that appears will be the default install.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  8. #28
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,800

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    If you have older grub as in 16.04, there was a time grub was rigged to always display the grub menu with 30 sec timeout for UEFI systems. There was a workaround, but I don't recall the details.

    Of course, you don't have to patiently wait 30 sec. for it to boot - just select the entry (it preselects the default) and press enter and the boot goes on.
    Last edited by Dennis N; 4 Weeks Ago at 09:28 PM.

  9. #29
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    Have you been updating grub settings in sdd6 but grub is default booting another install?
    If default is not 0 and you are selecting 3 or some other entry then any editing of grub will not be the grub that boots and provides menu.

    If in sdd6, update grub only updates menu.
    Recreate /boot/efi/EFI/ubuntu/grub.cfg or reinstall grub2 UEFI boot
    sudo dpkg-reconfigure grub-efi-amd64
    sudo grub-install --efi-directory=/boot/efi
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #30
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How do grub/ Ubuntu/ grub.cfg interact during boot ?

    I just point out that if you install rEFInd (see Rod Smith books) into one of your ESP partitions then it scans through all the available loaders and presents these in a GUI. Moreover in refind.conf the timeout can be set.

Page 3 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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