Trouble setting the default boot OS
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    234
    Linux (Fedora) Firefox 65.0

    Trouble setting the default boot OS

    A while back I wanted to try something out in Ubuntu and installed it as a second OS on my computer. Unfortunately, this made my computer automatically boot with Ubuntu and I have to manually select booting Fedora 28 instead. I want it configure it so that the computer always boots the latest Fedora kernel again.

    I've been looking around for instructions and I found several that use "grep menuentry /boot/grub/grub.cfg" and editing "/etc/default/grub". But grub.cfg only lists four Fedora 28 kernels and doesn't show Ubuntu at all. And /etc/default/grub already has the setting "GRUB_DEFAULT=saved", which should automatically boot the last booted OS. It also says the time for selection is 5 seconds, while in reality the boot selection screen has a timer of 30 seconds.

    Clearly, the bootloader isn't using the files that I am accessing in Fedora 28.

    I actually would like to delete the Ubuntu partition, but when I had the same situation some years ago it ended up making my computer unbootable. If the bootloader isn't using the files from the Fedora partition and only using files from the Ubuntu partition, the same thing would probably happen again.

    How can I fix this?

  2. #2
    Join Date
    Mar 2006
    Posts
    713
    Linux (Fedora) Firefox 65.0

    Re: Trouble setting the default boot OS

    Do you know if you are efi or bios boot?
    As root do this while logged into ubuntu:
    less /var/log/grubby | grep grub2 | tail
    and post the output here. We need to know what your setup is and whether you can work at the command line.
    jbkt23
    Thinkpads Depends on era T23 - X2xx
    AMD & Intel Boxes

  3. #3
    Join Date
    May 2011
    Posts
    237
    Linux Firefox 65.0

    Re: Trouble setting the default boot OS

    You need to figure out which boot partition Ubuntu has setup to boot. It most probably is not using the one Fedora set up.

    The solution to your problem greatly depends how you setup the boot and partition scheme, and how each distribution set it up, since there are several different possible ways your PC boots. It used to be so wrongly simple in the old days (when all you had was pretty limited BIOS and one MBR, which obviously is no longer capable of addressing modern OS and disks).

    I myself am still learning the intricacies of pure UEFI, mixed UEFI+legacy BIOS, Mac UEFI and legacy-BIOS mode, UEFI grub2 vs legacy BIOS grub2, multiple UEFI boot partitions, etc.

  4. #4
    Join Date
    Dec 2018
    Location
    Erlangen
    Posts
    3
    Linux Firefox 64.0

    Re: Trouble setting the default boot OS

    Boot problems a mitigated by sticking to UEFI, Grub2, and chain loading of the systems installed. You may turn off probing for alternate operating systems and adding chain load entries:

    erlangen:~ # cat /etc/grub.d/40_custom
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.

    menuentry 'Tumbleweed /dev/sdb3' {
    search --fs-uuid --no-floppy --set=root 4A24-B10D
    chainloader /EFI/opensuse/grubx64.efi
    }

    menuentry 'Xubuntu 18.04 /dev/sdb2' {
    search --fs-uuid --no-floppy --set=root 6DEC-64F9
    chainloader /EFI/ubuntu/grubx64.efi
    }

    menuentry 'Fedora 29 /dev/nvme0n1p1' {
    search --fs-uuid --no-floppy --set=root 6DEC-64F9
    chainloader /EFI/fedora/grubx64.efi
    }
    erlangen:~ #

  5. #5
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    234
    Linux (Android 5.1.1) Android Browser 4.0

    Re: Trouble setting the default boot OS

    Quote Originally Posted by jbkt23
    Do you know if you are efi or bios boot?
    As root do this while logged into ubuntu:
    I am getting "no such file or directory". There is no /grubby in /var/log.

    How do I check if it is bios?

    Cat /etc/grub.d/40_custom only gets me the initial message but does not list any entries.

  6. #6
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    234
    Linux (Fedora) Firefox 65.0

    Re: Trouble setting the default boot OS

    I upgraded to Fedora 29. This not affect the bootloader in any way. It still shows me only a single Fedora 28 kernel to chose from, but at least it actually boots Fedora 29.

    Is there any way to do a fresh installation of Grub 2, so that it creates a new list of bootable kernels on the computer?

  7. #7
    Join Date
    Dec 2018
    Location
    Erlangen
    Posts
    3
    Linux Firefox 64.0

    Re: Trouble setting the default boot OS

    Quote Originally Posted by Yora0
    I upgraded to Fedora 29. This not affect the bootloader in any way. It still shows me only a single Fedora 28 kernel to chose from, but at least it actually boots Fedora 29.

    Is there any way to do a fresh installation of Grub 2, so that it creates a new list of bootable kernels on the computer?
    for details see: https://fedoraproject.org/wiki/GRUB_2

    Each of the systems on your machine creates its own bootloader: https://fedoraproject.org/wiki/GRUB_...he_GRUB_2_menu

Similar Threads

  1. Trouble setting up 389-ds
    By ktf524 in forum Using Fedora
    Replies: 3
    Last Post: 17th July 2012, 03:08 PM
  2. Trouble setting up grub/dual boot
    By marmot in forum Installation, Upgrades and Live Media
    Replies: 8
    Last Post: 9th October 2010, 12:28 AM
  3. Trouble setting up new printer
    By vinoman in forum Hardware & Laptops
    Replies: 3
    Last Post: 30th June 2009, 06:28 PM
  4. Trouble setting up Printer in F10
    By fryemo in forum Hardware & Laptops
    Replies: 0
    Last Post: 26th February 2009, 10:11 PM
  5. Replies: 5
    Last Post: 22nd January 2008, 08:49 AM

Posting Permissions

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