Announcement

Collapse
No announcement yet.

Grub boot order

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Grub boot order

    Having now got Kubuntu successfully installed, it is 7th in the Grub menu, behind Linux Mint, Windows, and various 'advanced' options.

    Is there an easy way to bring Kubuntu to the top? In other words to make it the default distro?

    Thanks.

    #2
    I'm sure there are better ways, but if I run boot-repair from a particular distro, that one rises to the top. I have Ubuntu 16.04, Ubuntu 18.04, Kubuntu 18.04, and Neon plus some entries related to efi and the OEM (Dell).
    Kubuntu 20.04

    Comment


      #3
      These things are edited in the file /etc/default/grub, edited as root (with root privileges).

      Example of /etc/default/grub:

      Code:
      # [B][COLOR=#ff0000]If you change this file, run 'update-grub' afterwards[/COLOR][/B] to update
      # /boot/grub/grub.cfg.
      # For full documentation of the options in this file, see:
      #   info -f grub -n 'Simple configuration'
      
      [B][COLOR=#0000cd]GRUB_DEFAULT=0[/COLOR][/B]
      GRUB_TIMEOUT_STYLE=menu
      # Just get a countdown of seconds: GRUB_TIMEOUT_STYLE=countdown
      # Get no GRUB boot menu: GRUB_TIMEOUT_STYLE=hidden
      GRUB_TIMEOUT=10
      GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
      GRUB_CMDLINE_LINUX=""
      
      # Uncomment to enable BadRAM filtering, modify to suit your needs
      # This works with Linux (no patch required) and with any kernel that obtains
      # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
      #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
      
      # Uncomment to disable graphical terminal (grub-pc only)
      #GRUB_TERMINAL=console
      
      # The resolution used on graphical terminal
      # note that you can use only modes which your graphic card supports via VBE
      # you can see them in real GRUB with the command `vbeinfo'
      #GRUB_GFXMODE=640x480
      
      # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
      #GRUB_DISABLE_LINUX_UUID=true
      
      # Uncomment to disable generation of recovery mode menu entries
      #GRUB_DISABLE_RECOVERY="true"
      
      # Uncomment to get a beep at grub start
      #GRUB_INIT_TUNE="480 440 1"
      GRUB_DEFAULT=0
      indicates the FIRST operating system listed in the /boot/grub/grub.cfg configuration file (in a line labeled "menuentry"). Counting starts at zero. To change it to the second OS listed:
      GRUB_DEFAULT=1
      and so on.
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        If you run grub-install and update-grub from Kubuntu it should be at the top of the list. This should also make it the default.

        Please Read Me

        Comment


          #5
          If you run grub-install and update-grub from Kubuntu it should be at the top of the list. This should also make it the default.
          Yes. And that's all that Boot Repair does or should do (re: Post #2). Running grub-install sort of "freshens" things up, too, all done from the Kubuntu you wish to use.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Originally posted by oshunluvr View Post
            If you run grub-install and update-grub from Kubuntu it should be at the top of the list. This should also make it the default.
            Thanks.

            Code:
            howard@Hansel:~$ grub-install
            Installing for i386-pc platform.
            grub-install: error: install device is not specified.
            howard@Hansel:~$
            sudo install-grub and re-boot - no change in the order - Kubuntu still #7.

            Comment


              #7
              Installing for i386-pc platform.
              grub-install: error: install device is not specified.

              Tells me you do not have UEFI firmware on your PC. Let's not get into this too much.
              Since you have i386-pc, you need to use the install device for GRUB in your grub-install command.
              Sounds like you have just one hard drive, so that is /dev/sda, and so:

              sudo grub-install /dev/sda

              Or, try Post #3.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Originally posted by Qqmike View Post
                Installing for i386-pc platform.
                grub-install: error: install device is not specified.

                Tells me you do not have UEFI firmware on your PC. Let's not get into this too much.
                Since you have i386-pc, you need to use the install device for GRUB in your grub-install command.
                Sounds like you have just one hard drive, so that is /dev/sda, and so:

                sudo grub-install /dev/sda

                Or, try Post #3.
                The post #3 method did not work either. Ubuntu is still at position #7.

                Click image for larger version

Name:	Screenshot_20181016_073417.png
Views:	1
Size:	49.6 KB
ID:	644027

                I have 4 hard drives and 1 SSD! The Kubuntu install is on its own drive, dev/sdd, I will run the command again and post here later.

                Comment


                  #9
                  The message is clear but how to fix it?

                  Code:
                  howard@Hansel:~$ sudo grub-install /dev/sdd
                  [sudo] password for howard: 
                  Installing for i386-pc platform.
                  grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
                  grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
                  grub-install: error: will not proceed with blocklists.
                  howard@Hansel:~$

                  Comment


                    #10
                    I'm hesitant to pursue this further ONLY because I don't want to inadvertently mess up your system. It is working, just that the entry for Kubuntu appears down on the list in the GRUB boot menu that you see when you boot your PC. To fix this the way you want, you really need to get into some details and understand what exactly is going on. You've got 5 hard drives and several OSs. When you installed Kubuntu, I am now wondering where GRUB got installed during that installation of Kubuntu--to what drive did GRUB go? Not to /dev/sdd because of that error message you just got:

                    sudo grub-install /dev/sdd
                    [sudo] password for howard:
                    Installing for i386-pc platform.
                    grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
                    grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
                    grub-install: error: will not proceed with blocklists. /dev/sdd is a GPT drive,

                    https://en.wikipedia.org/wiki/GUID_Partition_Table

                    And that's OK, except you do need a special partition called a BIOS Boot Partition into which you can install GRUB (if you want to install GRUB on /dev/sdd).
                    https://en.wikipedia.org/wiki/BIOS_boot_partition

                    As for Post #3, to make that work, you need to boot into the operating system where the working (active) GRUB was installed, then edit that default file. That drive is apparently not /dev/sdd.

                    You can explore your hard drives by issuing various commands.

                    For example
                    sudo fdisk -lu

                    (that's -lu, or minus sign, then the lower case letter "ell" then letter u)

                    (The newer fdisk programs do accomodate GPTs, so that command should work.)

                    Another command is
                    lsblk
                    (you don't need sudo for this one)


                    Maybe someone else can see an easy way to go here.
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      I was going to suggest
                      Code:
                      inxi -Fxz
                      , but with the apparent drive complexity
                      Code:
                      lsblk
                      and maybe
                      Code:
                      lsblk -f
                      would provide better clues.
                      The next brick house on the left
                      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                      Comment


                        #12
                        Thanks again to all.

                        I arrived at this place because I am using an old upgraded PC which started life in Win7, then Win10, then there were various efforts to get into Linux Mint, unsuccessful initially.
                        I finally got Mint running well and I like it but I need the KDE desktop for Previewing in Kate. This is such a valuable plugin tool that I cannot go back to doing without it. I like the KDE platform better anyway.

                        1.

                        howard@Hansel:~$ sudo fdisk -lu
                        [sudo] password for howard:
                        Disk /dev/sda: 465.8 GiB, 500106780160 bytes, 976771055 sectors
                        Units: sectors of 1 * 512 = 512 bytes
                        Sector size (logical/physical): 512 bytes / 512 bytes
                        I/O size (minimum/optimal): 512 bytes / 512 bytes
                        Disklabel type: dos
                        Disk identifier: 0x83269276

                        Device Boot Start End Sectors Size Id Type
                        /dev/sda1 * 2048 976769023 976766976 465.8G 7 HPFS/NTFS/exFAT

                        Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
                        Units: sectors of 1 * 512 = 512 bytes
                        Sector size (logical/physical): 512 bytes / 4096 bytes
                        I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                        Disklabel type: gpt
                        Disk identifier: 2B83813A-9927-45C7-86D2-9A4B65D3E8C6

                        Device Start End Sectors Size Type
                        /dev/sdb1 2048 5251035135 5251033088 2.5T Linux filesystem
                        /dev/sdb2 5251035136 7814035455 2563000320 1.2T Linux filesystem

                        Disk /dev/sdc: 1.4 TiB, 1500300828160 bytes, 2930275055 sectors
                        Units: sectors of 1 * 512 = 512 bytes
                        Sector size (logical/physical): 512 bytes / 512 bytes
                        I/O size (minimum/optimal): 512 bytes / 512 bytes
                        Disklabel type: dos
                        Disk identifier: 0xd0e3f806

                        Device Boot Start End Sectors Size Id Type
                        /dev/sdc1 16134 288559529 288543396 137.6G 7 HPFS/NTFS/exFAT
                        /dev/sdc2 288575592 1032867044 744291453 354.9G 7 HPFS/NTFS/exFAT
                        /dev/sdc3 1032867048 1416164851 383297804 182.8G 7 HPFS/NTFS/exFAT
                        /dev/sdc4 1416165374 2930274303 1514108930 722G 5 Extended
                        /dev/sdc5 2393128960 2896863231 503734272 240.2G 83 Linux
                        /dev/sdc6 2896865280 2930274303 33409024 16G 82 Linux swap / Solaris
                        /dev/sdc7 1416165376 1931359827 515194452 245.7G 83 Linux
                        /dev/sdc8 * 1931360256 1932410879 1050624 513M ef EFI (FAT-12/16/32)
                        /dev/sdc9 1932412928 2393122815 460709888 219.7G 83 Linux

                        Partition table entries are not in disk order.

                        Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
                        Units: sectors of 1 * 512 = 512 bytes
                        Sector size (logical/physical): 512 bytes / 4096 bytes
                        I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                        Disklabel type: gpt
                        Disk identifier: 75A5DE07-F101-4146-BE44-F869B7EDBA5D

                        Device Start End Sectors Size Type
                        /dev/sdd1 2048 1050623 1048576 512M EFI System
                        /dev/sdd2 1050624 1953523711 1952473088 931G Linux filesystem

                        Disk /dev/sde: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
                        Units: sectors of 1 * 512 = 512 bytes
                        Sector size (logical/physical): 512 bytes / 4096 bytes
                        I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                        Disklabel type: dos
                        Disk identifier: 0x5a77faf0

                        Device Boot Start End Sectors Size Id Type
                        /dev/sde1 16065 3907024064 3907008000 1.8T f W95 Ext'd (LBA)
                        /dev/sde5 16128 3907024064 3907007937 1.8T 7 HPFS/NTFS/exFAT

                        Partition 1 does not start on physical sector boundary.
                        howard@Hansel:~$


                        2.

                        Click image for larger version

Name:	Screenshot_20181017_083628.png
Views:	1
Size:	53.5 KB
ID:	644028

                        3.

                        Click image for larger version

Name:	Screenshot_20181017_083724.jpg
Views:	1
Size:	53.2 KB
ID:	644029

                        From all this it seems to me that I have two Linux Mint installations, one which is the default (efi/boot - sdc8),

                        The Kubuntu install is definitely on dev/sdd.

                        Comment


                          #13
                          Wow, what an interesting and complicated setup you have there, JoHubb. I'm amazed it works so well. There is nothing wrong with it, but it is a complex weave of things (boot-wise).

                          From all this it seems to me that I have two Linux Mint installations, one which is the default (efi/boot - sdc8),
                          If that is true, then it is the GRUB from sdc8 from which you are seeing that GRUB boot menu when you boot up, right? So it is the one that needs to be edited as per Post #3. You can try it: boot into that Mint, and do the Post #3 edit to that configuration file ... -->

                          Btw, when you are in sdc8, look at the GRUB boot menu: /boot/grub/grub.cfg. It's quite technical, but look down through it and you'll come to lines starting with menuentry, like this:

                          Code:
                          menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c5f5de3a-2606-4923-a249-151052b877e0'
                          That one represents my Kubuntu (it is called Ubuntu, but it is actually my Kubuntu -- your Mint's may also be called Ubuntu's as they are Ubuntu derivatives).

                          So, anyway, study that file /boot/grub/grub.cfg from Mint on sdc8. Do those menuentry lines correspond to the boot menu that you see when you boot your PC? If so, that does (quite probably) confirm that it is sdc8 that controls your "booting show." Thus, editing it (as per Post #3) should do the trick, I think, I hope, if we are lucky ...

                          There are at least a few other guys (esp jl....) around here that may have time to check this, also. We sure do not want to mess up your booting to where it doesn't work at all! I'll try to check back as I'll be in and out running errands for some work-work.
                          Last edited by Qqmike; Oct 17, 2018, 07:46 AM.
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Hm...thanks, my computer runs perfectly in all the different OSes and distros! Amazing is right, given that I know so little about Linux.

                            I checked the /boot/grub/grub.cfg and there is a long list of 'menuentries' for Linux Mint, each maybe representing a different partition in dev/sdc. Both Windows 10 and Ubuntu appear near the end of the list.

                            When I tried to alter the /etc/default/grub.cfg in sdc8 (as per Post#3), the editor wouldn't overwrite. I tried the default text editor and Kate but neither would overwrite the file.

                            I guess since everything runs well, I am tempting fate by messing with the grub menu order. It is a small inconvenience to have to select Ubuntu pre-boot, but nothing more than that.

                            Maybe I should leave well enough alone?

                            Comment


                              #15
                              When I tried to alter the /etc/default/grub.cfg in sdc8 (as per Post#3), the editor wouldn't overwrite.
                              The file grub.cfg has to be edited with root privileges. You were in Mint while you do that, and I don't know how Mint handles the root privileges for editing grub.cfg (or other system files) -- it could be something like a menu choice "edit as root" or "save as root." Do you know? This usually isn't a big deal -- it is just that in your case, you have so many things going on.

                              Maybe I should leave well enough alone?
                              One could make a strong argument for that! At the same time, if you could do the Post 3 edit with the root privileges, it wouldn't hurt to try -- you could always change it back again. (HOWEVER, running anything like grub-install could get us into a mess.)

                              (Not too relevant, just curious: Is your PC like from 2011 to 2013?)
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X