How can I add a menu entry in grub 2 for an os on a btrfs partition?

Currently update-grub does not detect an os on a btrfs partition.

1 Answer 1


The answer might be too ubuntu specific, I apologise for that.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.