Announcement

Collapse
No announcement yet.

btrfs is not recognised by grub on 16.04

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

    btrfs is not recognised by grub on 16.04

    I decided to overwrite my old 14.04 version by 17.10.
    At the same time I decided to replace the two ext4 partitions by a single btrfs one.

    The install was not smooth, the Reboot prompt ends on a terminal screen with a non-working login.
    Using the magic keys I was able to reboot, first time into nothing, after a second installation all worked.

    But because the new install ended up on top of the grub list I did in 16.04
    Code:
    sudo update-grub
    But apparently the 16.04 grub utility does not recognise the btrfs partition.

    Any solutions except going back to ext4?
    Last edited by Teunis; Oct 22, 2017, 12:23 PM.

    #2
    is the Kubuntu 16.04 controling grub now ? and you can boot to it ok ?

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      In the mean time I've found and successfully followed this page:

      https://serverfault.com/questions/77...trfs-partition

      To add a menu entry, you have to edit /etc/grub.d/40_custom. Append the following to the end of the file:

      menuentry "GIVE AN ENTRY NAME" {
      set root=(hd0,5)
      linux /@/vmlinuz root=UUID=xxx-xxx-xxx-xxx-xxxxx rootflags=subvol=@ ro quiet splash
      initrd /@/initrd.img
      }
      You have to change (hd0,5) to reflect your partition. If grub and the desired partition are on the same hard drive use hd0, else you might need to experiment a bit with hd1, hd2 etc. Instead of 5 use the number of the partition.
      To find out the UUID of the partition use blkid
      It is possible that your subvolume is not named @ (that's ubuntus default), but something else. You can find out the name if you mount the partition and list its the folders

      Comment


        #4
        Originally posted by Teunis View Post
        In the mean time I've found and successfully followed this page:

        https://serverfault.com/questions/77...trfs-partition
        cool ,,that is what I was going to get at .

        you can allso add a menu entry to the 40_custom to boot an install that you did NOT install grub with ,,,,that looks like this .

        Code:
        menuentry 'Neon-lts' {
        insmod btrfs
        set root='(hd0,msdos1)'
        linux /@/vmlinuz root=UUID=ff5d66d4-35b6-4c9c-a64e-8dfbe2aa1e31 rootflags=subvol=@ ro quiet splash
        initrd /@/initrd.img
        }
        this allso would half to be edited to reflect you pathes and disk partition type "msdos" or "gpt"

        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #5
          Originally posted by vinnywright View Post
          is the Kubuntu 16.04 controling grub now ? and you can boot to it ok ?

          VINNY
          Immediately after the install I could boot in all installs. (Win7, 16.04 & 17.10)

          But because the new 17.10 came out on top it also became the default, something I'm not yet ready for.

          So as before I did an update-grub from 16.04 which will bring it to the top of the list.
          Yes it came out on top but 17.10 disappeared, I found my suspicion about grub not handling brtfs confirmed on several websites.
          Almost 7 years ago this was the reason I quit playing with btrfs and it hasn't been fixed...

          But as you can see in my other reply I edited etc/grub.d/40_custom followed by update-grub and now all works as should.

          Comment


            #6
            ... grub not handling brtfs...
            IIUC it's the "osprober" script that doesn't do btrfs. IIUC that comes from debian. I agree it's all grub to us, but I find the situation easier to understand in that light.

            Regards, John Little
            Regards, John Little

            Comment


              #7
              I can say that grub for sure does "recognize" btrfs. However, os-prober will not find btrfs installs outside of the one it's running from as jlittle commented.

              The work-around is to edit /etc/grub.d/40_custom file on your "main" install (the one you wish to boot to by default) and direct the grub menu to use the grub.cfg from the second install, like this:
              Code:
               [FONT=monospace][COLOR=#000000]menuentry 'Kubuntu 17.04' {[/COLOR]
                 insmod part_gpt  
                 insmod btrfs
                 search --no-floppy --fs-uuid --set=root <YOUR BTRFS UUID HERE> 
                 configfile /@/boot/grub/grub.cfg
              }[/FONT]
              It appears currently you are booting to 17.04 by default and you would prefer to boot to 16.04 by default? Assuming this is correct, to fix it to boot to 16.04 by default you have two choices:

              1. Let the current setup stand. Create the 40_custom as above but point it at your 16.04 install. Then run update-grub and set the default grub menu selection to the 16.04 menu item.

              2. Change back to booting grub from 16.04. To do this, you must;

              • Mount 16.04 somewhere
              • Re-install grub from 17.04 using the --root-directory option pointed at the 16.04 mount/boot/grub
              • Re-boot (you should be back in 16.04 now)
              • Re-install grub
              • Add the 40_custom entry and update-grub


              Either way, the only way to get to both at boot time will be with the 40_custom entry.

              I assumed you have 17.04 on a different btrfs volume from 16.04. You can have them both on the same btrfs file system, you just have to change the subvolume names to something unique.

              Please Read Me

              Comment


                #8
                Hi oshunlovr,

                Yes I agree with jlittle the problem is not so much with grub proper but certainly with the osprober.

                16.04 is on two ext4 partitions, the new 17.10 is in the space the previous 14.04 partitions were at.

                Because of some for me significant problems, impossible to install a scanner and a failing installation of Veracrypt, I'm not yet ready to dump 16.04 and change it's space to btrfs.

                Positive about 17.10 is boots up faster and my Xerox laser printer installed correctly.

                Comment

                Working...
                X