Modifying Grub2 boot menu

Forum Forums New users New Users and General Questions Modifying Grub2 boot menu

  • This topic has 5 replies, 2 voices, and was last updated Mar 26-4:35 am by dukester.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #56384
    Member
    dukester

      sudo fdisk -l

      Device          Start        End   Sectors   Size Type
      /dev/sda1        2048  976476159 976474112 465.6G Linux filesystem
      /dev/sda2   976476160  980672511   4196352     2G Linux swap
      /dev/sda3   980672512  980673535      1024   512K FreeBSD boot
      /dev/sda4   980673536 1945362423 964688888   460G FreeBSD UFS
      /dev/sda5  1945362424 1953525134   8162711   3.9G FreeBSD swap

      How do I add FreeBSD to the GRUB2 boot menu? TIA

      --
      dukester

      #56386
      Moderator
      caprea
        Helpful
        Up
        0
        ::

        Most likely there are users here who dual boot FreeBSD and can give you proven tips.
        What I would try in your place is to use the file /etc/grub.d/40_custom for booting and follow more or less these instructions.
        https://help.ubuntu.com/community/Grub2%20Other%20Os

        #56388
        Member
        dukester
          Helpful
          Up
          0
          ::

          Thanks for the link. I had already edited

          /etc/grub.d/40_custom

          . However, I didn’t know that I had to run

          sudo grub-update

          --
          dukester

          #56389
          Member
          dukester
            Helpful
            Up
            0
            ::

            This worked just dandy:

            #!/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 "FreeBSD" {
            #    insmod ufs2
                set root='(hd0,4)'
                kfreebsd /boot/loader
            }

            Always do “sudo update-grub” after editing the customization files.

            • This reply was modified 2 years, 1 month ago by dukester.
            • This reply was modified 2 years, 1 month ago by dukester.

            --
            dukester

            #56393
            Moderator
            caprea
              Helpful
              Up
              0
              ::

              There’s a typo, it’s sudo update-grub, might fix it.

              Thanks for sharing your working solution.

              #56400
              Member
              dukester
                Helpful
                Up
                0
                ::

                @caprea 👍

                --
                dukester

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.